Skip to content

Commit b06a3d8

Browse files
Merge pull request #1225 from vrutkovs/annotate-image-registry-ca
NO-JIRA: Set ownership annotation for image-registry-ca CA bundle
2 parents 0aa1f86 + a2fec9e commit b06a3d8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/resource/caconfig.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
restclient "k8s.io/client-go/rest"
1515
"k8s.io/klog/v2"
1616

17+
"github.com/openshift/api/annotations"
1718
operatorv1 "github.com/openshift/api/operator/v1"
1819
configlisters "github.com/openshift/client-go/config/listers/config/v1"
1920
imageregistryv1listers "github.com/openshift/client-go/imageregistry/listers/imageregistry/v1"
@@ -105,6 +106,9 @@ func (gcac *generatorCAConfig) expected() (runtime.Object, error) {
105106
ObjectMeta: metav1.ObjectMeta{
106107
Name: gcac.GetName(),
107108
Namespace: gcac.GetNamespace(),
109+
Annotations: map[string]string{
110+
annotations.OpenShiftComponent: "Image Registry",
111+
},
108112
},
109113
Data: map[string]string{},
110114
BinaryData: map[string][]byte{},

pkg/resource/imageregistryca.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
restclient "k8s.io/client-go/rest"
1515
"k8s.io/klog/v2"
1616

17+
"github.com/openshift/api/annotations"
1718
operatorv1 "github.com/openshift/api/operator/v1"
1819
configlisters "github.com/openshift/client-go/config/listers/config/v1"
1920
imageregistryv1listers "github.com/openshift/client-go/imageregistry/listers/imageregistry/v1"
@@ -108,6 +109,9 @@ func (girca *generatorImageRegistryCA) expected() (runtime.Object, error) {
108109
ObjectMeta: metav1.ObjectMeta{
109110
Name: girca.GetName(),
110111
Namespace: girca.GetNamespace(),
112+
Annotations: map[string]string{
113+
annotations.OpenShiftComponent: "Image Registry",
114+
},
111115
},
112116
Data: map[string]string{},
113117
BinaryData: map[string][]byte{},

0 commit comments

Comments
 (0)