github.com/yrj2011/jx-test-infra@v0.0.0-20190529031832-7a2065ee98eb/prow/cluster/starter.yaml (about) 1 # This file contains Kubernetes YAML files for the most important prow 2 # components. Don't edit resources in this file. Instead, pull them out into 3 # their own files. 4 --- 5 apiVersion: v1 6 kind: ConfigMap 7 metadata: 8 name: plugins 9 data: 10 plugins.yaml: "" 11 --- 12 apiVersion: v1 13 kind: ConfigMap 14 metadata: 15 name: config 16 data: 17 config.yaml: | 18 periodics: 19 - interval: 10m 20 agent: kubernetes 21 name: echo-test 22 spec: 23 containers: 24 - image: alpine 25 command: ["/bin/date"] 26 --- 27 apiVersion: apiextensions.k8s.io/v1beta1 28 kind: CustomResourceDefinition 29 metadata: 30 name: prowjobs.prow.k8s.io 31 spec: 32 group: prow.k8s.io 33 version: v1 34 names: 35 kind: ProwJob 36 singular: prowjob 37 plural: prowjobs 38 scope: Namespaced 39 validation: 40 openAPIV3Schema: 41 properties: 42 spec: 43 properties: 44 max_concurrency: 45 type: integer 46 minimum: 0 47 type: 48 type: string 49 enum: 50 - "presubmit" 51 - "postsubmit" 52 - "periodic" 53 - "batch" 54 status: 55 properties: 56 state: 57 type: string 58 enum: 59 - "triggered" 60 - "pending" 61 - "success" 62 - "failure" 63 - "aborted" 64 - "error" 65 anyOf: 66 - not: 67 properties: 68 state: 69 type: string 70 enum: 71 - "success" 72 - "failure" 73 - "error" 74 - "aborted" 75 - required: 76 - completionTime 77 --- 78 apiVersion: extensions/v1beta1 79 kind: Deployment 80 metadata: 81 name: hook 82 labels: 83 app: hook 84 spec: 85 replicas: 2 86 strategy: 87 type: RollingUpdate 88 rollingUpdate: 89 maxSurge: 1 90 maxUnavailable: 1 91 template: 92 metadata: 93 labels: 94 app: hook 95 spec: 96 serviceAccountName: "hook" 97 terminationGracePeriodSeconds: 180 98 containers: 99 - name: hook 100 image: gcr.io/k8s-prow/hook:v20180723-3632407bc 101 imagePullPolicy: Always 102 args: 103 - --dry-run=false 104 ports: 105 - name: http 106 containerPort: 8888 107 volumeMounts: 108 - name: hmac 109 mountPath: /etc/webhook 110 readOnly: true 111 - name: oauth 112 mountPath: /etc/github 113 readOnly: true 114 - name: config 115 mountPath: /etc/config 116 readOnly: true 117 - name: plugins 118 mountPath: /etc/plugins 119 readOnly: true 120 volumes: 121 - name: hmac 122 secret: 123 secretName: hmac-token 124 - name: oauth 125 secret: 126 secretName: oauth-token 127 - name: config 128 configMap: 129 name: config 130 - name: plugins 131 configMap: 132 name: plugins 133 --- 134 apiVersion: v1 135 kind: Service 136 metadata: 137 name: hook 138 spec: 139 selector: 140 app: hook 141 ports: 142 - port: 8888 143 type: NodePort 144 --- 145 apiVersion: extensions/v1beta1 146 kind: Deployment 147 metadata: 148 name: plank 149 labels: 150 app: plank 151 spec: 152 replicas: 1 # Do not scale up. 153 template: 154 metadata: 155 labels: 156 app: plank 157 spec: 158 serviceAccountName: "plank" 159 containers: 160 - name: plank 161 image: gcr.io/k8s-prow/plank:v20180723-3632407bc 162 args: 163 - --dry-run=false 164 volumeMounts: 165 - name: oauth 166 mountPath: /etc/github 167 readOnly: true 168 - name: config 169 mountPath: /etc/config 170 readOnly: true 171 volumes: 172 - name: oauth 173 secret: 174 secretName: oauth-token 175 - name: config 176 configMap: 177 name: config 178 --- 179 apiVersion: extensions/v1beta1 180 kind: Deployment 181 metadata: 182 name: sinker 183 labels: 184 app: sinker 185 spec: 186 replicas: 1 187 template: 188 metadata: 189 labels: 190 app: sinker 191 spec: 192 serviceAccountName: "sinker" 193 containers: 194 - name: sinker 195 image: gcr.io/k8s-prow/sinker:v20180723-3632407bc 196 volumeMounts: 197 - name: config 198 mountPath: /etc/config 199 readOnly: true 200 volumes: 201 - name: config 202 configMap: 203 name: config 204 --- 205 apiVersion: extensions/v1beta1 206 kind: Deployment 207 metadata: 208 name: deck 209 labels: 210 app: deck 211 spec: 212 replicas: 2 213 strategy: 214 type: RollingUpdate 215 rollingUpdate: 216 maxSurge: 1 217 maxUnavailable: 1 218 template: 219 metadata: 220 labels: 221 app: deck 222 spec: 223 serviceAccountName: "deck" 224 terminationGracePeriodSeconds: 30 225 containers: 226 - name: deck 227 image: gcr.io/k8s-prow/deck:v20180723-3632407bc 228 args: 229 - --hook-url=http://hook:8888/plugin-help 230 ports: 231 - name: http 232 containerPort: 8080 233 volumeMounts: 234 - name: config 235 mountPath: /etc/config 236 readOnly: true 237 volumes: 238 - name: config 239 configMap: 240 name: config 241 --- 242 apiVersion: v1 243 kind: Service 244 metadata: 245 name: deck 246 spec: 247 selector: 248 app: deck 249 ports: 250 - port: 80 251 targetPort: 8080 252 type: NodePort 253 --- 254 apiVersion: extensions/v1beta1 255 kind: Deployment 256 metadata: 257 name: horologium 258 labels: 259 app: horologium 260 spec: 261 replicas: 1 262 template: 263 metadata: 264 labels: 265 app: horologium 266 spec: 267 serviceAccountName: "horologium" 268 terminationGracePeriodSeconds: 30 269 containers: 270 - name: horologium 271 image: gcr.io/k8s-prow/horologium:v20180723-3632407bc 272 volumeMounts: 273 - name: config 274 mountPath: /etc/config 275 readOnly: true 276 volumes: 277 - name: config 278 configMap: 279 name: config 280 --- 281 apiVersion: extensions/v1beta1 282 kind: Ingress 283 metadata: 284 name: ing 285 spec: 286 rules: 287 - http: 288 paths: 289 - path: /* 290 backend: 291 serviceName: deck 292 servicePort: 80 293 - path: /hook 294 backend: 295 serviceName: hook 296 servicePort: 8888 297 --- 298 kind: ServiceAccount 299 apiVersion: v1 300 metadata: 301 name: "deck" 302 --- 303 kind: RoleBinding 304 apiVersion: rbac.authorization.k8s.io/v1beta1 305 metadata: 306 name: "deck" 307 roleRef: 308 apiGroup: rbac.authorization.k8s.io 309 kind: Role 310 name: "deck" 311 subjects: 312 - kind: ServiceAccount 313 name: "deck" 314 --- 315 kind: Role 316 apiVersion: rbac.authorization.k8s.io/v1beta1 317 metadata: 318 name: "deck" 319 rules: 320 - apiGroups: 321 - "" 322 resources: 323 - pods/log 324 verbs: 325 - get 326 - apiGroups: 327 - "prow.k8s.io" 328 resources: 329 - prowjobs 330 verbs: 331 - get 332 - list 333 --- 334 kind: ServiceAccount 335 apiVersion: v1 336 metadata: 337 name: "horologium" 338 --- 339 kind: Role 340 apiVersion: rbac.authorization.k8s.io/v1beta1 341 metadata: 342 name: "horologium" 343 rules: 344 - apiGroups: 345 - "prow.k8s.io" 346 resources: 347 - prowjobs 348 verbs: 349 - create 350 - list 351 --- 352 kind: RoleBinding 353 apiVersion: rbac.authorization.k8s.io/v1beta1 354 metadata: 355 name: "horologium" 356 roleRef: 357 apiGroup: rbac.authorization.k8s.io 358 kind: Role 359 name: "horologium" 360 subjects: 361 - kind: ServiceAccount 362 name: "horologium" 363 --- 364 kind: ServiceAccount 365 apiVersion: v1 366 metadata: 367 name: "plank" 368 --- 369 kind: Role 370 apiVersion: rbac.authorization.k8s.io/v1beta1 371 metadata: 372 name: "plank" 373 rules: 374 - apiGroups: 375 - "" 376 resources: 377 - pods 378 verbs: 379 - create 380 - delete 381 - list 382 - apiGroups: 383 - "prow.k8s.io" 384 resources: 385 - prowjobs 386 verbs: 387 - create 388 - list 389 - update 390 --- 391 kind: RoleBinding 392 apiVersion: rbac.authorization.k8s.io/v1beta1 393 metadata: 394 name: "plank" 395 roleRef: 396 apiGroup: rbac.authorization.k8s.io 397 kind: Role 398 name: "plank" 399 subjects: 400 - kind: ServiceAccount 401 name: "plank" 402 --- 403 kind: ServiceAccount 404 apiVersion: v1 405 metadata: 406 name: "sinker" 407 --- 408 kind: Role 409 apiVersion: rbac.authorization.k8s.io/v1beta1 410 metadata: 411 name: "sinker" 412 rules: 413 - apiGroups: 414 - "" 415 resources: 416 - pods 417 verbs: 418 - delete 419 - list 420 - apiGroups: 421 - "prow.k8s.io" 422 resources: 423 - prowjobs 424 verbs: 425 - delete 426 - list 427 --- 428 kind: RoleBinding 429 apiVersion: rbac.authorization.k8s.io/v1beta1 430 metadata: 431 name: "sinker" 432 roleRef: 433 apiGroup: rbac.authorization.k8s.io 434 kind: Role 435 name: "sinker" 436 subjects: 437 - kind: ServiceAccount 438 name: "sinker" 439 --- 440 apiVersion: v1 441 kind: ServiceAccount 442 metadata: 443 name: "hook" 444 --- 445 kind: Role 446 apiVersion: rbac.authorization.k8s.io/v1beta1 447 metadata: 448 name: "hook" 449 rules: 450 - apiGroups: 451 - "prow.k8s.io" 452 resources: 453 - prowjobs 454 verbs: 455 - create 456 - get 457 - apiGroups: 458 - "" 459 resources: 460 - configmaps 461 verbs: 462 - update 463 --- 464 kind: RoleBinding 465 apiVersion: rbac.authorization.k8s.io/v1beta1 466 metadata: 467 name: "hook" 468 roleRef: 469 apiGroup: rbac.authorization.k8s.io 470 kind: Role 471 name: "hook" 472 subjects: 473 - kind: ServiceAccount 474 name: "hook"