github.com/polarismesh/polaris@v1.17.8/release/cluster/helm/templates/prometheus.yaml (about)

     1  ---
     2  apiVersion: v1
     3  kind: Service
     4  metadata:
     5    name: polaris-prometheus
     6    namespace: {{ .Values.installation.namespace }}
     7  spec:
     8    ports:
     9      - name: polaris-prometheus
    10        port: 9090
    11        protocol: TCP
    12        targetPort: 9090
    13      - name: polaris-pushgateway
    14        port: {{ .Values.monitor.port }}
    15        protocol: TCP
    16        targetPort: {{ .Values.monitor.port }}
    17    selector:
    18      app: polaris-prometheus
    19    type: LoadBalancer
    20  ---
    21  apiVersion: apps/v1
    22  kind: Deployment
    23  metadata:
    24    labels:
    25      app: polaris-prometheus
    26    name: polaris-prometheus
    27    namespace: {{ .Values.installation.namespace }}
    28  spec:
    29    progressDeadlineSeconds: 600
    30    replicas: 1
    31    revisionHistoryLimit: 10
    32    selector:
    33      matchLabels:
    34        app: polaris-prometheus
    35    strategy:
    36      rollingUpdate:
    37        maxSurge: 25%
    38        maxUnavailable: 25%
    39      type: RollingUpdate
    40    template:
    41      metadata:
    42        labels:
    43          app: polaris-prometheus
    44      spec:
    45        containers:
    46        - image: {{ .Values.prometheus.image.repository }}:{{ .Values.prometheus.image.tag }}
    47          imagePullPolicy: {{ .Values.prometheus.image.pullPolicy }}
    48          name: polaris-prometheus
    49          args:
    50            - '--config.file=/etc/prometheus/prometheus.yaml'
    51            - '--web.enable-lifecycle'
    52          resources:
    53            limits:
    54              cpu: "500m"
    55              memory: 1000Mi
    56          volumeMounts:
    57            - mountPath: /etc/prometheus/prometheus.yaml
    58              name: polaris-prometheus-config
    59              subPath: prometheus.yaml
    60        - image: {{ .Values.prometheus.pushgateway.image.repository }}:{{ .Values.prometheus.pushgateway.image.tag }}
    61          imagePullPolicy: {{ .Values.prometheus.pushgateway.image.pullPolicy }}
    62          name: polaris-pushgateway
    63          resources:
    64            limits:
    65              cpu: "500m"
    66              memory: 1000Mi
    67        restartPolicy: Always
    68        volumes:
    69          - configMap:
    70              defaultMode: 420
    71              name: polaris-prometheus-config
    72            name: polaris-prometheus-config