prometheus:
在prometheus CR里添加label
即:spec.template.metadata.labels
spec:
template:
metadata:
lables:
app.kubernetes.io/name: prometheus
Alertmanager:
在Alertmanager CR里添加label
spec.podMetadata.labels
spec:
podMetadata:
labels:
app.kubernetes.io/name: alertmanager
alertmanager如何添加tolerations呢?
Alertmanager CR里添加tolerations
即:spec.tolerations
apiVersion: monitoring.coreos.com/v1
kind: Alertmanager
metadata:
annotations:
meta.helm.sh/release-name: alertmanager
meta.helm.sh/release-namespace: monitoring
creationTimestamp: "2022-05-23T09:02:11Z"
generation: 2
labels:
alertmanager: main
app.kubernetes.io/managed-by: Helm
name: alertmanager
namespace: monitoring
resourceVersion: "558070572"
selfLink: /apis/monitoring.coreos.com/v1/namespaces/monitoring/alertmanagers/alertmanager
uid: 4e1cf190-aac4-42ae-b654-5fca089df38b
spec:
image: 10.10.101.22:8443/middleware/alertmanager:v0.21.0
nodeSelector:
kubernetes.io/os: linux
replicas: 1
securityContext:
fsGroup: 2000
runAsNonRoot: true
runAsUser: 1000
serviceAccountName: alertmanager
tolerations:
- operator: Exists
version: v0.21.0