github.com/abayer/test-infra@v0.0.5/velodrome/grafana-stack/prometheus.yaml (about)

     1  apiVersion: extensions/v1beta1
     2  kind: Deployment
     3  metadata:
     4    name: prometheus-${PROJECT}
     5    labels:
     6      app: prometheus
     7      project: ${PROJECT}
     8  spec:
     9    replicas: 1
    10    template:
    11      metadata:
    12        labels:
    13          app: prometheus
    14          project: ${PROJECT}
    15      spec:
    16        containers:
    17        - name: prometheus
    18          image: prom/prometheus:v1.1.3
    19          args:
    20          - -config.file=/etc/prometheus/prometheus.yml
    21          - -storage.local.path=/prometheus
    22          - -web.console.libraries=/usr/share/prometheus/console_libraries
    23          - -web.console.templates=/usr/share/prometheus/consoles
    24          - -storage.local.retention=35064h
    25          resources:
    26            requests:
    27              cpu: 0m
    28          ports:
    29          - name: prometheus-port
    30            containerPort: 9090
    31          volumeMounts:
    32          - mountPath: /prometheus
    33            name: database-volume
    34          - mountPath: /etc/prometheus
    35            name: prometheus-config
    36        volumes:
    37        - name: database-volume
    38          persistentVolumeClaim:
    39            claimName: prometheus-${PROJECT}-database-claim
    40        - name: prometheus-config
    41          configMap:
    42            name: prometheus-${PROJECT}
    43            items:
    44            - key: prometheus-config.yml
    45              path: prometheus.yml
    46  ---
    47  apiVersion: v1
    48  kind: Service
    49  metadata:
    50    name: prometheus-${PROJECT}
    51    labels:
    52      app: prometheus
    53      project: ${PROJECT}
    54  spec:
    55    ports:
    56    - name: prometheus
    57      port: 9090
    58      targetPort: prometheus-port
    59    selector:
    60      app: prometheus
    61      project: ${PROJECT}
    62  ---
    63  kind: PersistentVolumeClaim
    64  apiVersion: v1
    65  metadata:
    66    name: prometheus-${PROJECT}-database-claim
    67    labels:
    68      app: prometheus
    69      project: ${PROJECT}
    70    annotations:
    71      volume.alpha.kubernetes.io/storage-class: value
    72  spec:
    73    accessModes:
    74      - ReadWriteOnce
    75    resources:
    76      requests:
    77        storage: 100Gi