Skip to content

Commit

Permalink
feat(registry): move deis-registry to use Deployments
Browse files Browse the repository at this point in the history
RC for deis-registry 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 69831ed commit 31cbcc9
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
60 changes: 60 additions & 0 deletions workflow-dev/tpl/deis-registry-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#helm:generate helm template -o $HELM_GENERATE_DIR/manifests/deis-registry-deployment.yaml -d $HELM_GENERATE_DIR/tpl/generate_params.toml $HELM_GENERATE_DIR/tpl/deis-registry-deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deis-registry
namespace: deis
labels:
heritage: deis
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: deis-registry
template:
metadata:
labels:
app: deis-registry
spec:
serviceAccount: deis-registry
containers:
- name: deis-registry
image: quay.io/{{.registry.org}}/registry:{{env "REGISTRY_GIT_TAG" | default .registry.dockerTag}}
imagePullPolicy: {{.registry.pullPolicy}}
livenessProbe:
httpGet:
path: /v2/
port: 5000
initialDelaySeconds: 1
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /v2/
port: 5000
initialDelaySeconds: 1
timeoutSeconds: 1
env:
- name: REGISTRY_STORAGE_DELETE_ENABLED
value: "true"
- name: REGISTRY_LOG_LEVEL
value: info
- name: REGISTRY_STORAGE
value: "{{ or (env "STORAGE_TYPE") (.storage)}}"
ports:
- containerPort: 5000
volumeMounts:
- name: registry-storage
mountPath: /var/lib/registry
- name: registry-creds
mountPath: /var/run/secrets/deis/registry/creds
volumes:
- name: registry-storage
emptyDir: {}
- name: registry-creds
secret:
secretName: objectstorage-keyfile
6 changes: 3 additions & 3 deletions workflow-dev/tpl/deis-registry-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-registry
app: deis-registry-deprecated
template:
metadata:
labels:
app: deis-registry
app: deis-registry-deprecated
spec:
serviceAccount: deis-registry
containers:
Expand Down

0 comments on commit 31cbcc9

Please sign in to comment.