diff --git a/prow/ghproxy_deployment.yaml b/prow/ghproxy_deployment.yaml new file mode 100644 index 000000000000..42d2fbd0e904 --- /dev/null +++ b/prow/ghproxy_deployment.yaml @@ -0,0 +1,91 @@ +# Copyright 2021 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + namespace: prow + labels: + app: ghproxy + name: ghproxy +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi +# storageClassName: ssd +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: prow + name: ghproxy + labels: + app: ghproxy +spec: + selector: + matchLabels: + app: ghproxy + replicas: 1 + template: + metadata: + labels: + app: ghproxy + spec: + containers: + - name: ghproxy + image: gcr.io/k8s-prow/ghproxy:v20210318-ffb8032f91 + args: + - --cache-dir=/cache + - --cache-sizeGB=99 + - --serve-metrics=true + ports: + - containerPort: 8888 + resources: + requests: + cpu: 2 + memory: 2Gi + limits: + cpu: 2 + memory: 2Gi + securityContext: + readOnlyRootFilesystem: true + volumeMounts: + - name: cache + mountPath: /cache + volumes: + - name: cache + persistentVolumeClaim: + claimName: ghproxy + serviceAccountName: ghproxy + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: ghproxy + namespace: prow + name: ghproxy +spec: + ports: + - name: main + port: 80 + targetPort: 8888 + - name: metrics + port: 9090 + selector: + app: ghproxy + type: ClusterIP diff --git a/prow/ghproxy_rbac.yaml b/prow/ghproxy_rbac.yaml new file mode 100644 index 000000000000..a616353d182d --- /dev/null +++ b/prow/ghproxy_rbac.yaml @@ -0,0 +1,20 @@ +# Copyright 2021 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +kind: ServiceAccount +apiVersion: v1 +metadata: + name: ghproxy + namespace: prow