prometheus、alertmanager如何添加label

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值