k8s: write out the defaulted fields so apply reports InfluxDB unchanged
The NetworkPolicy port gets protocol: TCP, the StatefulSet's volume claim template apiVersion, kind and volumeMode: Filesystem. Kubernetes filled these in itself, so every apply -k sent a patch and printed "configured" although kubectl diff was empty. Validated offline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
+7
-1
@@ -84,11 +84,16 @@ spec:
|
||||
volumes:
|
||||
- name: config
|
||||
emptyDir: {}
|
||||
# apiVersion, kind and volumeMode are the values Kubernetes fills in itself: written out, a
|
||||
# repeated apply finds nothing to patch (no "configured" for an unchanged StatefulSet).
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
- apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
volumeMode: Filesystem
|
||||
# No storageClassName: the cluster's default class is used.
|
||||
resources:
|
||||
requests:
|
||||
@@ -132,3 +137,4 @@ spec:
|
||||
app.kubernetes.io/name: grafana
|
||||
ports:
|
||||
- port: 8086
|
||||
protocol: TCP
|
||||
|
||||
Reference in New Issue
Block a user