{"modulePath":"github.com/devfile/devworkspace-operator","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package common\n\n## Variables\n\n```go\nvar NonAlphaNumRegexp = regexp.MustCompile(`[^a-z0-9]+`)\n```\n\n## Functions\n\n```go\nfunc AutoMountConfigMapVolumeName(volumeName string) string\n```\n\n```go\nfunc AutoMountPVCVolumeName(pvcName string) string\n```\n\n```go\nfunc AutoMountProjectedVolumeName(mountPath string) string\n```\n\n```go\nfunc AutoMountSecretVolumeName(volumeName string) string\n```\n\n```go\nfunc DeploymentName(workspaceId string) string\n```\n\n```go\nfunc DevWorkspaceRoutingName(workspaceId string) string\n```\n\n```go\nfunc EndpointHostname(routingSuffix, workspaceId, endpointName string, endpointPort int) string\n```\n\n```go\nfunc EndpointName(endpointName string) string\n```\n\n```go\nfunc EndpointPath(endpointName string) string\n```\n\n```go\nfunc GetWorkspacePodAffinity(config *controllerv1alpha1.WorkspaceConfig) *corev1.Affinity\n```\nGetWorkspacePodAffinity returns the pod affinity to apply to pods created for a DevWorkspace, combining the podAffinity and podAntiAffinity rules configured on the workspace configuration. Returns nil if neither is configured, so that no affinity is set on the pod. The returned affinity never sets nodeAffinity: node affinity is computed by the operator (e.g. to target the node a PVC is attached to) and must not be overridden by configuration.\n\n```go\nfunc GetWorkspacePodAffinityWithNodeAffinity(config *controllerv1alpha1.WorkspaceConfig, nodeAffinity *corev1.NodeAffinity) *corev1.Affinity\n```\nGetWorkspacePodAffinityWithNodeAffinity returns the pod affinity to apply to pods created for a DevWorkspace, combining the podAffinity and podAntiAffinity rules configured on the workspace configuration with the operator-computed nodeAffinity (e.g. to target the node a PVC is attached to)\n\n```go\nfunc MetadataConfigMapName(workspaceId string) string\n```\n\n```go\nfunc NetworkPolicyName(workspaceId string) string\n```\n\n```go\nfunc OldWorkspaceRoleName() string\n```\nOldWorkspaceRoleName returns the name used for the workspace serviceaccount role\n\nDeprecated: use WorkspaceRoleName() instead. TODO: remove for DevWorkspace Operator v0.19\n\n```go\nfunc OldWorkspaceRolebindingName() string\n```\nOldWorkspaceRolebindingName returns the name used for the workspace serviceaccount rolebinding\n\nDeprecated: use WorkspaceRoleBindingName() instead. TODO: remove for DevWorkspace Operator v0.19\n\n```go\nfunc PVCCleanupJobName(workspaceId string) string\n```\n\n```go\nfunc PerWorkspacePVCName(workspaceId string) string\n```\n\n```go\nfunc PortName(endpoint dw.Endpoint) string\n```\n\n```go\nfunc RegistryImageBuilderRoleName() string\n```\n\n```go\nfunc RegistryImagePullerRoleName() string\n```\n\n```go\nfunc RegistryImagePullerRolebindingName(namespace string) string\n```\n\n```go\nfunc RouteName(workspaceId, endpointName string) string\n```\n\n```go\nfunc ServiceAccountLabels(workspace *DevWorkspaceWithConfig) map[string]string\n```\n\n```go\nfunc ServiceAccountName(workspace *DevWorkspaceWithConfig) string\n```\n\n```go\nfunc ServiceAccountTokenProjectionName(mountPath string) string\n```\n\n```go\nfunc ServiceName(workspaceId string) string\n```\n\n```go\nfunc ServingCertVolumeName(serviceName string) string\n```\n\n```go\nfunc WorkspaceHostname(routingSuffix, workspaceId string) string\n```\nWorkspaceHostname evaluates a single hostname for a workspace, and should be used for routing when endpoints are distinguished by path rules\n\n```go\nfunc WorkspaceRoleName() string\n```\n\n```go\nfunc WorkspaceRolebindingName() string\n```\n\n```go\nfunc WorkspaceSCCRoleName(sccName string) string\n```\n\n```go\nfunc WorkspaceSCCRolebindingName(sccName string) string\n```\n\n## Types\n\n```go\ntype DevWorkspaceWithConfig struct {\n\t*dw.DevWorkspace `json:\",inline\"`\n\tConfig           *controllerv1alpha1.OperatorConfiguration `json:\"resolvedConfig\"`\n}\n```\n\n","path":"github.com/devfile/devworkspace-operator/pkg/common","name":"common","synopsis":"","isRedistributable":true}
