fix: remove PVC patch that broke kubectl apply on bound claims
Some checks failed
scrum-manager/pipeline/head There was a failure building this commit
Some checks failed
scrum-manager/pipeline/head There was a failure building this commit
The mysql-data-pvc was already dynamically provisioned by the cluster's 'local-path' StorageClass. The overlay patch tried to change storageClassName to 'manual' and volumeName on an already-bound PVC, which Kubernetes forbids: "spec is immutable after creation except resources.requests" Fixes: - Remove mysql-pvc-patch from kustomization.yaml (PVC left as-is) - Remove mysql-pv.yaml resource (not needed with dynamic provisioner) - Add comment explaining when manual PV/PVC is needed vs not Jenkinsfile: add --timeout and FQDN to smoke test curl; add comments explaining MySQL Recreate strategy startup timing expectations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,11 +19,10 @@ resources:
|
||||
- ../../base
|
||||
- ingress.yaml
|
||||
|
||||
patches:
|
||||
- path: mysql-pvc-patch.yaml
|
||||
target:
|
||||
kind: PersistentVolumeClaim
|
||||
name: mysql-data-pvc
|
||||
# NOTE: mysql-pv.yaml and mysql-pvc-patch.yaml are only needed on clusters
|
||||
# without a default StorageClass. This cluster uses 'local-path' (dynamic
|
||||
# provisioner), so the base PVC works as-is and must NOT be patched after
|
||||
# it is already bound.
|
||||
|
||||
images:
|
||||
- name: scrum-frontend
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mysql-pv
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 5Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
hostPath:
|
||||
path: "/mnt/data/mysql"
|
||||
# DirectoryOrCreate: kubelet will create the dir if it doesn't exist,
|
||||
# preventing MySQL CrashLoopBackOff due to missing mount path.
|
||||
type: DirectoryOrCreate
|
||||
# IMPORTANT for multi-node clusters: uncomment nodeAffinity and set your
|
||||
# node's hostname so MySQL always schedules on the node that has the data.
|
||||
# Run: kubectl get nodes to find the hostname.
|
||||
# nodeAffinity:
|
||||
# required:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: kubernetes.io/hostname
|
||||
# operator: In
|
||||
# values:
|
||||
# - YOUR-NODE-HOSTNAME
|
||||
Reference in New Issue
Block a user