-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from concourse/ci-workers-pr
add `ci-pr` deployment
- Loading branch information
Showing
10 changed files
with
156 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: ci | ||
apiVersion: v1 | ||
version: 0.1.1 | ||
appVersion: 0.0.139 | ||
description: A Concourse deployment used by Concourse to ship Concourse | ||
maintainers: | ||
- name: cirocosta | ||
email: [email protected] | ||
- name: kmannem | ||
email: [email protected] | ||
- name: svohra | ||
email: [email protected] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# ci-pr | ||
|
||
The `ci-pr` deployment deploys the workers used to run untrusted workloads that | ||
when someeone pushes a PR to `concourse/concourse`. | ||
|
||
It relies solely on the [Concourse chart](https://github.com/concourse/concourse-chart). | ||
|
||
|
||
## Restrictions | ||
|
||
Being a deployment that's supposed to accept untrusted workloads (from community | ||
PRs), network constraints are set to this deployment - see [`NetworkPolicy`]. | ||
|
||
[`NetworkPolicy`]: ./templates/network-policy.yaml | ||
|
||
|
||
## Deploying | ||
|
||
To deploy these workers, run `make deploy-ci-pr` from `/deployments/with-creds`. | ||
|
||
If you want to force a rolling update (recreate all pods), say after updating | ||
secrets, increment the `rollingUpdate` annotation declared in [`values.yaml`]. | ||
|
||
[`values.yaml`]: ./values.yaml | ||
|
||
|
||
## Debugging | ||
|
||
Metrics, logs, and debug endpoints work the same as for the [`ci`] deployment. | ||
Check that deployment's README to know more. | ||
|
||
[`ci`]: ../ci |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: concourse | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
version: 8.2.7 | ||
digest: sha256:cb825c3e6f195eb63ddf2401a73ce01bb9852d28cc8bb309b40e9f1393eaec00 | ||
generated: "2019-10-16T08:08:05.20907-04:00" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
dependencies: | ||
- name: concourse | ||
version: 8.2.7 | ||
repository: https://kubernetes-charts.storage.googleapis.com/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Take off! |
30 changes: 30 additions & 0 deletions
30
deployments/with-creds/ci-pr/templates/network-policy.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: only-external | ||
namespace: {{ .Release.Name }} | ||
spec: | ||
podSelector: | ||
matchLabels: | ||
release: {{ .Release.Name }} | ||
policyTypes: | ||
- Ingress | ||
- Egress | ||
ingress: [] # disallow any ingress | ||
egress: | ||
- ports: # allow dns | ||
- port: 53 | ||
protocol: TCP | ||
- port: 53 | ||
protocol: UDP | ||
- to: | ||
- namespaceSelector: # allow pods in `ci` namespace laeblled `ci-web` | ||
matchLabels: | ||
release: ci | ||
podSelector: | ||
matchLabels: | ||
app: ci-web | ||
- ipBlock: | ||
cidr: 0.0.0.0/0 # allow any out | ||
except: | ||
- 10.0.0.0/8 # except internal comms |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
postgresql: | ||
enabled: false | ||
|
||
concourse: | ||
image: concourse/concourse | ||
imageDigest: sha256:e93a0149e3efe9186e403a188066c93a96ea2f223b24d49952275b63dc3e2c4d | ||
|
||
postgresql: | ||
enabled: false | ||
|
||
web: | ||
enabled: false | ||
|
||
persistence: | ||
worker: | ||
storageClass: ssd | ||
size: 750Gi | ||
|
||
worker: | ||
replicas: 3 | ||
terminationGracePeriodSeconds: 3600 | ||
livenessProbe: | ||
periodSeconds: 60 | ||
failureThreshold: 10 | ||
timeoutSeconds: 45 | ||
nodeSelector: { cloud.google.com/gke-nodepool: ci-workers-pr } | ||
hardAntiAffinity: true | ||
env: | ||
- name: CONCOURSE_GARDEN_NETWORK_POOL | ||
value: "10.254.0.0/16" | ||
- name: CONCOURSE_GARDEN_MAX_CONTAINERS | ||
value: "500" | ||
- name: CONCOURSE_GARDEN_DENY_NETWORK | ||
value: "169.254.169.254/32" | ||
resources: | ||
limits: { cpu: 7500m, memory: 14Gi } | ||
requests: { cpu: 0m, memory: 0Gi } | ||
|
||
concourse: | ||
worker: | ||
rebalanceInterval: 2h | ||
baggageclaim: { driver: overlay } | ||
tag: "pr" | ||
healthcheckTimeout: 40s | ||
tsa: | ||
hosts: ['ci-web.ci.svc.cluster.local:2222'] |
This file contains 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
This file contains 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
This file contains 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