Skip to content

Commit

Permalink
feat(builder): move deis-builder to use Deployments
Browse files Browse the repository at this point in the history
RC for deis-builder is kept around so it can be taken out of rotation without needing manual intervention (see replicas 0 and changed labels)
  • Loading branch information
helgi committed Jul 26, 2016
1 parent 4173034 commit 106e022
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 3 deletions.
93 changes: 93 additions & 0 deletions workflow-dev/tpl/deis-builder-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#helm:generate helm template -o $HELM_GENERATE_DIR/manifests/deis-builder-deployment.yaml -d $HELM_GENERATE_DIR/tpl/generate_params.toml $HELM_GENERATE_DIR/tpl/deis-builder-deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deis-builder
namespace: deis
labels:
heritage: deis
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: deis-builder
template:
metadata:
labels:
app: deis-builder
spec:
serviceAccount: deis-builder
containers:
- name: deis-builder
image: quay.io/{{.builder.org}}/builder:{{ env "BUILDER_GIT_TAG" | default .builder.dockerTag}}
imagePullPolicy: {{.builder.pullPolicy}}
ports:
- containerPort: 2223
name: ssh
- containerPort: 8092
name: healthsrv
env:
- name: "HEALTH_SERVER_PORT"
value: "8092"
- name: "EXTERNAL_PORT"
value: "2223"
- name: BUILDER_STORAGE
value: "{{ or (env "STORAGE_TYPE") (.storage)}}"
# Set GIT_LOCK_TIMEOUT to number of minutes you want to wait to git push again to the same repository
- name: "GIT_LOCK_TIMEOUT"
value: "10"
- name: "SLUGBUILDER_IMAGE_NAME"
value: "quay.io/{{.slugbuilder.org}}/slugbuilder:{{ env "SLUGBUILDER_GIT_TAG" | default .slugbuilder.dockerTag }}"
- name: "DOCKERBUILDER_IMAGE_NAME"
value: "quay.io/{{.dockerbuilder.org}}/dockerbuilder:{{ env "DOCKERBUILDER_GIT_TAG" | default .dockerbuilder.dockerTag}}"
# This var needs to be passed so that the minio client (https://github.com/minio/mc) will work in Alpine linux
- name: "DOCKERIMAGE"
value: "1"
- name: "DEIS_DEBUG"
value: "{{ env "DEIS_DEBUG" | default "false" }}"
- name: "POD_NAMESPACE"
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: DEIS_BUILDER_KEY
valueFrom:
secretKeyRef:
name: builder-key-auth
key: builder-key
livenessProbe:
httpGet:
path: /healthz
port: 8092
initialDelaySeconds: 30
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /readiness
port: 8092
initialDelaySeconds: 30
timeoutSeconds: 1
volumeMounts:
- name: builder-key-auth
mountPath: /var/run/secrets/api/auth
readOnly: true
- name: builder-ssh-private-keys
mountPath: /var/run/secrets/deis/builder/ssh
readOnly: true
- name: objectstore-creds
mountPath: /var/run/secrets/deis/objectstore/creds
readOnly: true
volumes:
- name: builder-key-auth
secret:
secretName: builder-key-auth
- name: builder-ssh-private-keys
secret:
secretName: builder-ssh-private-keys
- name: objectstore-creds
secret:
secretName: objectstorage-keyfile
6 changes: 3 additions & 3 deletions workflow-dev/tpl/deis-builder-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ metadata:
labels:
heritage: deis
spec:
replicas: 1
replicas: 0
selector:
app: deis-builder
app: deis-builder-deprecated
template:
metadata:
labels:
app: deis-builder
app: deis-builder-deprecated
spec:
serviceAccount: deis-builder
containers:
Expand Down

0 comments on commit 106e022

Please sign in to comment.