Files
scrum-manager/k8s/overlays/on-premise/kustomization.yaml
tusuii 254052d798
Some checks failed
scrum-manager/pipeline/head There was a failure building this commit
fix: set storageClassName=local-path in PVC patch to match live cluster
kubectl apply computes a 3-way merge. The base PVC has no storageClassName
(nil), but the already-bound PVC in the cluster has storageClassName=local-path.
This diff caused apply to attempt a mutation on a bound PVC — forbidden by k8s.

Fix: patch the PVC with storageClassName=local-path so desired state matches
live state and apply produces no diff on the PVC.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:08:36 +05:30

38 lines
971 B
YAML

# apiVersion: kustomize.config.k8s.io/v1beta1
# kind: Kustomization
# resources:
# - ../../base
# - mysql-pv.yaml
# - ingress.yaml
# patches:
# - path: mysql-pvc-patch.yaml
# target:
# kind: PersistentVolumeClaim
# name: mysql-data-pvc
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- ingress.yaml
patches:
# This patch explicitly sets storageClassName: local-path to match the live
# PVC in the cluster. Without it, the base PVC (no storageClassName = nil)
# diffs against the existing "local-path" value and kubectl apply tries to
# mutate a bound PVC, which Kubernetes forbids.
- path: mysql-pvc-patch.yaml
target:
kind: PersistentVolumeClaim
name: mysql-data-pvc
images:
- name: scrum-frontend
newName: 192.168.108.200:80/library/scrum-frontend
newTag: latest
- name: scrum-backend
newName: 192.168.108.200:80/library/scrum-backend
newTag: latest