{"modulePath":"github.com/devfile/devworkspace-operator","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package infrastructure\n\n## Constants\n\n```go\nconst (\n\tWatchNamespaceEnvVar = \"WATCH_NAMESPACE\"\n)\n```\n\n## Functions\n\n```go\nfunc GetNamespace() (string, error)\n```\nGetNamespace gets the namespace of the operator by checking GetOperatorNamespace and GetWatchNamespace in that order. Returns an error if both GetOperatorNamespace and GetWatchNamespace return an error.\n\n```go\nfunc GetOperatorNamespace() (string, error)\n```\nGetOperatorNamespace returns the namespace the operator should be running in.\n\nThis function was ported over from Operator SDK 0.17.0 and modified.\n\n```go\nfunc GetWatchNamespace() (string, error)\n```\nGetWatchNamespace returns the namespace the operator should be watching for changes\n\nThis function was ported over from Operator SDK 0.17.0\n\n```go\nfunc Initialize() error\n```\nInitialize attempts to determine the type of cluster its currently running on (OpenShift or Kubernetes). This function \\*must\\* be called before others; otherwise the call will panic.\n\n```go\nfunc InitializeForTesting(currentInfrastructure Type)\n```\nInitializeForTesting is used to mock running on a specific type of cluster (Kubernetes, OpenShift) in testing code.\n\n```go\nfunc IsInitialized() bool\n```\n\n```go\nfunc IsOpenShift() bool\n```\nIsOpenShift returns true if the current cluster is an OpenShift (v4.x) cluster.\n\n```go\nfunc IsWebhookConfigurationEnabled() (bool, error)\n```\nIsWebhookConfigurationEnabled returns true if both of mutating and validating webhook configurations are enabled\n\n## Types\n\n```go\ntype Type int\n```\nType specifies what kind of infrastructure we're operating in.\n\n```go\nconst (\n\t// Unsupported represents an Unsupported cluster version (e.g. OpenShift v3)\n\tUnsupported Type = iota\n\tKubernetes\n\tOpenShiftv4\n)\n```\n\n","path":"github.com/devfile/devworkspace-operator/pkg/infrastructure","name":"infrastructure","synopsis":"","isRedistributable":true}
