k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/config/prow/cluster/pushgateway_deployment.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    namespace: default
     5    name: pushgateway
     6    labels:
     7      app: pushgateway
     8  spec:
     9    replicas: 1
    10    selector:
    11      matchLabels:
    12        app: pushgateway
    13    template:
    14      metadata:
    15        labels:
    16          app: pushgateway
    17      spec:
    18        containers:
    19        - name: pushgateway
    20          image: prom/pushgateway:v0.4.0
    21          ports:
    22            - name: http
    23              containerPort: 9091
    24  ---
    25  apiVersion: v1
    26  kind: Service
    27  metadata:
    28    namespace: default
    29    name: pushgateway
    30    labels:
    31      app: pushgateway
    32  spec:
    33    ports:
    34    - name: pushgateway
    35      port: 80
    36      targetPort: http
    37    type: NodePort
    38    selector:
    39      app: pushgateway
    40  ---
    41  kind: ConfigMap
    42  apiVersion: v1
    43  metadata:
    44    namespace: default
    45    name: pushgateway-proxy-config
    46  data:
    47    nginx.conf: |-
    48      user www-data;
    49      worker_processes 4;
    50      pid /run/nginx.pid;
    51      error_log /dev/stdout;
    52      events {
    53        worker_connections 1024;
    54      }
    55      http {
    56        access_log /dev/stdout;
    57        server {
    58          listen 0.0.0.0:8081;
    59          location / {
    60            limit_except GET {
    61              deny all;
    62            }
    63            proxy_pass http://pushgateway;
    64          }
    65        }
    66      }
    67  ---
    68  apiVersion: apps/v1
    69  kind: Deployment
    70  metadata:
    71    namespace: default
    72    name: pushgateway-proxy
    73    labels:
    74      app: pushgateway-proxy
    75  spec:
    76    replicas: 1
    77    selector:
    78      matchLabels:
    79        app: pushgateway-proxy
    80    template:
    81      metadata:
    82        labels:
    83          app: pushgateway-proxy
    84      spec:
    85        containers:
    86        - name: nginx
    87          ports:
    88            - name: http
    89              containerPort: 8081
    90          image: nginx:1
    91          volumeMounts:
    92          - name: config-volume
    93            mountPath: /etc/nginx/
    94        volumes:
    95        - name: config-volume
    96          configMap:
    97            name: pushgateway-proxy-config
    98  ---
    99  apiVersion: v1
   100  kind: Service
   101  metadata:
   102    namespace: default
   103    name: pushgateway-external
   104    labels:
   105      app: pushgateway-external
   106  spec:
   107    ports:
   108    - name: pushgateway-external
   109      port: 80
   110      targetPort: http
   111    type: NodePort
   112    selector:
   113      app: pushgateway-proxy