Skip to content

Commit fe55869

Browse files
committed
fix: Allow custom annotations to Operator installed objects
Signed-off-by: Tommy Hughes <tohughes@redhat.com>
1 parent 4361359 commit fe55869

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

infra/feast-operator/internal/controller/services/client.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ func (feast *FeastServices) createCaConfigMap() error {
7070
}
7171

7272
func (feast *FeastServices) setCaConfigMap(cm *corev1.ConfigMap) error {
73-
cm.Labels = map[string]string{
74-
NameLabelKey: feast.Handler.FeatureStore.Name,
75-
}
76-
cm.Annotations = map[string]string{
77-
"service.beta.openshift.io/inject-cabundle": "true",
73+
cm.Labels = feast.getLabels()
74+
if len(cm.Annotations) == 0 {
75+
cm.Annotations = map[string]string{}
7876
}
77+
cm.Annotations["service.beta.openshift.io/inject-cabundle"] = "true"
7978
return controllerutil.SetControllerReference(feast.Handler.FeatureStore, cm, feast.Handler.Scheme)
8079
}
8180

infra/feast-operator/internal/controller/services/services.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,10 @@ func (feast *FeastServices) setInitContainer(podSpec *corev1.PodSpec, fsYamlB64
586586
func (feast *FeastServices) setService(svc *corev1.Service, feastType FeastServiceType) error {
587587
svc.Labels = feast.getFeastTypeLabels(feastType)
588588
if feast.isOpenShiftTls(feastType) {
589-
svc.Annotations = map[string]string{
590-
"service.beta.openshift.io/serving-cert-secret-name": svc.Name + tlsNameSuffix,
589+
if len(svc.Annotations) == 0 {
590+
svc.Annotations = map[string]string{}
591591
}
592+
svc.Annotations["service.beta.openshift.io/serving-cert-secret-name"] = svc.Name + tlsNameSuffix
592593
}
593594

594595
var port int32 = HttpPort

0 commit comments

Comments
 (0)