Skip to content

Commit 0fabf39

Browse files
makefile fixes
Signed-off-by: jamesmilligan <[email protected]>
1 parent 2404203 commit 0fabf39

File tree

2 files changed

+21
-29
lines changed

2 files changed

+21
-29
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ release-manifests: manifests kustomize
114114
fi
115115
@if [ ${KUSTOMIZE_OVERLAY} = HELM ]; then\
116116
echo building helm overlay;\
117-
$(KUSTOMIZE) build config/overlays/helm > config/rendered/release.yaml;\
117+
$(KUSTOMIZE) build config/overlays/helm > chart/templates/rendered.yaml;\
118118
fi
119119

120120
.PHONY: deploy
@@ -178,10 +178,9 @@ $(HELM): $(LOCALBIN)
178178

179179
.PHONY: set-helm-overlay
180180
set-helm-overlay:
181-
KUSTOMIZE_OVERLAY=HELM
181+
${eval KUSTOMIZE_OVERLAY = HELM}
182182

183183
helm-package: set-helm-overlay generate release-manifests helm
184-
cp config/rendered/release.yaml chart/templates/rendered.yaml
185184
$(HELM) package --version $(CHART_VERSION) chart
186185
mkdir -p charts && mv ofo-*.tgz charts
187186
$(HELM) repo index --url https://open-feature.github.io/open-feature-operator/charts charts

chart/templates/rendered.yaml

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
apiVersion: v1
2-
kind: Namespace
3-
metadata:
4-
labels:
5-
control-plane: controller-manager
6-
name: open-feature-operator-system
7-
---
81
apiVersion: apiextensions.k8s.io/v1
92
kind: CustomResourceDefinition
103
metadata:
@@ -262,13 +255,13 @@ apiVersion: v1
262255
kind: ServiceAccount
263256
metadata:
264257
name: open-feature-operator-controller-manager
265-
namespace: open-feature-operator-system
258+
namespace: '{{ include "chart.namespace" . }}'
266259
---
267260
apiVersion: rbac.authorization.k8s.io/v1
268261
kind: Role
269262
metadata:
270263
name: open-feature-operator-leader-election-role
271-
namespace: open-feature-operator-system
264+
namespace: '{{ include "chart.namespace" . }}'
272265
rules:
273266
- apiGroups:
274267
- ""
@@ -419,15 +412,15 @@ apiVersion: rbac.authorization.k8s.io/v1
419412
kind: RoleBinding
420413
metadata:
421414
name: open-feature-operator-leader-election-rolebinding
422-
namespace: open-feature-operator-system
415+
namespace: '{{ include "chart.namespace" . }}'
423416
roleRef:
424417
apiGroup: rbac.authorization.k8s.io
425418
kind: Role
426419
name: open-feature-operator-leader-election-role
427420
subjects:
428421
- kind: ServiceAccount
429422
name: open-feature-operator-controller-manager
430-
namespace: open-feature-operator-system
423+
namespace: '{{ include "chart.namespace" . }}'
431424
---
432425
apiVersion: rbac.authorization.k8s.io/v1
433426
kind: ClusterRoleBinding
@@ -441,7 +434,7 @@ subjects:
441434
- apiGroup: ""
442435
kind: ServiceAccount
443436
name: open-feature-operator-controller-manager
444-
namespace: system
437+
namespace: '{{ include "chart.namespace" . }}'
445438
---
446439
apiVersion: rbac.authorization.k8s.io/v1
447440
kind: ClusterRoleBinding
@@ -454,7 +447,7 @@ roleRef:
454447
subjects:
455448
- kind: ServiceAccount
456449
name: open-feature-operator-controller-manager
457-
namespace: open-feature-operator-system
450+
namespace: '{{ include "chart.namespace" . }}'
458451
---
459452
apiVersion: rbac.authorization.k8s.io/v1
460453
kind: ClusterRoleBinding
@@ -467,7 +460,7 @@ roleRef:
467460
subjects:
468461
- kind: ServiceAccount
469462
name: open-feature-operator-controller-manager
470-
namespace: open-feature-operator-system
463+
namespace: '{{ include "chart.namespace" . }}'
471464
---
472465
apiVersion: v1
473466
data:
@@ -486,15 +479,15 @@ data:
486479
kind: ConfigMap
487480
metadata:
488481
name: open-feature-operator-manager-config
489-
namespace: open-feature-operator-system
482+
namespace: '{{ include "chart.namespace" . }}'
490483
---
491484
apiVersion: v1
492485
kind: Service
493486
metadata:
494487
labels:
495488
control-plane: controller-manager
496489
name: open-feature-operator-controller-manager-metrics-service
497-
namespace: open-feature-operator-system
490+
namespace: '{{ include "chart.namespace" . }}'
498491
spec:
499492
ports:
500493
- name: https
@@ -510,7 +503,7 @@ metadata:
510503
annotations:
511504
cert-manager.io/inject-ca-from: open-feature-operator-system/webhook-cert
512505
name: open-feature-operator-webhook-service
513-
namespace: open-feature-operator-system
506+
namespace: '{{ include "chart.namespace" . }}'
514507
spec:
515508
ports:
516509
- port: 443
@@ -525,7 +518,7 @@ metadata:
525518
labels:
526519
control-plane: controller-manager
527520
name: open-feature-operator-controller-manager
528-
namespace: open-feature-operator-system
521+
namespace: '{{ include "chart.namespace" . }}'
529522
spec:
530523
replicas: 1
531524
selector:
@@ -612,11 +605,11 @@ apiVersion: cert-manager.io/v1
612605
kind: Certificate
613606
metadata:
614607
name: open-feature-operator-serving-cert
615-
namespace: open-feature-operator-system
608+
namespace: '{{ include "chart.namespace" . }}'
616609
spec:
617610
dnsNames:
618-
- open-feature-operator-webhook-service.open-feature-operator-system.svc
619-
- open-feature-operator-webhook-service.open-feature-operator-system.svc.cluster.local
611+
- open-feature-operator-webhook-service.{{ include "chart.namespace" . }}.svc
612+
- open-feature-operator-webhook-service.{{ include "chart.namespace" . }}.svc.cluster.local
620613
issuerRef:
621614
kind: Issuer
622615
name: open-feature-operator-selfsigned-issuer
@@ -626,23 +619,23 @@ apiVersion: cert-manager.io/v1
626619
kind: Issuer
627620
metadata:
628621
name: open-feature-operator-selfsigned-issuer
629-
namespace: open-feature-operator-system
622+
namespace: '{{ include "chart.namespace" . }}'
630623
spec:
631624
selfSigned: {}
632625
---
633626
apiVersion: admissionregistration.k8s.io/v1
634627
kind: MutatingWebhookConfiguration
635628
metadata:
636629
annotations:
637-
cert-manager.io/inject-ca-from: open-feature-operator-system/open-feature-operator-serving-cert
630+
cert-manager.io/inject-ca-from: '{{ include "chart.namespace" . }}/open-feature-operator-serving-cert'
638631
name: open-feature-operator-mutating-webhook-configuration
639632
webhooks:
640633
- admissionReviewVersions:
641634
- v1
642635
clientConfig:
643636
service:
644637
name: open-feature-operator-webhook-service
645-
namespace: open-feature-operator-system
638+
namespace: '{{ include "chart.namespace" . }}'
646639
path: /mutate-v1-pod
647640
failurePolicy: Ignore
648641
name: mutate.openfeature.dev
@@ -662,15 +655,15 @@ apiVersion: admissionregistration.k8s.io/v1
662655
kind: ValidatingWebhookConfiguration
663656
metadata:
664657
annotations:
665-
cert-manager.io/inject-ca-from: open-feature-operator-system/open-feature-operator-serving-cert
658+
cert-manager.io/inject-ca-from: '{{ include "chart.namespace" . }}/open-feature-operator-serving-cert'
666659
name: open-feature-operator-validating-webhook-configuration
667660
webhooks:
668661
- admissionReviewVersions:
669662
- v1
670663
clientConfig:
671664
service:
672665
name: open-feature-operator-webhook-service
673-
namespace: open-feature-operator-system
666+
namespace: '{{ include "chart.namespace" . }}'
674667
path: /validate-v1alpha1-featureflagconfiguration
675668
failurePolicy: Fail
676669
name: validate.featureflagconfiguration.openfeature.dev

0 commit comments

Comments
 (0)