blob: 4491dc84f4acae892345d88621009e7ac5731eb3 [file] [log] [blame]
# start gerrit
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
labels:
app: gerrit
name: gerrit-storage
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
# volumeName: added automatically after volume creation
# See https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gerrit
labels:
app: gerrit
spec:
replicas: 1
selector:
matchLabels:
app: gerrit
template:
metadata:
labels:
app: gerrit
spec:
serviceAccountName: gerrit
terminationGracePeriodSeconds: 30
containers:
- name: gerrit
image: gcr.io/k8s-prow/gerrit:v20181203-6a1345b
args:
- --config-path=/etc/config/config.yaml
- --gerrit-projects=https://kunit-review.googlesource.com=linux
- --last-sync-fallback=/store/gerrit
volumeMounts:
- name: config
mountPath: /etc/config
readOnly: true
- name: gerrit-volume
mountPath: /store
volumes:
- name: config
configMap:
name: config
- name: gerrit-volume
persistentVolumeClaim:
claimName: gerrit-storage
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: "gerrit"
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: "gerrit"
rules:
- apiGroups:
- "prow.k8s.io"
resources:
- prowjobs
verbs:
- create
- list
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: "gerrit"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: "gerrit"
subjects:
- kind: ServiceAccount
name: "gerrit"