Last active
June 23, 2019 03:50
-
-
Save jbarrick-mesosphere/d5e054869e1100677bcf95973a33e142 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
namespace: prow | |
name: plugins | |
data: | |
plugins.yaml: | | |
plugins: | |
jbarrick-mesosphere/prow-test: | |
- size | |
- trigger | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
namespace: prow | |
name: config | |
data: | |
config.yaml: | | |
prowjob_namespace: prow-jobs | |
pod_namespace: prow-tests | |
periodics: | |
- interval: 10m | |
agent: kubernetes | |
name: echo-test | |
spec: | |
containers: | |
- image: alpine | |
command: ["/bin/date"] | |
presubmits: | |
jbarrick-mesosphere/prow-test: | |
- name: test | |
spec: | |
containers: | |
- image: alpine | |
command: ["/bin/printenv"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Provision the Prow namespace and necessary secrets. | |
resource "kubernetes_namespace" "prow" { | |
metadata { | |
name = "prow" | |
} | |
} | |
resource "kubernetes_secret" "prow-hmac" { | |
depends_on = ["kubernetes_namespace.prow"] | |
metadata { | |
name = "hmac-token" | |
namespace = "prow" | |
} | |
data { | |
hmac = "${random_string.prow-hmac.result}" | |
} | |
type = "Opaque" | |
} | |
resource "kubernetes_secret" "oauth-token" { | |
depends_on = ["kubernetes_namespace.prow"] | |
metadata { | |
name = "oauth-token" | |
namespace = "prow" | |
} | |
data { | |
oauth = "${data.aws_kms_secrets.secrets.plaintext["github"]}" | |
} | |
type = "Opaque" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: | |
name: prowjobs.prow.k8s.io | |
spec: | |
group: prow.k8s.io | |
version: v1 | |
names: | |
kind: ProwJob | |
singular: prowjob | |
plural: prowjobs | |
scope: Namespaced | |
validation: | |
openAPIV3Schema: | |
properties: | |
spec: | |
properties: | |
max_concurrency: | |
type: integer | |
minimum: 0 | |
type: | |
type: string | |
enum: | |
- "presubmit" | |
- "postsubmit" | |
- "periodic" | |
- "batch" | |
status: | |
properties: | |
state: | |
type: string | |
enum: | |
- "triggered" | |
- "pending" | |
- "success" | |
- "failure" | |
- "aborted" | |
- "error" | |
anyOf: | |
- not: | |
properties: | |
state: | |
type: string | |
enum: | |
- "success" | |
- "failure" | |
- "error" | |
- "aborted" | |
- required: | |
- completionTime | |
additionalPrinterColumns: | |
- name: Job | |
type: string | |
description: The name of the job being run. | |
JSONPath: .spec.job | |
- name: BuildId | |
type: string | |
description: The ID of the job being run. | |
JSONPath: .status.build_id | |
- name: Type | |
type: string | |
description: The type of job being run. | |
JSONPath: .spec.type | |
- name: Org | |
type: string | |
description: The org for which the job is running. | |
JSONPath: .spec.refs.org | |
- name: Repo | |
type: string | |
description: The repo for which the job is running. | |
JSONPath: .spec.refs.repo | |
- name: Pulls | |
type: string | |
description: The pulls for which the job is running. | |
JSONPath: ".spec.refs.pulls[*].number" | |
- name: StartTime | |
type: date | |
description: When the job started running. | |
JSONPath: .status.startTime | |
- name: CompletionTime | |
type: date | |
description: When the job finished running. | |
JSONPath: .status.completionTime | |
- name: State | |
description: The state of the job. | |
type: string | |
JSONPath: .status.state | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
namespace: prow | |
name: hook | |
labels: | |
app: hook | |
spec: | |
replicas: 2 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
template: | |
metadata: | |
labels: | |
app: hook | |
spec: | |
serviceAccountName: "hook" | |
terminationGracePeriodSeconds: 180 | |
containers: | |
- name: hook | |
image: gcr.io/k8s-prow/hook:v20190509-e4185298e | |
imagePullPolicy: Always | |
args: | |
- --dry-run=false | |
- --config-path=/etc/config/config.yaml | |
ports: | |
- name: http | |
containerPort: 8888 | |
volumeMounts: | |
- name: hmac | |
mountPath: /etc/webhook | |
readOnly: true | |
- name: oauth | |
mountPath: /etc/github | |
readOnly: true | |
- name: config | |
mountPath: /etc/config | |
readOnly: true | |
- name: plugins | |
mountPath: /etc/plugins | |
readOnly: true | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
port: 8081 | |
initialDelaySeconds: 3 | |
periodSeconds: 3 | |
readinessProbe: | |
httpGet: | |
path: /healthz/ready | |
port: 8081 | |
initialDelaySeconds: 10 | |
periodSeconds: 3 | |
timeoutSeconds: 600 | |
volumes: | |
- name: hmac | |
secret: | |
secretName: hmac-token | |
- name: oauth | |
secret: | |
secretName: oauth-token | |
- name: config | |
configMap: | |
name: config | |
- name: plugins | |
configMap: | |
name: plugins | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
namespace: prow | |
name: hook | |
spec: | |
selector: | |
app: hook | |
ports: | |
- port: 8888 | |
type: NodePort | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
namespace: prow | |
name: plank | |
labels: | |
app: plank | |
spec: | |
replicas: 1 # Do not scale up. | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: plank | |
spec: | |
serviceAccountName: "plank" | |
containers: | |
- name: plank | |
image: gcr.io/k8s-prow/plank:v20190509-e4185298e | |
args: | |
- --dry-run=false | |
- --config-path=/etc/config/config.yaml | |
volumeMounts: | |
- name: oauth | |
mountPath: /etc/github | |
readOnly: true | |
- name: config | |
mountPath: /etc/config | |
readOnly: true | |
volumes: | |
- name: oauth | |
secret: | |
secretName: oauth-token | |
- name: config | |
configMap: | |
name: config | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
namespace: prow | |
name: sinker | |
labels: | |
app: sinker | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: sinker | |
spec: | |
serviceAccountName: "sinker" | |
containers: | |
- name: sinker | |
image: gcr.io/k8s-prow/sinker:v20190509-e4185298e | |
args: | |
- --config-path=/etc/config/config.yaml | |
volumeMounts: | |
- name: config | |
mountPath: /etc/config | |
readOnly: true | |
volumes: | |
- name: config | |
configMap: | |
name: config | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
namespace: prow | |
name: deck | |
labels: | |
app: deck | |
spec: | |
replicas: 2 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
template: | |
metadata: | |
labels: | |
app: deck | |
spec: | |
serviceAccountName: "deck" | |
terminationGracePeriodSeconds: 30 | |
containers: | |
- name: deck | |
image: gcr.io/k8s-prow/deck:v20190509-e4185298e | |
args: | |
- --config-path=/etc/config/config.yaml | |
- --tide-url=http://tide/ | |
- --hook-url=http://hook:8888/plugin-help | |
ports: | |
- name: http | |
containerPort: 8080 | |
volumeMounts: | |
- name: config | |
mountPath: /etc/config | |
readOnly: true | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
port: 8081 | |
initialDelaySeconds: 3 | |
periodSeconds: 3 | |
readinessProbe: | |
httpGet: | |
path: /healthz/ready | |
port: 8081 | |
initialDelaySeconds: 10 | |
periodSeconds: 3 | |
timeoutSeconds: 600 | |
volumes: | |
- name: config | |
configMap: | |
name: config | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
namespace: prow | |
name: deck | |
spec: | |
selector: | |
app: deck | |
ports: | |
- port: 80 | |
targetPort: 8080 | |
type: NodePort | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
namespace: prow | |
name: horologium | |
labels: | |
app: horologium | |
spec: | |
replicas: 1 # Do not scale up. | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: horologium | |
spec: | |
serviceAccountName: "horologium" | |
terminationGracePeriodSeconds: 30 | |
containers: | |
- name: horologium | |
image: gcr.io/k8s-prow/horologium:v20190509-e4185298e | |
args: | |
- --config-path=/etc/config/config.yaml | |
volumeMounts: | |
- name: config | |
mountPath: /etc/config | |
readOnly: true | |
volumes: | |
- name: config | |
configMap: | |
name: config | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
namespace: prow | |
name: tide | |
labels: | |
app: tide | |
spec: | |
replicas: 1 # Do not scale up. | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: tide | |
spec: | |
serviceAccountName: "tide" | |
containers: | |
- name: tide | |
image: gcr.io/k8s-prow/tide:v20190509-e4185298e | |
args: | |
- --dry-run=false | |
- --config-path=/etc/config/config.yaml | |
ports: | |
- name: http | |
containerPort: 8888 | |
volumeMounts: | |
- name: oauth | |
mountPath: /etc/github | |
readOnly: true | |
- name: config | |
mountPath: /etc/config | |
readOnly: true | |
volumes: | |
- name: oauth | |
secret: | |
secretName: oauth-token | |
- name: config | |
configMap: | |
name: config | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
namespace: prow | |
name: tide | |
spec: | |
selector: | |
app: tide | |
ports: | |
- port: 80 | |
targetPort: 8888 | |
type: NodePort | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
namespace: prow | |
name: ing | |
annotations: | |
certmanager.k8s.io/cluster-issuer: letsencrypt | |
spec: | |
rules: | |
- host: prow.toolsinfra.mesosphe.re | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: deck | |
servicePort: 80 | |
- path: /hook | |
backend: | |
serviceName: hook | |
servicePort: 8888 | |
tls: | |
- hosts: | |
- prow.toolsinfra.mesosphe.re | |
secretName: prow-cert | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: statusreconciler | |
namespace: prow | |
labels: | |
app: statusreconciler | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: statusreconciler | |
spec: | |
serviceAccountName: statusreconciler | |
terminationGracePeriodSeconds: 180 | |
containers: | |
- name: statusreconciler | |
image: gcr.io/k8s-prow/status-reconciler:v20190509-e4185298e | |
args: | |
- --dry-run=false | |
- --continue-on-error=true | |
- --plugin-config=/etc/plugins/plugins.yaml | |
- --config-path=/etc/config/config.yaml | |
- --github-token-path=/etc/github/oauth | |
volumeMounts: | |
- name: oauth | |
mountPath: /etc/github | |
readOnly: true | |
- name: config | |
mountPath: /etc/config | |
readOnly: true | |
- name: plugins | |
mountPath: /etc/plugins | |
readOnly: true | |
volumes: | |
- name: oauth | |
secret: | |
secretName: oauth-token | |
- name: config | |
configMap: | |
name: config | |
- name: plugins | |
configMap: | |
name: plugins | |
--- | |
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
namespace: prow | |
name: "deck" | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "deck" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "deck" | |
subjects: | |
- kind: ServiceAccount | |
name: "deck" | |
namespace: prow | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-tests | |
name: "deck" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "deck" | |
subjects: | |
- kind: ServiceAccount | |
name: "deck" | |
namespace: prow | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "deck" | |
rules: | |
- apiGroups: | |
- "prow.k8s.io" | |
resources: | |
- prowjobs | |
verbs: | |
- get | |
- list | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-tests | |
name: "deck" | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods/log | |
verbs: | |
- get | |
--- | |
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
namespace: prow | |
name: "horologium" | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "horologium" | |
rules: | |
- apiGroups: | |
- "prow.k8s.io" | |
resources: | |
- prowjobs | |
verbs: | |
- create | |
- list | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "horologium" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "horologium" | |
subjects: | |
- kind: ServiceAccount | |
name: "horologium" | |
namespace: prow | |
--- | |
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
namespace: prow | |
name: "plank" | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "plank" | |
rules: | |
- apiGroups: | |
- "prow.k8s.io" | |
resources: | |
- prowjobs | |
verbs: | |
- get | |
- create | |
- list | |
- update | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-tests | |
name: "plank" | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
verbs: | |
- create | |
- delete | |
- list | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-tests | |
name: "plank" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "plank" | |
subjects: | |
- kind: ServiceAccount | |
name: "plank" | |
namespace: prow | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "plank" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "plank" | |
subjects: | |
- kind: ServiceAccount | |
name: "plank" | |
namespace: prow | |
--- | |
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
namespace: prow | |
name: "sinker" | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "sinker" | |
rules: | |
- apiGroups: | |
- "prow.k8s.io" | |
resources: | |
- prowjobs | |
verbs: | |
- delete | |
- list | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-tests | |
name: "sinker" | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
verbs: | |
- delete | |
- list | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "sinker" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "sinker" | |
subjects: | |
- kind: ServiceAccount | |
name: "sinker" | |
namespace: prow | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-tests | |
name: "sinker" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "sinker" | |
subjects: | |
- kind: ServiceAccount | |
name: "sinker" | |
namespace: prow | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
namespace: prow | |
name: "hook" | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "hook" | |
rules: | |
- apiGroups: | |
- "prow.k8s.io" | |
resources: | |
- prowjobs | |
verbs: | |
- create | |
- get | |
- apiGroups: | |
- "" | |
resources: | |
- configmaps | |
verbs: | |
- create | |
- get | |
- update | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "hook" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "hook" | |
subjects: | |
- kind: ServiceAccount | |
name: "hook" | |
namespace: prow | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
namespace: prow | |
name: "tide" | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "tide" | |
rules: | |
- apiGroups: | |
- "prow.k8s.io" | |
resources: | |
- prowjobs | |
verbs: | |
- create | |
- list | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-tests | |
name: "tide" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "tide" | |
subjects: | |
- kind: ServiceAccount | |
name: "tide" | |
namespace: prow | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
namespace: prow | |
name: "statusreconciler" | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "statusreconciler" | |
rules: | |
- apiGroups: | |
- "prow.k8s.io" | |
resources: | |
- prowjobs | |
verbs: | |
- create | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
namespace: prow-jobs | |
name: "statusreconciler" | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: "statusreconciler" | |
subjects: | |
- kind: ServiceAccount | |
name: "statusreconciler" | |
namespace: prow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment