What did you do?
Added a Storage spec to my Prometheus:
storage:
class: fast
resources:
requests:
storage: 500Gi
I then did kubectl apply -f with the updated manifest.
What did you expect to see?
I expected to see that the StatefulSet would be updated w/ a PVC.
What did you see instead? Under which circumstances?
The StatefulSet is still the same and the existing pods were not updated with a PVC.
Environment
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.2", GitCommit:"477efc3cbe6a7effca06bd1452fa356e2201e1ee", GitTreeState:"clean", BuildDate:"2017-04-19T20:33:11Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.6", GitCommit:"7fa1c1756d8bc963f1a389f4a6937dc71f08ada2", GitTreeState:"clean", BuildDate:"2017-06-16T18:21:54Z", GoVersion:"go1.7.6", Compiler:"gc", Platform:"linux/amd64"}
GKE
apiVersion: monitoring.coreos.com/v1alpha1
kind: Prometheus
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"monitoring.coreos.com/v1alpha1","kind":"Prometheus","metadata":{"annotations":{},"labels":{"prometheus":"k8s"},"name":"k8s","namespace":"monitoring"},"spec":{"replicas":2,"resources":{"limit":{"cpu":"3","memory":"4Gi"},"requests":{"cpu":"1.5","memory":"2Gi"}},"serviceAccountName":"prometheus-k8s","serviceMonitorSelector":{"matchLabels":{"prometheus":"k8s"}},"storage":{"class":"fast","resources":{"requests":{"storage":"500Gi"}}},"version":"v1.7.1"}}
creationTimestamp: 2017-07-09T17:34:37Z
labels:
prometheus: k8s
name: k8s
namespace: monitoring
resourceVersion: "857460"
selfLink: /apis/monitoring.coreos.com/v1alpha1/namespaces/monitoring/prometheuses/k8s
uid: e18445f2-64cc-11e7-9811-42010a80009c
spec:
replicas: 2
resources:
limit:
cpu: "3"
memory: 4Gi
requests:
cpu: "1.5"
memory: 2Gi
serviceAccountName: prometheus-k8s
serviceMonitorSelector:
matchLabels:
prometheus: k8s
storage:
class: fast
resources:
requests:
storage: 500Gi
version: v1.7.1
ts=2017-07-10T20:16:44Z caller=operator.go:965 component=prometheusoperator msg="updating config skipped, no configuration change"
E0710 20:16:44.066456 1 operator.go:521] Sync "monitoring/k8s" failed: updating statefulset failed: StatefulSet.apps "prometheus-k8s" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas' and 'containers' are forbidden.
Hmm... looking at these logs, looks like this is a feature of the StatefulSet.
@julianvmodesto , StatefulSet updates are supported from Kube 1.7.
Thanks @tamalsaha :)
Most helpful comment
@julianvmodesto , StatefulSet updates are supported from Kube 1.7.