Skip to content

Commit ccad50b

Browse files
committed
operator: use component annotation for ownership
Use "openshift.io/owning-component" annotation to set configmap ownership.
1 parent 31f8b5e commit ccad50b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/operator/sync.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"k8s.io/client-go/util/retry"
3535
"k8s.io/klog/v2"
3636

37+
"github.com/openshift/api/annotations"
3738
configv1 "github.com/openshift/api/config/v1"
3839
mcfgv1 "github.com/openshift/api/machineconfiguration/v1"
3940
opv1 "github.com/openshift/api/operator/v1"
@@ -402,7 +403,7 @@ func (optr *Operator) syncRenderConfig(_ *renderConfig, _ *configv1.ClusterOpera
402403
return err
403404
}
404405
cmAnnotations := make(map[string]string)
405-
cmAnnotations["openshift.io/description"] = "Created and managed by the machine-config-operator"
406+
cmAnnotations[annotations.OpenShiftComponent] = "Machine Config Operator"
406407
if err != nil && apierrors.IsNotFound(err) {
407408
klog.Infof("creating merged-trusted-image-registry-ca")
408409
_, err = optr.kubeClient.CoreV1().ConfigMaps("openshift-config-managed").Create(

0 commit comments

Comments
 (0)