Skip to content

Commit 9107a43

Browse files
committed
fix: Remove selector with kustomize overlay using a JSON 6902 patch
Signed-off-by: ntkathole <[email protected]>
1 parent fb03c46 commit 9107a43

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎infra/feast-operator/config/overlays/odh/kustomization.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ resources:
1111
patches:
1212
# patch to remove default `system` namespace in ../../manager/manager.yaml
1313
- path: delete-namespace.yaml
14+
# Remove app.kubernetes.io/name from the Deployment selector to avoid
15+
# immutable spec.selector errors on upgrade. The label remains in the
16+
# pod template so the metrics Service selector still targets only
17+
# feast-operator pods.
18+
- path: remove_selector_label_patch.yaml
19+
target:
20+
kind: Deployment
21+
name: controller-manager
1422

1523
configMapGenerator:
1624
- name: feast-operator-parameters
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- op: remove
2+
path: /spec/selector/matchLabels/app.kubernetes.io~1name

‎infra/feast-operator/config/overlays/rhoai/kustomization.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ resources:
1111
patches:
1212
# patch to remove default `system` namespace in ../../manager/manager.yaml
1313
- path: delete-namespace.yaml
14+
# Remove app.kubernetes.io/name from the Deployment selector to avoid
15+
# immutable spec.selector errors on upgrade. The label remains in the
16+
# pod template so the metrics Service selector still targets only
17+
# feast-operator pods.
18+
- path: remove_selector_label_patch.yaml
19+
target:
20+
kind: Deployment
21+
name: controller-manager
1422

1523
configMapGenerator:
1624
- name: feast-operator-parameters
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- op: remove
2+
path: /spec/selector/matchLabels/app.kubernetes.io~1name

0 commit comments

Comments
 (0)