Skip to content

Commit

Permalink
Add constants for CCO namespace & deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
bentito committed Jun 27, 2023
1 parent 7d35d34 commit d3b7e82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions pkg/operator/constants/constants.go
Expand Up @@ -130,6 +130,12 @@ const (
// UpgradeableAnnotation is the annotation CCO will check for on the cloudcredential.operator.openshift.io
// CR when determining upgradeability.
UpgradeableAnnotation = "cloudcredential.openshift.io/upgradeable-to"

// CCONameSpace Namespace defined for CCO to use
CCONameSpace = "openshift-cloud-credential-operator"

// DeploymentName name of the CCO deployment
DeploymentName = "cloud-credential-operator"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions pkg/operator/platform/platform.go
Expand Up @@ -3,6 +3,7 @@ package platform
import (
"context"
"fmt"
"github.com/openshift/cloud-credential-operator/pkg/operator/constants"
"os"
"time"

Expand Down Expand Up @@ -99,8 +100,8 @@ func GetFeatureGates(ctx context.Context) (featuregates.FeatureGate, error) {
eventRecorder := events.NewKubeRecorder(kubeClient.CoreV1().Events("openshift-cloud-credential-operator"), "cloud-credential-operator", &corev1.ObjectReference{
APIVersion: "apps/v1",
Kind: "Deployment",
Namespace: "openshift-cloud-credential-operator",
Name: "cloud-credential-operator",
Namespace: constants.CCONameSpace,
Name: constants.DeploymentName,
})

// By default, this will exit(0) the process if the featuregates ever change to a different set of values.
Expand Down

0 comments on commit d3b7e82

Please sign in to comment.