forked from kubernetes/k8s.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrier.yaml
More file actions
242 lines (241 loc) · 8.23 KB
/
crier.yaml
File metadata and controls
242 lines (241 loc) · 8.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# Copyright 2019 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.
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: default
name: crier
labels:
app: crier
spec:
replicas: 1
selector:
matchLabels:
app: crier
template:
metadata:
labels:
app: crier
spec:
serviceAccountName: crier
terminationGracePeriodSeconds: 30
containers:
- name: crier
image: us-docker.pkg.dev/k8s-infra-prow/images/crier:v20251223-f0341d7b5
args:
- --blob-storage-workers=1
- --config-path=/etc/config/config.yaml
- --github-endpoint=http://ghproxy
- --github-endpoint=https://api.github.com
- --github-token-path=/etc/github/oauth
- --github-workers=5
- --job-config-path=/etc/job-config
- --kubernetes-blob-storage-workers=1
- --slack-token-file=/etc/slack/token
- --slack-workers=1
env:
# Use KUBECONFIG envvar rather than --kubeconfig flag in order to provide multiple configs to merge.
- name: KUBECONFIG
value: "/etc/kubeconfig-k8s-infra-prow/kubeconfig:/etc/kubeconfig-k8s-infra-prow-build/kubeconfig:/etc/kubeconfig-k8s-infra-prow-build-trusted/kubeconfig:/etc/kubeconfig-k8s-infra-aks-prow-build/kubeconfig:/etc/kubeconfig-eks-prow-build-cluster/kubeconfig:/etc/kubeconfig-k8s-infra-kops-prow-build/kubeconfig:/etc/k8s-infra-ppc64le-prow-build-kubeconfig/kubeconfig:/etc/k8s-infra-s390x-prow-build-kubeconfig/kubeconfig"
# AWS_ variables needed to assume role to access the prow-build-cluster EKS cluster.
- name: AWS_ROLE_ARN
value: arn:aws:iam::468814281478:role/Prow-EKS-Admin
- name: AWS_WEB_IDENTITY_TOKEN_FILE
value: /var/run/secrets/aws-iam-token/serviceaccount/token
- name: AWS_REGION
value: us-east-2
# Azure variables needed to authenticate to AKS clusters with Azure AD Integration
- name: AZURE_CLIENT_ID # AZURE_CLIENT_ID is being overloaded with Azure Workload ID
value: "cabf5f22-ec7e-4e84-9e35-c02e57ca555d"
- name: AZURE_SUBSCRIPTION_ID
value: "0e46bd28-a80f-4d3a-8200-d9eb8d80cb2e"
- name: AZURE_TENANT_ID
value: "097f89a0-9286-43d2-9a1a-08f1d49b1af8"
- name: AZURE_FEDERATED_TOKEN_FILE
value: "/var/run/secrets/azure-token/serviceaccount/token"
ports:
- name: metrics
containerPort: 9090
volumeMounts:
- mountPath: /etc/kubeconfig-k8s-infra-prow
name: kubeconfig-k8s-infra-prow
readOnly: true
- mountPath: /etc/kubeconfig-k8s-infra-prow-build
name: kubeconfig-k8s-infra-prow-build
readOnly: true
- mountPath: /etc/kubeconfig-k8s-infra-prow-build-trusted
name: kubeconfig-k8s-infra-prow-build-trusted
readOnly: true
- mountPath: /etc/kubeconfig-k8s-infra-aks-prow-build
name: kubeconfig-k8s-infra-aks-prow-build
readOnly: true
- mountPath: /etc/kubeconfig-eks-prow-build-cluster
name: kubeconfig-eks-prow-build-cluster
readOnly: true
- mountPath: /etc/kubeconfig-k8s-infra-kops-prow-build
name: kubeconfig-k8s-infra-kops-prow-build
readOnly: true
- mountPath: /etc/k8s-infra-ppc64le-prow-build-kubeconfig
name: kubeconfig-k8s-infra-ppc64le-prow-build
readOnly: true
- mountPath: /etc/k8s-infra-s390x-prow-build-kubeconfig
name: kubeconfig-k8s-infra-s390x-prow-build
readOnly: true
- name: config
mountPath: /etc/config
readOnly: true
- name: job-config
mountPath: /etc/job-config
readOnly: true
- name: oauth
mountPath: /etc/github
readOnly: true
- name: slack
mountPath: /etc/slack
readOnly: true
# AWS IAM token needed to assume role to access the prow-build-cluster EKS cluster.
- name: aws-iam-token
mountPath: /var/run/secrets/aws-iam-token/serviceaccount
readOnly: true
# Azure Token needed for workload identity
- name: azure-token
mountPath: "/var/run/secrets/azure-token/serviceaccount"
readOnly: true
volumes:
- name: config
configMap:
name: config
- name: job-config
configMap:
name: job-config
- name: oauth
secret:
secretName: oauth-token
- name: slack
secret:
secretName: slack-token
- name: kubeconfig-k8s-infra-prow
secret:
defaultMode: 420
secretName: kubeconfig-k8s-infra-prow
- name: kubeconfig-k8s-infra-prow-build
secret:
defaultMode: 420
secretName: kubeconfig-k8s-infra-prow-build
- name: kubeconfig-k8s-infra-prow-build-trusted
secret:
defaultMode: 420
secretName: kubeconfig-k8s-infra-prow-build-trusted
- name: kubeconfig-k8s-infra-aks-prow-build
secret:
defaultMode: 420
secretName: kubeconfig-k8s-infra-aks-prow-build
- name: kubeconfig-eks-prow-build-cluster
secret:
defaultMode: 420
secretName: kubeconfig-eks-prow-build-cluster
- name: kubeconfig-k8s-infra-kops-prow-build
secret:
defaultMode: 420
secretName: kubeconfig-k8s-infra-kops-prow-build
- name: kubeconfig-k8s-infra-ppc64le-prow-build
secret:
defaultMode: 420
secretName: kubeconfig-k8s-infra-ppc64le-prow-build
- name: kubeconfig-k8s-infra-s390x-prow-build
secret:
defaultMode: 420
secretName: kubeconfig-k8s-infra-s390x-prow-build
# AWS IAM token needed to assume role to access the prow-build-cluster EKS cluster.
- name: aws-iam-token
projected:
defaultMode: 420
sources:
- serviceAccountToken:
audience: sts.amazonaws.com
expirationSeconds: 86400
path: token
# Azure Token needed for workload identity
- name: azure-token
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 86400
path: token
audience: api://AzureADTokenExchange
---
apiVersion: v1
kind: Service
metadata:
labels:
app: crier
namespace: default
name: crier
spec:
ports:
- name: metrics
port: 9090
protocol: TCP
selector:
app: crier
---
kind: ServiceAccount
apiVersion: v1
metadata:
annotations:
iam.gke.io/gcp-service-account: prow-control-plane@k8s-infra-prow.iam.gserviceaccount.com
name: crier
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: crier
rules:
- apiGroups:
- "prow.k8s.io"
resources:
- "prowjobs"
verbs:
- "get"
- "watch"
- "list"
- "patch"
- apiGroups:
- ""
resources:
- "pods"
- "events"
verbs:
- "get"
- "list"
- apiGroups:
- ""
resources:
- "pods"
verbs:
- "patch"
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: crier
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: crier
subjects:
- kind: ServiceAccount
name: crier