mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #62852 from serathius/prometheus-statefulset
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. [Prometheus addon] Use StatefulSet This PR changes prometheus server manifest from deployment to statefulset. Version label is removed from pods because statefulset disallows updating selectors. ```release-note NONE ``` /cc @branch @kawych
This commit is contained in:
commit
f8fea90d8d
@ -1,15 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: prometheus
|
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
|
||||||
kubernetes.io/cluster-service: "true"
|
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
|
||||||
spec:
|
|
||||||
storageClassName: standard
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: "16Gi"
|
|
@ -1,5 +1,5 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
name: prometheus
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
@ -9,16 +9,18 @@ metadata:
|
|||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
version: v2.2.1
|
version: v2.2.1
|
||||||
spec:
|
spec:
|
||||||
|
serviceName: "prometheus"
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
podManagementPolicy: "Parallel"
|
||||||
|
updateStrategy:
|
||||||
|
type: "RollingUpdate"
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
k8s-app: prometheus
|
k8s-app: prometheus
|
||||||
version: v2.2.1
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: prometheus
|
k8s-app: prometheus
|
||||||
version: v2.2.1
|
|
||||||
annotations:
|
annotations:
|
||||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
spec:
|
spec:
|
||||||
@ -30,7 +32,7 @@ spec:
|
|||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
command: ["chown", "-R", "65534:65534", "/data"]
|
command: ["chown", "-R", "65534:65534", "/data"]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: storage-volume
|
- name: prometheus-data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
subPath: ""
|
subPath: ""
|
||||||
containers:
|
containers:
|
||||||
@ -87,7 +89,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /etc/config
|
mountPath: /etc/config
|
||||||
- name: storage-volume
|
- name: prometheus-data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
subPath: ""
|
subPath: ""
|
||||||
terminationGracePeriodSeconds: 300
|
terminationGracePeriodSeconds: 300
|
||||||
@ -95,6 +97,13 @@ spec:
|
|||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: prometheus-config
|
name: prometheus-config
|
||||||
- name: storage-volume
|
volumeClaimTemplates:
|
||||||
persistentVolumeClaim:
|
- metadata:
|
||||||
claimName: prometheus
|
name: prometheus-data
|
||||||
|
spec:
|
||||||
|
storageClassName: standard
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "16Gi"
|
Loading…
Reference in New Issue
Block a user