{"modulePath":"github.com/devfile/devworkspace-operator","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package constants\n\nPackage constants defines constant values used throughout the DevWorkspace Operator\n\n## Constants\n\n```go\nconst (\n\t// DevWorkspaceStorageTypeAttribute defines the strategy used for provisioning storage for the workspace.\n\t// If empty, the common PVC strategy is used.\n\t// Supported options:\n\t// - \"common\":        Create one PVC per namespace, and store data for all workspaces in that namespace in that PVC\n\t// - \"async\" :        Create one PVC per namespace, and create a remote server that syncs data from workspaces to the PVC.\n\t//                    All volumeMounts used for devworkspaces are emptyDir\n\t// - \"per-workspace\": Create one PVC per workspace, delete that PVC when the workspace is deleted.\n\t// - \"ephemeral\":     Use emptyDir volumes for all volumes in the DevWorkspace. All data is lost when the workspace is\n\t//                    stopped.\n\tDevWorkspaceStorageTypeAttribute = \"controller.devfile.io/storage-type\"\n\n\t// ExternalDevWorkspaceConfiguration is an attribute that allows for specifying an (optional) external DevWorkspaceOperatorConfig\n\t// which will merged with the internal/global DevWorkspaceOperatorConfig. The DevWorkspaceOperatorConfig resulting from the merge will be used for the workspace.\n\t// The fields which are set in the external DevWorkspaceOperatorConfig will overwrite those existing in the\n\t// internal/global DevWorkspaceOperatorConfig during the merge.\n\t// The structure of the attribute value should contain two strings: name and namespace.\n\t// 'name' specifies the metadata.name of the external operator configuration.\n\t// 'namespace' specifies the metadata.namespace of the external operator configuration                                                                           .\n\t// For example:\n\t//\n\t//   attributes:\n\t//     controller.devfile.io/devworkspace-config:\n\t//         name: external-dwoc-name\n\t//         namespace: some-namespace\n\tExternalDevWorkspaceConfiguration = \"controller.devfile.io/devworkspace-config\"\n\n\t// RuntimeClassNameAttribute is an attribute added to a DevWorkspace to specify a runtimeClassName for container\n\t// components in the DevWorkspace (pod.spec.runtimeClassName). If empty, no runtimeClassName is added.\n\tRuntimeClassNameAttribute = \"controller.devfile.io/runtime-class\"\n\n\t// WorkspaceEnvAttribute is an attribute that specifies a set of environment variables provided by a component\n\t// that should be added to all workspace containers. The structure of the attribute value should be a list of\n\t// Devfile 2.0 EnvVar, e.g.\n\t//\n\t//   attributes:\n\t//     workspaceEnv:\n\t//       - name: ENV_1\n\t//         value: VAL_1\n\t//       - name: ENV_2\n\t//         value: VAL_2\n\tWorkspaceEnvAttribute = \"workspaceEnv\"\n\n\t// WorkspaceSCCAttribute defines additional SCCs that should be added to the DevWorkspace. The user adding\n\t// this attribute to a workspace must have the RBAC permissions to \"use\" the SCC with the given name. For example,\n\t// to add the 'anyuid' SCC to the workspace Pod, the DevWorkspace should contain\n\t//\n\t//     spec:\n\t//       template:\n\t//         attributes:\n\t//           controller.devfile.io/scc: \"anyuid\"\n\t//\n\t// Creating a workspace with this attribute, or updating an existing workspace to include this attribute will fail\n\t// if the user making the request does not have the \"use\" permission for the \"anyuid\" SCC.\n\t// Only supported on OpenShift.\n\tWorkspaceSCCAttribute = \"controller.devfile.io/scc\"\n\n\t// ProjectCloneAttribute configures how the DevWorkspace will treat project cloning. By default, an init container\n\t// will be added to the workspace deployment to clone projects to the workspace before it starts. This attribute\n\t// must be applied to top-level attributes field in the DevWorkspace.\n\t// Supported options:\n\t// - \"disable\" - Disable automatic project cloning. No init container will be added to the workspace and projects\n\t//               will not be cloned into the workspace on start.\n\tProjectCloneAttribute = \"controller.devfile.io/project-clone\"\n\n\t// PluginSourceAttribute is an attribute added to components, commands, and projects in a flattened\n\t// DevWorkspace representation to signify where the respective component came from (i.e. which plugin\n\t// or parent imported it)\n\tPluginSourceAttribute = \"controller.devfile.io/imported-by\"\n\n\t// EndpointURLAttribute is an attribute added to endpoints to denote the endpoint on the cluster that\n\t// was created to route to this endpoint\n\tEndpointURLAttribute = \"controller.devfile.io/endpoint-url\"\n\n\t// ContainerContributionAttribute defines a container component as a container contribution that should be merged\n\t// into an existing container in the devfile if possible. If no suitable container exists, this component\n\t// is treated as a regular container component\n\tContainerContributionAttribute = \"controller.devfile.io/container-contribution\"\n\n\t// MergeContributionAttribute defines a container component as a target for merging a container contribution. If\n\t// present on a container component, any container contributions will be merged into that container. If multiple\n\t// container components have the merge-contribution attribute, the first one will be used and all others ignored.\n\tMergeContributionAttribute = \"controller.devfile.io/merge-contribution\"\n\n\t// MergedContributionsAttribute is applied as an attribute onto a component to list the components from the unflattened\n\t// DevWorkspace that have been merged into the current component. The contributions are listed in a comma-separated list.\n\tMergedContributionsAttribute = \"controller.devfile.io/merged-contributions\"\n\n\t// PodOverridesAttribute is an attribute applied to a container component or in global attributes to specify overrides\n\t// for the pod spec used in the main workspace deployment. The format of the field is the same as the Kubernetes\n\t// PodSpec API. Overrides are applied over the default pod template spec used via strategic merge patch.\n\t//\n\t// If this attribute is used multiple times, all overrides are applied in the order they are defined in the DevWorkspace,\n\t// with later values overriding previous ones. Overrides defined in the top-level attributes field are applied last and\n\t// override any overrides from container components.\n\t//\n\t// Example:\n\t//   kind: DevWorkspace\n\t//   apiVersion: workspace.devfile.io/v1alpha2\n\t//   spec:\n\t//     template:\n\t//       attributes:\n\t//         pod-overrides:\n\t//           metadata:\n\t//             annotations:\n\t//               io.openshift.userns: \"true\"\n\t//               io.kubernetes.cri-o.userns-mode: \"auto:size=65536;map-to-root=true\"  # \u003c-- user namespace\n\t//               openshift.io/scc: container-build\n\t//           spec:\n\t//             runtimeClassName: kata\n\t//             schedulerName: stork\n\tPodOverridesAttribute = \"pod-overrides\"\n\n\t// ContainerOverridesAttribute is an attribute applied to a container component to specify arbitrary fields in that\n\t// container. This attribute should only be used to set fields that are not configurable in the container component\n\t// itself. Any values specified in the overrides attribute overwrite fields on the container.\n\t//\n\t// Example:\n\t//   components:\n\t//     - name: go\n\t//       attributes:\n\t//         container-overrides: {\"resources\":{\"limits\":{\"nvidia.com/gpu\": \"1\"}}}\n\t//       container:\n\t//         image: ...\n\tContainerOverridesAttribute = \"container-overrides\"\n\n\t// StarterProjectAttribute is an attribute applied to the top-level attributes in a DevWorkspace to specify which\n\t// starterProject in the workspace should be cloned.\n\tStarterProjectAttribute = \"controller.devfile.io/use-starter-project\"\n\n\t// BootstrapDevWorkspaceAttribute is an attribute applied to the top-level attributes in a DevWorkspace to configure\n\t// the project-clone container to \"bootstrap\" the DevWorkspace from a devfile.yaml or .devfile.yaml file at the root\n\t// of a cloned project. If the bootstrap process is successful, project-clone will automatically remove this attribute\n\t// from the DevWorkspace\n\tBootstrapDevWorkspaceAttribute = \"controller.devfile.io/bootstrap-devworkspace\"\n\n\t// WorkspaceRestoreAttribute defines whether workspace restore should be performed for a DevWorkspace.\n\t// If this attribute is present and set to true, the restore process will be performed during\n\t// workspace initialization, before workspace containers start.\n\t//\n\t// The backup source is automatically determined from the cluster configuration unless overridden\n\t// by WorkspaceRestoreSourceImageAttribute.\n\tWorkspaceRestoreAttribute = \"controller.devfile.io/restore-workspace\"\n\n\t// WorkspaceRestoreSourceImageAttribute defines the backup image source to restore from for a DevWorkspace.\n\t// The value should be a container image reference containing a workspace backup created by the backup functionality.\n\t// The restore will be performed during workspace initialization before the workspace containers start.\n\t// For example:\n\t//\n\t//     spec:\n\t//       template:\n\t//         attributes:\n\t//           controller.devfile.io/restore-source-image: \"registry.example.com/backups/my-workspace:20241111-123456\"\n\t//\n\tWorkspaceRestoreSourceImageAttribute = \"controller.devfile.io/restore-source-image\"\n\n\t// MountOnStartAttribute is an attribute applied to Kubernetes resources to indicate that they should only\n\t// be mounted to a workspace when it starts. When this attribute is set to \"true\", newly created\n\t// resources will not be automatically mounted to running workspaces, preventing unwanted workspace\n\t// restarts.\n\tMountOnStartAttribute = \"controller.devfile.io/mount-on-start\"\n)\n```\nConstants that are used in attributes on DevWorkspace elements (components, endpoints, etc.)\n\n```go\nconst (\n\tDefaultProjectsSourcesRoot = \"/projects\"\n\n\tHomeUserDirectory = \"/home/user/\"\n\n\tHomeVolumeName = \"persistent-home\"\n\n\tHomeInitComponentName = \"init-persistent-home\"\n\n\tHomeInitEventId = \"init-persistent-home\"\n\n\tDefaultDisableHomeInitContainer = false\n\n\tSshAgentStartEventId = \"init-ssh-agent-command\"\n\n\tServiceAccount = \"devworkspace\"\n\n\tPVCStorageSize = \"10Gi\"\n\n\t// DevWorkspaceIDLoggerKey is the key used to log workspace ID in the reconcile\n\tDevWorkspaceIDLoggerKey = \"devworkspace_id\"\n\n\t// ControllerServiceAccountNameEnvVar stores the name of the serviceaccount used in the controller.\n\tControllerServiceAccountNameEnvVar = \"CONTROLLER_SERVICE_ACCOUNT_NAME\"\n\n\t// PVCCleanupPodMemoryLimit is the memory limit used for PVC clean up pods\n\tPVCCleanupPodMemoryLimit = \"100Mi\"\n\n\t// PVCCleanupPodMemoryRequest is the memory request used for PVC clean up pods\n\tPVCCleanupPodMemoryRequest = \"32Mi\"\n\n\t// PVCCleanupPodCPULimit is the cpu limit used for PVC clean up pods\n\tPVCCleanupPodCPULimit = \"50m\"\n\n\t// PVCCleanupPodCPURequest is the cpu request used for PVC clean up pods\n\tPVCCleanupPodCPURequest = \"5m\"\n\n\t// DefaultWorkspacePVCName is the default name of the PVC used for workspaces\n\tDefaultWorkspacePVCName = \"claim-devworkspace\"\n\n\t// CommonStorageClassType defines the 'common' storage policy, which is an alias of the 'per-user' storage policy, and operates in the same fashion as the 'per-user' storage policy.\n\t// The 'common' storage policy exists only for legacy compatibility.\n\tCommonStorageClassType = \"common\"\n\t// PerUserStorageClassType defines the 'per-user' storage policy -- one PVC is provisioned per namespace and all devworkspace storage\n\t// is mounted in it on subpaths according to devworkspace ID.\n\tPerUserStorageClassType = \"per-user\"\n\t// AsyncStorageClassType defines the 'asynchronous' storage policy. An rsync sidecar is added to devworkspaces that uses SSH to connect\n\t// to a storage deployment that mounts a common PVC for the namespace.\n\tAsyncStorageClassType = \"async\"\n\t// EphemeralStorageClassType defines the 'ephemeral' storage policy: all volumes are allocated as emptyDir volumes and\n\t// so do not require cleanup. When a DevWorkspace is stopped, all local changes are lost.\n\tEphemeralStorageClassType = \"ephemeral\"\n\t// PerWorkspaceStorageClassType defines the 'per-workspace' storage policy: a PVC is provisioned for each workspace within the namespace.\n\t// All of the workspace's storage (volume mounts) are mounted on subpaths within the workspace's PVC.\n\tPerWorkspaceStorageClassType = \"per-workspace\"\n\n\t// CheCommonPVCName is the name of the common PVC equivalent used by Che. If present in the namespace, this PVC is mounted instead\n\t// of the default PVC when the 'common' or 'async' storage classes are used.\n\tCheCommonPVCName = \"claim-che-workspace\"\n\n\t// ProjectCloneDisable specifies that project cloning should be disabled.\n\tProjectCloneDisable = \"disable\"\n\n\t// DefaultHostUsers is the default value for spec.hostUsers in pod security context.\n\t// When true (default), containers run in the host's user namespace. When false,\n\t// Kubernetes creates a dedicated user namespace for the pod (requires user namespace support).\n\t// See: https://kubernetes.io/docs/concepts/workloads/pods/user-namespaces/\n\tDefaultHostUsers = true\n\n\t// RegistryAuthVolumeName is the name of the volume where registry auth secrets are mounted\n\tRegistryAuthVolumeName = \"registry-auth-secret\"\n\n\t//Role kind\n\tRbacRoleKind = \"Role\"\n\t// ClusterRole kind\n\tRbacClusterRoleKind = \"ClusterRole\"\n\n\t// DefaultNetworkPolicyEnabled defines the default value for the Enabled field,\n\t// disabling NetworkPolicy provisioning into DevWorkspace namespaces by default.\n\tDefaultNetworkPolicyEnabled = false\n)\n```\nInternal constants\n\n```go\nconst (\n\t// DevWorkspaceNamespace contains env var name which value is the current namespace where DevWorkspace CR\n\t// and related objects live\n\tDevWorkspaceNamespace = \"DEVWORKSPACE_NAMESPACE\"\n\n\t// DevWorkspaceId contains env var name which which value is the .status.devworkspaceId of the related\n\t// DevWorkspace CR. It can be used to list related objects with WorkspaceIDLabel selector\n\tDevWorkspaceId = \"DEVWORKSPACE_ID\"\n\n\t// DevWorkspaceName contains env var name which value is name of the related DevWorkspace CR.\n\t// It can be used to list related objects with WorkspaceNameLabel selector\n\tDevWorkspaceName = \"DEVWORKSPACE_NAME\"\n\n\t// DevWorkspaceCreator contains env var name which value is the uid of the identity who created the related devworkspace\n\tDevWorkspaceCreator = \"DEVWORKSPACE_CREATOR\"\n\n\t// DevWorkspaceIdleTimeout contains env var name which value is the suggested idle timeout\n\tDevWorkspaceIdleTimeout = \"DEVWORKSPACE_IDLE_TIMEOUT\"\n\n\t// DevWorkspaceHostUsers contains the env var name whose value indicates whether the container\n\t// runs in the host's user namespace. When set to \"false\", container images should adjust their\n\t// logic to work in a dedicated user namespace (e.g., file permissions, UID/GID handling).\n\t// See: https://github.com/devfile/developer-images/pull/232\n\tDevWorkspaceHostUsers = \"HOST_USERS\"\n\n\t// DevWorkspaceComponentName contains env var name which indicates from which devfile container component\n\t// the container is created from. Note the flattened devfile is used to evaluate it.\n\tDevWorkspaceComponentName = \"DEVWORKSPACE_COMPONENT_NAME\"\n\tDISPLAY                   = \"DISPLAY\"\n\tSSHAskPass                = \"SSH_ASKPASS\"\n)\n```\n\n```go\nconst (\n\t// StorageCleanupFinalizer is used to block DevWorkspace deletion when it is necessary\n\t// to clean up persistent storage used for the workspace.\n\tStorageCleanupFinalizer = \"storage.controller.devfile.io\"\n\t// ServiceAccountCleanupFinalizer is used to block DevWorkspace deletion when it is\n\t// necessary to clean up additional non-workspace roles added to the workspace\n\t// serviceaccount\n\t//\n\t// Deprecated: Will not be added to new workspaces but needs to be tracked for\n\t// removal to ensure workspaces that used it previously will be cleaned up.\n\tServiceAccountCleanupFinalizer = \"serviceaccount.controller.devfile.io\"\n\t// RBACCleanupFinalizer is used to block DevWorkspace deletion in order to ensure\n\t// the workspace role and rolebinding are cleaned up correctly. Since each workspace\n\t// serviceaccount is added to the workspace rolebinding, it is necessary to remove it\n\t// when a workspace is deleted\n\tRBACCleanupFinalizer = \"rbac.controller.devfile.io\"\n)\n```\n\n```go\nconst (\n\t// DevWorkspaceIDLabel is the label key to store workspace identifier\n\tDevWorkspaceIDLabel = \"controller.devfile.io/devworkspace_id\"\n\n\t// DevWorkspacePVCTypeLabel is the label key to identify PVCs used by DevWorkspaces and indicate their storage strategy.\n\tDevWorkspacePVCTypeLabel = \"controller.devfile.io/devworkspace_pvc_type\"\n\n\t// WorkspaceIdOverrideAnnotation is an annotation that can be applied to DevWorkspaces\n\t// to override the default DevWorkspace ID assigned by the Operator. Is only respected\n\t// when a DevWorkspace is created. Once a DevWorkspace has an ID set, it cannot be changed.\n\tWorkspaceIdOverrideAnnotation = \"controller.devfile.io/devworkspace_id_override\"\n\n\t// DevWorkspaceCreatorLabel is the label key for storing the UID of the user who created the workspace\n\tDevWorkspaceCreatorLabel = \"controller.devfile.io/creator\"\n\n\t// DevWorkspaceNameLabel is the label key to store workspace name\n\tDevWorkspaceNameLabel = \"controller.devfile.io/devworkspace_name\"\n\n\t// DevWorkspaceWatchCronJobLabel marks a cronjob so that it is watched by the controller. This label is required on all\n\t// cronjobs that should be seen by the controller\n\tDevWorkspaceWatchCronJobLabel = \"controller.devfile.io/watch-cronjob\"\n\n\t// DevWorkspaceWatchConfigMapLabel marks a configmap so that it is watched by the controller. This label is required on all\n\t// configmaps that should be seen by the controller\n\tDevWorkspaceWatchConfigMapLabel = \"controller.devfile.io/watch-configmap\"\n\n\t// DevWorkspaceWatchSecretLabel marks a secret so that it is watched by the controller. This label is required on all\n\t// secrets that should be seen by the controller\n\tDevWorkspaceWatchSecretLabel = \"controller.devfile.io/watch-secret\"\n\n\t// DevWorkspaceMountLabel is the label key to store if a configmap, secret, or PVC should be mounted to the devworkspace\n\tDevWorkspaceMountLabel = \"controller.devfile.io/mount-to-devworkspace\"\n\n\t// DevWorkspaceMountIncludeAnnotation is an annotation to configure which DevWorkspaces an automount\n\t// resource should be mounted to. The value is a comma-separated list of patterns matched against\n\t// the DevWorkspace name. The resource is only mounted to workspaces whose name matches at least one pattern.\n\t// Supported patterns:\n\t// - exact match `name`\n\t// - prefix match `name*`\n\t// - suffix match `*name`\n\t// - contains match `*name*`\n\t// - matches all workspaces `*`\n\tDevWorkspaceMountIncludeAnnotation = \"controller.devfile.io/mount-to-devworkspace-include\"\n\n\t// DevWorkspaceMountExcludeAnnotation is an annotation to configure which DevWorkspaces an automount\n\t// resource should NOT be mounted to. The value is a comma-separated list of patterns matched against\n\t// the DevWorkspace name. The resource is not mounted to workspaces whose name matches any pattern.\n\t// Supported patterns:\n\t// - exact match `name`\n\t// - prefix match `name*`\n\t// - suffix match `*name`\n\t// - contains match `*name*`\n\t// - matches all workspaces `*`\n\tDevWorkspaceMountExcludeAnnotation = \"controller.devfile.io/mount-to-devworkspace-exclude\"\n\n\t// DevWorkspaceMountPathAnnotation is the annotation key to store the mount path for the secret or configmap.\n\t// If no mount path is provided, configmaps will be mounted at /etc/config/\u003cconfigmap-name\u003e, secrets will\n\t// be mounted at /etc/secret/\u003csecret-name\u003e, and persistent volume claims will be mounted to /tmp/\u003cclaim-name\u003e\n\tDevWorkspaceMountPathAnnotation = \"controller.devfile.io/mount-path\"\n\n\t// DevWorkspaceMountAsAnnotation is the annotation key to configure the way how configmaps or secrets should be mounted.\n\t// Supported options:\n\t// - \"env\" - mount as environment variables\n\t// - \"file\" - mount as files within the mount path\n\t// - \"subpath\" - mount keys as subpath volume mounts within the mount path\n\t// When a configmap or secret is mounted via \"file\", the keys within the configmap/secret are mounted as files\n\t// within a directory, erasing all contents of the directory. Mounting via \"subpath\" leaves existing files in the\n\t// mount directory changed, but prevents on-cluster changes to the configmap/secret propagating to the container\n\t// until it is restarted.\n\t// If mountAs is not provided, the default behaviour will be to mount as a file.\n\tDevWorkspaceMountAsAnnotation = \"controller.devfile.io/mount-as\"\n\n\t// DevWorkspaceMountAccessModeAnnotation is an annotation key used to configure the access mode for configmaps and\n\t// secrets mounted using the 'controller.devfile.io/mount-to-devworkspace' annotation. The access mode annotation\n\t// can either be specified as a decimal (e.g. '416') or as an octal by prefixing the number with zero (e.g. '0640')\n\tDevWorkspaceMountAccessModeAnnotation = \"controller.devfile.io/mount-access-mode\"\n\n\t// DevWorkspaceValidatedK8sResourcesAnnotation is the annotation key used to store the list of\n\t// Kubernetes resources that have been validated by the mutating webhook via SubjectAccessReview.\n\t// The controller uses this to determine which objects the workspace creator is authorized to create.\n\tDevWorkspaceValidatedK8sResourcesAnnotation = \"controller.devfile.io/validated-kubernetes-resources\"\n\t// DevWorkspaceValidatedSCCAnnotation is the annotation key used to store the SecurityContextConstraints\n\t// that have been validated by the mutating webhook via SubjectAccessReview.\n\tDevWorkspaceValidatedSCCAnnotation = \"controller.devfile.io/validated-scc\"\n\n\t// DevWorkspaceGitCredentialLabel is the label key to specify if the secret is a git credential. All secrets who\n\t// specify this label in a namespace will consolidate into one secret before mounting into a devworkspace.\n\t// Only secret data with the credentials key will be used and credentials must be the base64 encoded version\n\t//\tof https://{USERNAME}:{PERSONAL_ACCESS_TOKEN}@{GIT_WEBSITE}\n\t// E.g. echo -n \"https://{USERNAME}:{PERSONAL_ACCESS_TOKEN}@{GIT_WEBSITE}\" | base64\n\t// see https://git-scm.com/docs/git-credential-store#_storage_format for more details\n\tDevWorkspaceGitCredentialLabel = \"controller.devfile.io/git-credential\"\n\n\t// DevWorkspaceGitTLSLabel is the label key to specify if the configmap is credentials for accessing a git server.\n\t// Configmap must contain the following data:\n\t// certificate: the certificate used to access the git server in Base64 ASCII\n\t// You can also optionally define the git host.\n\t// host: the url of the git server\n\t// If the git host is not defined then the certificate will be used for all http repositories.\n\tDevWorkspaceGitTLSLabel = \"controller.devfile.io/git-tls-credential\"\n\n\t// GitCredentialsConfigMapName is the name used for the configmap that stores the Git configuration for workspaces\n\t// in a given namespace. It is used when e.g. adding Git credentials via secret\n\tGitCredentialsConfigMapName = \"devworkspace-gitconfig\"\n\n\t// SSHSecretName is the name used for the secret that stores the SSH key data for workspaces in a given namespace.\n\t// TODO: This is a workaround for https://github.com/devfile/devworkspace-operator/issues/1340.\n\t// We do not enforce the SSH secret to have this name, but it is used by the Che Dashboard and this allows us\n\t// to detect if the user has provided an SSH key with a passhprase.\n\tSSHSecretName = \"git-ssh-key\"\n\n\t// SSHSecretPassphraseKey is the key used to retrieve the optional passphrase stored inside the SSH secret.\n\tSSHSecretPassphraseKey = \"passphrase\"\n\n\tSshAskPassConfigMapName = \"devworkspace-ssh-askpass\"\n\n\t// GitCredentialsMergedSecretName is the name for the merged Git credentials secret that is mounted to workspaces\n\t// when Git credentials are defined. This secret combines the values of any secrets labelled\n\t// \"controller.devfile.io/git-credential\"\n\tGitCredentialsMergedSecretName = \"devworkspace-merged-git-credentials\"\n\n\t// DevWorkspaceMountAsEnv is the annotation value for DevWorkspaceMountAsAnnotation to mount the resource as environment variables\n\t// via envFrom\n\tDevWorkspaceMountAsEnv = \"env\"\n\t// DevWorkspaceMountAsFile is the annotation value for DevWorkspaceMountAsAnnotation to mount the resource as files\n\tDevWorkspaceMountAsFile = \"file\"\n\t// DevWorkspaceMountAsSubpath is the annotation value for DevWorkspaceMountAsAnnotation to mount the resource as files using subpath\n\t// mounts\n\tDevWorkspaceMountAsSubpath = \"subpath\"\n\n\t// DevWorkspaceMountReadyOnlyAnnotation is an annotation to configure whether a mounted volume is as read-write or\n\t// as read-only. If \"true\", the volume is mounted as read-only. PersistentVolumeClaims are by default mounted\n\t// read-write. Automounted configmaps and secrets are always mounted read-only and this annotation is ignored.\n\tDevWorkspaceMountReadyOnlyAnnotation = \"controller.devfile.io/read-only\"\n\n\t// DevWorkspaceRestrictedAccessAnnotation marks the intention that devworkspace access is restricted to only the creator; setting this\n\t// annotation will cause devworkspace start to fail if webhooks are disabled.\n\t// Operator also propagates it to the devworkspace-related objects to perform authorization.\n\tDevWorkspaceRestrictedAccessAnnotation = \"controller.devfile.io/restricted-access\"\n\n\t// DevWorkspaceStartedStatusAnnotation is applied to subresources of DevWorkspaces to indicate the owning object's\n\t// .spec.started value. This annotation is applied to DevWorkspaceRoutings to trigger reconciles when a DevWorkspace\n\t// is started or stopped.\n\tDevWorkspaceStartedStatusAnnotation = \"controller.devfile.io/devworkspace-started\"\n\n\t// DevWorkspaceStopReasonAnnotation marks the reason why the devworkspace was stopped; when a devworkspace is restarted\n\t// this annotation will be cleared\n\tDevWorkspaceStopReasonAnnotation = \"controller.devfile.io/stopped-by\"\n\n\t// DevWorkspaceDebugStartAnnotation enables debugging workspace startup if set to \"true\". If a workspace with this annotation\n\t// fails to start (i.e. enters the \"Failed\" phase), its deployment will not be scaled down in order to allow viewing logs, etc.\n\tDevWorkspaceDebugStartAnnotation = \"controller.devfile.io/debug-start\"\n\n\t// WebhookRestartedAtAnnotation holds the time (unixnano) of when the webhook server was forced to restart by controller\n\tWebhookRestartedAtAnnotation = \"controller.devfile.io/restarted-at\"\n\n\t// DevWorkspaceStartedAtAnnotation holds the time (unixnano) of when the devworkspace was started\n\tDevWorkspaceStartedAtAnnotation = \"controller.devfile.io/started-at\"\n\n\t// RoutingAnnotationInfix is the infix of the annotations of DevWorkspace that are passed down as annotation to the DevWorkspaceRouting objects.\n\t// The full annotation name is supposed to be \"\u003croutingClass\u003e.routing.controller.devfile.io/\u003canything\u003e\"\n\tRoutingAnnotationInfix = \".routing.controller.devfile.io/\"\n\n\t// DevWorkspaceEndpointNameAnnotation is the annotation key for storing an endpoint's name from the devfile representation\n\tDevWorkspaceEndpointNameAnnotation = \"controller.devfile.io/endpoint_name\"\n\n\t// DevWorkspaceDiscoverableServiceAnnotation marks a service in a devworkspace as created for a discoverable endpoint,\n\t// as opposed to a service created to support the devworkspace itself.\n\tDevWorkspaceDiscoverableServiceAnnotation = \"controller.devfile.io/discoverable-service\"\n\n\t// DevWorkspacePullSecretLabel marks the intention that this secret should be used as a pull secret for devworkspaces within namespace\n\t// Only secrets with 'true' value will be mount as pull secret\n\t// Should be assigned to secrets with type docker config types (kubernetes.io/dockercfg and kubernetes.io/dockerconfigjson)\n\tDevWorkspacePullSecretLabel = \"controller.devfile.io/devworkspace_pullsecret\"\n\n\t// NamespacedConfigLabelKey is a label applied to configmaps to mark them as a configuration for all DevWorkspaces in\n\t// the current namespace.\n\tNamespacedConfigLabelKey = \"controller.devfile.io/namespaced-config\"\n\n\t// NamespacePodTolerationsAnnotation is an annotation applied to a namespace to configure pod tolerations for all workspaces\n\t// in that namespace. Value should be json-encoded []corev1.Toleration struct.\n\tNamespacePodTolerationsAnnotation = \"controller.devfile.io/pod-tolerations\"\n\n\t// NamespaceNodeSelectorAnnotation is an annotation applied to a namespace to configure the node selector for all workspaces\n\t// in that namespace. Value should be json-encoded map[string]string\n\tNamespaceNodeSelectorAnnotation = \"controller.devfile.io/node-selector\"\n\n\t// DevWorkspaceBackupJobNamePrefix is the prefix used for backup jobs created for DevWorkspaces\n\tDevWorkspaceBackupJobNamePrefix = \"devworkspace-backup-\"\n\n\t// DevWorkspaceBackupJobLabel is the label key to identify backup jobs created for DevWorkspaces\n\tDevWorkspaceBackupJobLabel = \"controller.devfile.io/backup-job\"\n\n\tDevWorkspaceBackupAuthSecretName = \"devworkspace-backup-registry-auth\"\n\n\t// DevWorkspaceLastBackupSuccessfulAnnotation is an annotation that indicates whether the last backup\n\t// attempt for this DevWorkspace was successful. Value is either \"true\" or \"false\".\n\tDevWorkspaceLastBackupSuccessfulAnnotation = \"controller.devfile.io/last-backup-successful\"\n\n\t// DevWorkspaceLastBackupFinishedAtAnnotation is an annotation that stores the timestamp (in RFC3339Nano format)\n\t// of when the last backup finished for this DevWorkspace (whether it completed successfully or failed).\n\tDevWorkspaceLastBackupFinishedAtAnnotation = \"controller.devfile.io/last-backup-finished-at\"\n\n\t// DevWorkspaceLastBackupErrorAnnotation is an annotation that stores the error message from the last\n\t// failed backup attempt. This annotation is only present when the last backup failed, and is cleared\n\t// when a backup succeeds.\n\tDevWorkspaceLastBackupErrorAnnotation = \"controller.devfile.io/last-backup-error\"\n)\n```\nConstants that are used in labels and annotations on DevWorkspace-related resources.\n\n```go\nconst (\n\t// SelectedNodeAnnotation annotation is added to a PVC that is triggered by a scheduler to be dynamically provisioned. Its value is the name of the selected node.\n\tSelectedNodeAnnotation = \"volume.kubernetes.io/selected-node\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// Maximum number of unavailable workspace pods when using the RollingUpdate deployment strategy\n\tRollingUpdateMaxUnavailable = intstr.FromInt(0)\n\t// Maximum number of excesss workspace pods when using the RollingUpdate deployment strategy\n\tRollingUpdateMaximumSurge = intstr.FromInt(1)\n)\n```\n\n```go\nvar ControllerAppLabels = func() map[string]string {\n\treturn map[string]string{\n\t\t\"app.kubernetes.io/name\":    \"devworkspace-controller\",\n\t\t\"app.kubernetes.io/part-of\": \"devworkspace-operator\",\n\t}\n}\n```\nLabels which should be used for controller related objects\n\n","path":"github.com/devfile/devworkspace-operator/pkg/constants","name":"constants","synopsis":"Package constants defines constant values used throughout the DevWorkspace Operator","isRedistributable":true}
