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:
2026-10-25 22:32:57 +01:00
co-authored by Claude Opus 5.5
parent 97e9644d9a
commit d865906859
2 changed files with 15 additions and 1 deletions
+7 -1
View File
@@ -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