k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/pkg/prometheus/manifests/0prometheus-operator-deployment.yaml (about)

     1  {{$PROMETHEUS_SCRAPE_KUBELETS := DefaultParam .PROMETHEUS_SCRAPE_KUBELETS false}}
     2  {{$PROMETHEUS_NODE_SELECTOR := DefaultParam .CL2_PROMETHEUS_NODE_SELECTOR ""}}
     3  {{$PROMETHEUS_TOLERATE_MASTER := DefaultParam .CL2_PROMETHEUS_TOLERATE_MASTER false}}
     4  
     5  apiVersion: apps/v1
     6  kind: Deployment
     7  metadata:
     8    labels:
     9      app.kubernetes.io/component: controller
    10      app.kubernetes.io/name: prometheus-operator
    11      app.kubernetes.io/part-of: kube-prometheus
    12      app.kubernetes.io/version: 0.46.0
    13    name: prometheus-operator
    14    namespace: monitoring
    15  spec:
    16    replicas: 1
    17    selector:
    18      matchLabels:
    19        app.kubernetes.io/component: controller
    20        app.kubernetes.io/name: prometheus-operator
    21        app.kubernetes.io/part-of: kube-prometheus
    22    template:
    23      metadata:
    24        labels:
    25          app.kubernetes.io/component: controller
    26          app.kubernetes.io/name: prometheus-operator
    27          app.kubernetes.io/part-of: kube-prometheus
    28          app.kubernetes.io/version: 0.46.0
    29      spec:
    30        containers:
    31        - args:
    32          {{if $PROMETHEUS_SCRAPE_KUBELETS}}
    33          - --kubelet-service=kube-system/kubelet
    34          {{end}}
    35          - --prometheus-config-reloader=gcr.io/k8s-testimages/quay.io/prometheus-operator/prometheus-config-reloader:v0.46.0
    36          - --secret-field-selector=type=prometheus-alert
    37          image: gcr.io/k8s-testimages/quay.io/prometheus-operator/prometheus-operator:v0.46.0
    38          name: prometheus-operator
    39          ports:
    40          - containerPort: 8080
    41            name: http
    42          resources:
    43            limits:
    44              cpu: 200m
    45              memory: {{IfThenElse (lt .Nodes 500) 200 400}}Mi
    46            requests:
    47              cpu: 200m
    48              memory: {{IfThenElse (lt .Nodes 500) 200 400}}Mi
    49          securityContext:
    50            allowPrivilegeEscalation: false
    51            readOnlyRootFilesystem: true
    52        {{if $PROMETHEUS_TOLERATE_MASTER}}
    53        tolerations:
    54          - key: node-role.kubernetes.io/master
    55            operator: Exists
    56            effect: NoSchedule
    57          - key: node-role.kubernetes.io/control-plane
    58            operator: Exists
    59            effect: NoSchedule
    60        {{end}}
    61        nodeSelector:
    62          kubernetes.io/os: linux
    63          {{StructuralData $PROMETHEUS_NODE_SELECTOR}}
    64        securityContext:
    65          runAsNonRoot: true
    66          runAsUser: 65534
    67        serviceAccountName: prometheus-operator