Skip to content

Commit 7d07ee5

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/operator/sync.go

+2-1
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] = "openshift-apiserver"
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)