github.com/abayer/test-infra@v0.0.5/prow/cluster/ghproxy_deployment.yaml (about)

     1  # Copyright 2018 The Kubernetes Authors All rights reserved.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  kind: PersistentVolumeClaim
    16  apiVersion: v1
    17  metadata:
    18    labels:
    19      app: ghproxy
    20    name: ghproxy
    21  spec:
    22    accessModes:
    23      - ReadWriteOnce
    24    resources:
    25      requests:
    26        storage: 100Gi
    27    # gce-ssd-retain is specified in prow/cluster/gce-ssd-retain_storageclass.yaml
    28    #
    29    # If you are setting up your own Prow instance you can do any of the following:
    30    # 1) Delete this to use the default storage class for your cluster.
    31    # 2) Specify your own storage class.
    32    # 3) If you are using GKE you can use the gce-ssd-retain storage class. It can be
    33    #    created with: `kubectl create -f prow/cluster/gce-ssd-retain_storageclass.yaml
    34    storageClassName: gce-ssd-retain
    35  ---
    36  apiVersion: extensions/v1beta1
    37  kind: Deployment
    38  metadata:
    39    name: ghproxy
    40    labels:
    41      app: ghproxy
    42  spec:
    43    replicas: 1 
    44    template:
    45      metadata:
    46        labels:
    47          app: ghproxy
    48      spec:
    49        containers:
    50        - name: ghproxy
    51          image: gcr.io/k8s-testimages/ghproxy:latest
    52          imagePullPolicy: Always
    53          args:
    54          - --cache-dir=/cache
    55          - --cache-sizeGB=99
    56          - --push-gateway=pushgateway
    57          ports:
    58          - containerPort: 8888
    59          volumeMounts:
    60          - name: cache
    61            mountPath: /cache
    62        volumes:
    63        - name: cache
    64          persistentVolumeClaim:
    65            claimName: ghproxy
    66        # run on our dedicated node
    67        tolerations:
    68        - key: "dedicated"
    69          operator: "Equal"
    70          value: "ghproxy"
    71          effect: "NoSchedule"
    72        nodeSelector:
    73          dedicated: "ghproxy"