[bitnami/prometheus-operator] reindent manifests

This commit is contained in:
Sameer Naik
2020-01-21 17:30:10 +05:30
parent a909989892
commit 0f2c720047
22 changed files with 265 additions and 256 deletions

View File

@@ -53,17 +53,17 @@ spec:
{{- if eq .Values.alertmanager.podAntiAffinity "hard" }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.alertmanager.matchLabels" . | nindent 12 }}
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.alertmanager.matchLabels" . | nindent 14 }}
{{- else if eq .Values.alertmanager.podAntiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.alertmanager.matchLabels" . | nindent 14 }}
- weight: 100
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.alertmanager.matchLabels" . | nindent 16 }}
{{- end }}
{{- if .Values.alertmanager.podAffinity }}
podAffinity: {{- include "prometheus-operator.tplValue" (dict "value" .Values.alertmanager.podAffinity "context" $) | nindent 6 }}

View File

@@ -13,17 +13,17 @@ metadata:
{{- end }}
spec:
rules:
{{- range .Values.alertmanager.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ template "prometheus-operator.alertmanager.fullname" $ }}
servicePort: http
{{- end }}
{{- range .Values.alertmanager.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ template "prometheus-operator.alertmanager.fullname" $ }}
servicePort: http
{{- end }}
{{- if .Values.alertmanager.ingress.tls }}
tls:
{{ toYaml .Values.alertmanager.ingress.tls | indent 4 }}
{{- end }}
{{- end }}
{{- end -}}

View File

@@ -5,9 +5,9 @@ metadata:
name: {{ template "prometheus-operator.alertmanager.fullname" . }}-psp
labels: {{- include "prometheus-operator.alertmanager.labels" . | nindent 4 }}
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ template "prometheus-operator.alertmanager.fullname" . }}
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ template "prometheus-operator.alertmanager.fullname" . }}
{{- end }}

View File

@@ -8,7 +8,7 @@ spec:
privileged: false
allowPrivilegeEscalation: false
requiredDropCapabilities:
- ALL
- ALL
volumes:
- 'configMap'
- 'emptyDir'
@@ -22,18 +22,18 @@ spec:
runAsUser:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
seLinux:
rule: 'RunAsAny'
supplementalGroups:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
fsGroup:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
{{- end }}

View File

@@ -21,12 +21,12 @@ spec:
clusterIP: {{ .Values.alertmanager.service.clusterIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.alertmanager.service.port }}
targetPort: 9093
{{- if and .Values.alertmanager.service.nodePort (or (eq .Values.alertmanager.service.type "NodePort") (eq .Values.alertmanager.service.type "LoadBalancer")) }}
nodePort: {{ .Values.alertmanager.service.nodePort }}
{{- end }}
- name: http
port: {{ .Values.alertmanager.service.port }}
targetPort: 9093
{{- if and .Values.alertmanager.service.nodePort (or (eq .Values.alertmanager.service.type "NodePort") (eq .Values.alertmanager.service.type "LoadBalancer")) }}
nodePort: {{ .Values.alertmanager.service.nodePort }}
{{- end }}
selector:
app: alertmanager
alertmanager: {{ template "prometheus-operator.alertmanager.fullname" . }}

View File

@@ -11,15 +11,15 @@ spec:
matchNames:
- {{ .Release.Namespace }}
endpoints:
- port: http
{{- if .Values.alertmanager.serviceMonitor.interval }}
interval: {{ .Values.alertmanager.serviceMonitor.interval }}
{{- end }}
path: "/metrics"
{{- if .Values.alertmanager.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "prometheus-operator.tplValue" ( dict "value" .Values.alertmanager.serviceMonitor.metricRelabelings "context" $) | nindent 6 }}
{{- end }}
{{- if .Values.alertmanager.serviceMonitor.relabelings }}
relabelings: {{- toYaml .Values.alertmanager.serviceMonitor.relabelings | nindent 6 }}
{{- end }}
- port: http
{{- if .Values.alertmanager.serviceMonitor.interval }}
interval: {{ .Values.alertmanager.serviceMonitor.interval }}
{{- end }}
path: "/metrics"
{{- if .Values.alertmanager.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "prometheus-operator.tplValue" ( dict "value" .Values.alertmanager.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.alertmanager.serviceMonitor.relabelings }}
relabelings: {{- toYaml .Values.alertmanager.serviceMonitor.relabelings | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -13,7 +13,7 @@ spec:
provider: kubernetes
namespaceSelector:
matchNames:
- default
- default
endpoints:
- port: https
scheme: https

View File

@@ -5,68 +5,68 @@ metadata:
name: {{ template "prometheus-operator.operator.fullname" . }}
labels: {{- include "prometheus-operator.operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- alertmanagers
- prometheuses
- prometheuses/finalizers
- alertmanagers/finalizers
- servicemonitors
- podmonitors
- prometheusrules
verbs:
- '*'
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- delete
- apiGroups:
- ""
resources:
- services
- services/finalizers
- endpoints
verbs:
- get
- create
- update
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- alertmanagers
- prometheuses
- prometheuses/finalizers
- alertmanagers/finalizers
- servicemonitors
- podmonitors
- prometheusrules
verbs:
- '*'
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- delete
- apiGroups:
- ""
resources:
- services
- services/finalizers
- endpoints
verbs:
- get
- create
- update
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
{{- end }}

View File

@@ -9,7 +9,7 @@ roleRef:
kind: ClusterRole
name: {{ template "prometheus-operator.operator.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "prometheus-operator.operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
- kind: ServiceAccount
name: {{ template "prometheus-operator.operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

View File

@@ -45,49 +45,49 @@ spec:
{{- else if eq .Values.operator.podAntiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.operator.matchLabels" . | nindent 18 }}
- weight: 1
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.operator.matchLabels" . | nindent 20 }}
{{- end }}
{{- if .Values.operator.podAffinity }}
podAffinity: {{- include "prometheus-operator.tplValue" (dict "value" .Values.operator.podAffinity "context" $) | nindent 10 }}
{{- end }}
containers:
- name: {{ template "prometheus-operator.name" . }}
image: {{ template "prometheus-operator.image" . }}
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
args:
{{- if .Values.operator.kubeletService.enabled }}
- --kubelet-service={{ .Values.operator.kubeletService.namespace }}/{{ template "prometheus-operator.fullname" . }}-kubelet
{{- end }}
{{- if .Values.operator.logFormat }}
- --log-format={{ .Values.operator.logFormat }}
{{- end }}
{{- if .Values.operator.logLevel }}
- --log-level={{ .Values.operator.logLevel }}
{{- end }}
- --logtostderr=true
- --localhost=127.0.0.1
- --config-reloader-image={{ template "prometheus-operator.configmapReload.image" . }}
- --prometheus-config-reloader={{ template "prometheus-operator.prometheusConfigReloader.image" . }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /metrics
port: http
{{ toYaml .Values.operator.livenessProbe | indent 10 }}
readinessProbe:
httpGet:
path: /metrics
port: http
{{ toYaml .Values.operator.readinessProbe | indent 10 }}
resources: {{- toYaml .Values.operator.resources | nindent 10 }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
- name: {{ template "prometheus-operator.name" . }}
image: {{ template "prometheus-operator.image" . }}
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
args:
{{- if .Values.operator.kubeletService.enabled }}
- --kubelet-service={{ .Values.operator.kubeletService.namespace }}/{{ template "prometheus-operator.fullname" . }}-kubelet
{{- end }}
{{- if .Values.operator.logFormat }}
- --log-format={{ .Values.operator.logFormat }}
{{- end }}
{{- if .Values.operator.logLevel }}
- --log-level={{ .Values.operator.logLevel }}
{{- end }}
- --logtostderr=true
- --localhost=127.0.0.1
- --config-reloader-image={{ template "prometheus-operator.configmapReload.image" . }}
- --prometheus-config-reloader={{ template "prometheus-operator.prometheusConfigReloader.image" . }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /metrics
port: http
{{ toYaml .Values.operator.livenessProbe | indent 12 }}
readinessProbe:
httpGet:
path: /metrics
port: http
{{ toYaml .Values.operator.readinessProbe | indent 12 }}
resources: {{- toYaml .Values.operator.resources | nindent 12 }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
{{- end }}

View File

@@ -5,9 +5,9 @@ metadata:
name: {{ template "prometheus-operator.operator.fullname" . }}-psp
labels: {{- include "prometheus-operator.operator.labels" . | nindent 4 }}
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ template "prometheus-operator.operator.fullname" . }}
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ template "prometheus-operator.operator.fullname" . }}
{{- end }}

View File

@@ -8,7 +8,7 @@ spec:
privileged: false
allowPrivilegeEscalation: false
requiredDropCapabilities:
- ALL
- ALL
volumes:
- 'configMap'
- 'emptyDir'
@@ -22,18 +22,18 @@ spec:
runAsUser:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
seLinux:
rule: 'RunAsAny'
supplementalGroups:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
fsGroup:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
{{- end }}

View File

@@ -21,11 +21,11 @@ spec:
clusterIP: {{ .Values.operator.service.clusterIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.operator.service.port }}
targetPort: http
{{- if and .Values.operator.service.nodePort (or (eq .Values.operator.service.type "NodePort") (eq .Values.operator.service.type "LoadBalancer")) }}
nodePort: {{ .Values.operator.service.nodePort }}
{{- end }}
- name: http
port: {{ .Values.operator.service.port }}
targetPort: http
{{- if and .Values.operator.service.nodePort (or (eq .Values.operator.service.type "NodePort") (eq .Values.operator.service.type "LoadBalancer")) }}
nodePort: {{ .Values.operator.service.nodePort }}
{{- end }}
selector: {{- include "prometheus-operator.operator.matchLabels" . | nindent 4 }}
{{- end }}

View File

@@ -6,16 +6,16 @@ metadata:
labels: {{- include "prometheus-operator.operator.labels" . | nindent 4 }}
spec:
endpoints:
- port: http
honorLabels: true
{{- if .Values.operator.serviceMonitor.interval }}
interval: {{ .Values.operator.serviceMonitor.interval }}
{{- end }}
{{- if .Values.operator.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "prometheus-operator.tplValue" ( dict "value" .Values.operator.serviceMonitor.metricRelabelings "context" $) | nindent 6 }}
{{- end }}
{{- if .Values.operator.serviceMonitor.relabelings }}
relabelings: {{- toYaml .Values.operator.serviceMonitor.relabelings | nindent 6 }}
- port: http
honorLabels: true
{{- if .Values.operator.serviceMonitor.interval }}
interval: {{ .Values.operator.serviceMonitor.interval }}
{{- end }}
{{- if .Values.operator.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "prometheus-operator.tplValue" ( dict "value" .Values.operator.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.operator.serviceMonitor.relabelings }}
relabelings: {{- toYaml .Values.operator.serviceMonitor.relabelings | nindent 8 }}
{{- end }}
selector:
matchLabels: {{- include "prometheus-operator.operator.matchLabels" . | nindent 6 }}

View File

@@ -5,28 +5,37 @@ metadata:
name: {{ template "prometheus-operator.prometheus.fullname" . }}
labels: {{- include "prometheus-operator.prometheus.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- nodes/metrics
verbs:
- get
- list
- watch
- apiGroups: [""]
resources:
- nodes
- nodes/proxy
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups:
- extensions
- "networking.k8s.io"
resources:
- ingresses
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
- apiGroups:
- ""
resources:
- nodes/metrics
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- nodes
- nodes/proxy
- services
- endpoints
- pods
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- extensions
- "networking.k8s.io"
resources:
- ingresses
verbs:
- get
- list
- watch
- nonResourceURLs:
- "/metrics"
verbs:
- "get"
{{- end }}

View File

@@ -9,7 +9,7 @@ roleRef:
kind: ClusterRole
name: {{ template "prometheus-operator.prometheus.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
- kind: ServiceAccount
name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

View File

@@ -13,15 +13,15 @@ metadata:
{{- end }}
spec:
rules:
{{- range .Values.prometheus.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ template "prometheus-operator.prometheus.fullname" $ }}
servicePort: http
{{- end }}
{{- range .Values.prometheus.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ template "prometheus-operator.prometheus.fullname" $ }}
servicePort: http
{{- end }}
{{- if .Values.prometheus.ingress.tls }}
tls:
{{ toYaml .Values.prometheus.ingress.tls | indent 4 }}

View File

@@ -122,17 +122,17 @@ spec:
{{- if eq .Values.prometheus.podAntiAffinity "hard" }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.prometheus.matchLabels" . | nindent 12 }}
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.prometheus.matchLabels" . | nindent 14 }}
{{- else if eq .Values.prometheus.podAntiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.prometheus.matchLabels" . | nindent 14 }}
- weight: 100
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels: {{- include "prometheus-operator.prometheus.matchLabels" . | nindent 16 }}
{{- end }}
{{- if .Values.prometheus.podAffinity }}
podAffinity: {{- include "prometheus-operator.tplValue" (dict "value" .Values.prometheus.podAffinity "context" $) | nindent 6 }}

View File

@@ -5,9 +5,9 @@ metadata:
name: {{ template "prometheus-operator.prometheus.fullname" . }}-psp
labels: {{- include "prometheus-operator.prometheus.labels" . | nindent 4 }}
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ template "prometheus-operator.prometheus.fullname" . }}
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ template "prometheus-operator.prometheus.fullname" . }}
{{- end }}

View File

@@ -8,7 +8,7 @@ spec:
privileged: false
allowPrivilegeEscalation: false
requiredDropCapabilities:
- ALL
- ALL
volumes:
- 'configMap'
- 'emptyDir'
@@ -22,18 +22,18 @@ spec:
runAsUser:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
seLinux:
rule: 'RunAsAny'
supplementalGroups:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
fsGroup:
rule: 'MustRunAs'
ranges:
- min: 1001
max: 1001
- min: 1001
max: 1001
{{- end }}

View File

@@ -21,12 +21,12 @@ spec:
clusterIP: {{ .Values.prometheus.service.clusterIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.prometheus.service.port }}
targetPort: 9090
{{- if and .Values.prometheus.service.nodePort (or (eq .Values.prometheus.service.type "NodePort") (eq .Values.prometheus.service.type "LoadBalancer")) }}
nodePort: {{ .Values.prometheus.service.nodePort }}
{{- end }}
- name: http
port: {{ .Values.prometheus.service.port }}
targetPort: 9090
{{- if and .Values.prometheus.service.nodePort (or (eq .Values.prometheus.service.type "NodePort") (eq .Values.prometheus.service.type "LoadBalancer")) }}
nodePort: {{ .Values.prometheus.service.nodePort }}
{{- end }}
selector:
app: prometheus
prometheus: {{ template "prometheus-operator.prometheus.fullname" . }}

View File

@@ -11,15 +11,15 @@ spec:
matchNames:
- {{ .Release.Namespace }}
endpoints:
- port: http
{{- if .Values.prometheus.serviceMonitor.interval }}
interval: {{ .Values.prometheus.serviceMonitor.interval }}
{{- end }}
path: "/metrics"
{{- if .Values.prometheus.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "prometheus-operator.tplValue" ( dict "value" .Values.prometheus.serviceMonitor.metricRelabelings "context" $) | nindent 6 }}
{{- end }}
{{- if .Values.prometheus.serviceMonitor.relabelings }}
relabelings: {{- toYaml .Values.prometheus.serviceMonitor.relabelings | nindent 6 }}
{{- end }}
- port: http
{{- if .Values.prometheus.serviceMonitor.interval }}
interval: {{ .Values.prometheus.serviceMonitor.interval }}
{{- end }}
path: "/metrics"
{{- if .Values.prometheus.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "prometheus-operator.tplValue" ( dict "value" .Values.prometheus.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.prometheus.serviceMonitor.relabelings }}
relabelings: {{- toYaml .Values.prometheus.serviceMonitor.relabelings | nindent 8 }}
{{- end }}
{{- end }}