[kube-prometheus-stack] unknown field "automountServiceAccountToken"
dnikoloski opened this issue · comments
Describe the bug a clear and concise description of what the bug is.
helm upgrade --install -f values-new.yaml kube-prometheus-stack prometheus-community/kube-prometheus-stack -n monitoring
gives me an error:
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Prometheus.spec): unknown field "automountServiceAccountToken" in com.coreos.monitoring.v1.Prometheus.spec
What's your helm version?
v3.15.3
What's your kubectl version?
v1.30.3
Which chart?
kube-prometheus-stack
What's the chart version?
61.7.1
What happened?
helm upgrade --install -f values-new.yaml kube-prometheus-stack prometheus-community/kube-prometheus-stack -n monitoring
gives me an error:
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Prometheus.spec): unknown field "automountServiceAccountToken" in com.coreos.monitoring.v1.Prometheus.spec
What you expected to happen?
No response
How to reproduce it?
helm upgrade --install -f values-new.yaml kube-prometheus-stack prometheus-community/kube-prometheus-stack -n monitoring
Enter the changed values of values.yaml?
##-prometheusOperator-##
## Manages Prometheus and Alertmanager components
prometheusOperator:
enabled: true
tls:
enabled: true
tlsMinVersion: VersionTLS13
internalPort: 10250
admissionWebhooks:
failurePolicy: ""
timeoutSeconds: 10
enabled: true
caBundle: ""
annotations: {}
# argocd.argoproj.io/hook: PreSync
# argocd.argoproj.io/hook-delete-policy: HookSucceeded
patch:
enabled: true
image:
registry: registry.k8s.io
repository: ingress-nginx/kube-webhook-certgen
tag: v20221220-controller-v1.5.1-58-g787ea74b6
sha: ""
pullPolicy: IfNotPresent
resources: {}
priorityClassName: ""
annotations: {}
# argocd.argoproj.io/hook: PreSync
# argocd.argoproj.io/hook-delete-policy: HookSucceeded
podAnnotations: {}
nodeSelector: {}
affinity: {}
tolerations: []
securityContext:
runAsGroup: 2000
runAsNonRoot: true
runAsUser: 2000
seccompProfile:
type: RuntimeDefault
# Security context for create job container
createSecretJob:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
# Security context for patch job container
patchWebhookJob:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
# Use certmanager to generate webhook certs
certManager:
enabled: false
rootCert:
duration: ""
admissionCert:
duration: ""
namespaces: {}
denyNamespaces: []
alertmanagerInstanceNamespaces: []
alertmanagerConfigNamespaces: []
prometheusInstanceNamespaces: []
thanosRulerInstanceNamespaces: []
# clusterDomain: "cluster.local"
networkPolicy:
enabled: false
flavor: kubernetes
serviceAccount:
create: true
name: ""
service:
annotations: {}
labels: {}
clusterIP: ""
nodePort: 30080
nodePortTls: 30443
additionalPorts: []
loadBalancerIP: ""
loadBalancerSourceRanges: []
externalTrafficPolicy: Cluster
type: ClusterIP
externalIPs: []
labels: {}
annotations: {}
podLabels: {}
podAnnotations: {}
kubeletService:
enabled: true
namespace: kube-system
name: ""
serviceMonitor:
additionalLabels: {}
interval: ""
sampleLimit: 0
targetLimit: 0
labelLimit: 0
labelNameLengthLimit: 0
labelValueLengthLimit: 0
scrapeTimeout: ""
selfMonitor: true
metricRelabelings: []
relabelings: []
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 100m
memory: 100Mi
hostNetwork: false
nodeSelector: {}
tolerations: []
affinity: {}
dnsConfig: {}
securityContext:
fsGroup: 65534
runAsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
containerSecurityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
# Enable vertical pod autoscaler support for prometheus-operator
verticalPodAutoscaler:
enabled: false
controlledResources: []
maxAllowed: {}
minAllowed: {}
updatePolicy:
updateMode: Auto
## Prometheus-operator image
image:
registry: quay.io
repository: prometheus-operator/prometheus-operator
tag: ""
sha: ""
pullPolicy: IfNotPresent
prometheusConfigReloader:
image:
registry: quay.io
repository: prometheus-operator/prometheus-config-reloader
tag: ""
sha: ""
enableProbe: false
resources:
requests:
cpu: 200m
memory: 50Mi
limits:
cpu: 200m
memory: 50Mi
## Thanos side-car image when configured
thanosImage:
registry: quay.io
repository: thanos/thanos
tag: v0.31.0
sha: ""
prometheusInstanceSelector: ""
alertmanagerInstanceSelector: ""
thanosRulerInstanceSelector: ""
secretFieldSelector: "type!=kubernetes.io/dockercfg,type!=kubernetes.io/service-account-token,type!=helm.sh/release.v1"
##-Prometheus-##
prometheus:
enabled: true
annotations: {}
networkPolicy:
enabled: failure-domain.beta.kubernetes.io/zone
flavor: kubernetes
serviceAccount:
create: true
name: ""
annotations: {}
automountServiceAccountToken: true
Enter the command that you execute and failing/misfunctioning.
helm upgrade --install -f values-new.yaml kube-prometheus-stack prometheus-community/kube-prometheus-stack -n monitoring
Anything else we need to know?
No response
Fixed with:
for i in `kubectl get crd | grep monitoring.coreos.com`; do kubectl delete crd $i; done