Skip to content

Commit

Permalink
Add (and use) ghproxy deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Clarke committed Oct 20, 2019
1 parent f9bf3e2 commit a36aca7
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
1 change: 1 addition & 0 deletions prow/bump.sh
Expand Up @@ -125,4 +125,5 @@ fi
${SED} -i "s/\(k8s-prow\/.\+:\)v[a-f0-9-]\+/\1${new_version}/I" \
prow/config.yaml prow/cluster/cluster.yaml \
prow/cluster/grandmatriarch_*.yaml \
prow/cluster/ghproxy.yaml \
prow/prowjobs/GoogleCloudPlatform/oss-test-infra/gcp-oss-test-infra-config.yaml
8 changes: 8 additions & 0 deletions prow/cluster/cluster.yaml
Expand Up @@ -91,6 +91,8 @@ spec:
- --skip-report=true
- --config-path=/etc/config/config.yaml
- --job-config-path=/etc/job-config
- --github-endpoint=http://ghproxy
- --github-endpoint=https://api.github.com
volumeMounts:
- name: config
mountPath: /etc/config
Expand Down Expand Up @@ -192,6 +194,8 @@ spec:
- --oauth-url=/github-login
- --github-token-path=/etc/github/oauth
- --github-oauth-config-file=/etc/githuboauth/secret
- --github-endpoint=http://ghproxy
- --github-endpoint=https://api.github.com
ports:
- name: http
containerPort: 8080
Expand Down Expand Up @@ -449,6 +453,8 @@ spec:
- --config-path=/etc/config/config.yaml
- --job-config-path=/etc/job-config
- --dry-run=false
- --github-endpoint=http://ghproxy
- --github-endpoint=https://api.github.com
ports:
- name: http
containerPort: 8888
Expand Down Expand Up @@ -805,6 +811,8 @@ spec:
- --config-path=/etc/config/config.yaml
- --job-config-path=/etc/job-config
- --dry-run=false
- --github-endpoint=http://ghproxy
- --github-endpoint=https://api.github.com
ports:
- name: http
containerPort: 8888
Expand Down
76 changes: 76 additions & 0 deletions prow/cluster/ghproxy.yaml
@@ -0,0 +1,76 @@
# Copyright 2019 Google LLC
#
# 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
#
# https://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: default
labels:
app: ghproxy
name: ghproxy
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 15Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: default
name: ghproxy
labels:
app: ghproxy
spec:
replicas: 1
template:
metadata:
labels:
app: ghproxy
spec:
containers:
- name: ghproxy
image: gcr.io/k8s-prow/ghproxy:v20191008-bbd30bc09
args:
- --cache-dir=/cache
- --cache-sizeGB=99
- --serve-metrics=true
ports:
- containerPort: 8888
volumeMounts:
- name: cache
mountPath: /cache
volumes:
- name: cache
persistentVolumeClaim:
claimName: ghproxy
---
apiVersion: v1
kind: Service
metadata:
labels:
app: ghproxy
namespace: default
name: ghproxy
spec:
ports:
- name: main
port: 80
protocol: TCP
targetPort: 8888
- name: metrics
port: 9090
selector:
app: ghproxy

0 comments on commit a36aca7

Please sign in to comment.