Documentation ¶
Index ¶
- Constants
- Variables
- func APIApplicationAppSpec(appspec webservicesv1alpha1.ApplicationRegistrationSpec, ownerID string) (apiApp authzapireq.APIApplication, err error)
- func ModifyOwnerRoleBinding(policy webservicesv1alpha1.ProjectLifecyclePolicy, ...)
- func ModifyProjectMetadata(policy webservicesv1alpha1.ProjectLifecyclePolicy, ...)
- type ApplicationRegistrationReconciler
- type BootstrapApplicationRoleReconciler
- type LifecycleReconciler
- type ProjectLifecyclePolicyReconciler
Constants ¶
View Source
const ( // Blocked label and annotations as described here: https://okd-internal.docs.cern.ch/operations/project-blocking/ LabelBlockedNamespace string = "okd.cern.ch/project-blocked" // Annotation that defines when the project should be deleted AnnotationDeleteNamespaceTimestamp string = "lifecycle.webservices.cern.ch/delete-namespace-after" AnnotationBlockedNamespaceReason string = "okd.cern.ch/blocked-reason" AnnotationBlockedNamespaceTimestamp string = "okd.cern.ch/blocked-timestamp" AnnotationLifecycleBlockedReason string = "PendingDeletionAfterLifecycleDeletedApplication" )
Variables used in function `ensureProjectMetadata`
Variables ¶
View Source
var ( // Generic temporary error ErrTemporary = errors.New("TemporaryError") ErrApplicationAlreadyExists = errors.New("ApplicationAlreadyExists") ErrInvalidSpec = errors.New("InvalidSpec") ErrClientK8s = errors.New("k8sAPIClientError") ErrClientAuthz = errors.New("AuthzAPIClientError") ErrAuthzAPITemp = errors.New("AuthzAPIError") ErrAuthzAPIPermanent = errors.New("AuthzAPIPermanentError") ErrAuthzInvalidResponse = errors.New("AuthzAPIInvalidResponse") ErrApplicationConflict = errors.New("ApplicationConflict") ErrAssociatedAppNotFound = errors.New("AssociatedApplicationNotFound") ErrInvalidOwner = errors.New("InvalidOwner") ErrUnsupportedChangeInAuthz = errors.New("UnsupportedChangeInAuthz") ErrGroupDoesntExist = errors.New("GroupDoesntExistError") )
ErrorConditions
Functions ¶
func APIApplicationAppSpec ¶
func APIApplicationAppSpec(appspec webservicesv1alpha1.ApplicationRegistrationSpec, ownerID string) (apiApp authzapireq.APIApplication, err error)
APIApplicationAppSpec transforms the AppSpec to an APIApplication to POST
func ModifyOwnerRoleBinding ¶
func ModifyOwnerRoleBinding(policy webservicesv1alpha1.ProjectLifecyclePolicy, appreg webservicesv1alpha1.ApplicationRegistration, ownerRolebinding *rbacv1.RoleBinding)
Function that sets the desired state of the RoleBinding resource.
func ModifyProjectMetadata ¶
func ModifyProjectMetadata(policy webservicesv1alpha1.ProjectLifecyclePolicy, appreg webservicesv1alpha1.ApplicationRegistration, namespace *v1.Namespace)
ModifyProjectMetadata sets the desired value for the namespace annotation and adds custom labels, CurrentOwner, CurrentAdminGroup and ResourceCategory, to the Openshift project
Types ¶
type ApplicationRegistrationReconciler ¶
type ApplicationRegistrationReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Authz authzapireq.AuthzClient AuthzApiCache apicache.AuthzCache // LifecycleEvents channel is to receive reconcile requests to the Lifecycle controller // (when syncing all apps with Authz API and finding some apps that need update) LifecycleEvents chan event.GenericEvent }
ApplicationRegistrationReconciler reconciles a ApplicationRegistration object
func (*ApplicationRegistrationReconciler) SetupWithManager ¶
func (r *ApplicationRegistrationReconciler) SetupWithManager(mgr ctrl.Manager) error
type BootstrapApplicationRoleReconciler ¶
type BootstrapApplicationRoleReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Authz authzapireq.AuthzClient AuthzApiCache apicache.AuthzCache }
BootstrapApplicationRoleReconciler reconciles a BootstrapApplicationRole object
func (*BootstrapApplicationRoleReconciler) SetupWithManager ¶
func (r *BootstrapApplicationRoleReconciler) SetupWithManager(mgr ctrl.Manager) error
type LifecycleReconciler ¶
type LifecycleReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Authz authzapireq.AuthzClient AuthzApiCache apicache.AuthzCache // LifecycleEvents channel is to send reconcile requests to the ApplicationRegistration controller LifecycleEvents chan event.GenericEvent // SyncAllAppsEvents channel is used to trigger a sync of all applications (from a timer) SyncAllAppsEvents chan event.GenericEvent }
LifecycleReconciler reconciles a Lifecycle object
func (*LifecycleReconciler) SetupWithManager ¶
func (r *LifecycleReconciler) SetupWithManager(mgr ctrl.Manager) error
type ProjectLifecyclePolicyReconciler ¶
type ProjectLifecyclePolicyReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme // Base URL to generate a link to manage an application in the Application Portal. // The application ID will be appended to the base URL to generate to full URL. ApplicationPortalBaseUrl string // The text to show in the NamespaceDashboard ConsoleLink providing the general-purpose link from the OKD console // to the application's management page in the Application Portal. ApplicationPortalLinkText string // The text to show in the NamespaceDashboard ConsoleLink providing info about the current application category // in the Application Portal when category is Undefined ApplicationCategoryUndefinedLinkText string // The text to show in the NamespaceDashboard ConsoleLink providing info about the current application category // in the Application Portal when category is Test ApplicationCategoryTestLinkText string // The text to show in the NamespaceDashboard ConsoleLink providing info about the current application category // in the Application Portal when category is Personal ApplicationCategoryPersonalLinkText string // The text to show in the NamespaceDashboard ConsoleLink providing info about the current application category // in the Application Portal when category is Official ApplicationCategoryOfficialLinkText string }
ProjectLifecyclePolicyReconciler reconciles a ProjectLifecyclePolicy object
func (*ProjectLifecyclePolicyReconciler) SetupWithManager ¶
func (r *ProjectLifecyclePolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.