Skip to content

Commit

Permalink
feat(router): move deis-router to use Deployments
Browse files Browse the repository at this point in the history
RC for deis-router 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 5af9b84 commit 7fbeb3f
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 7 deletions.
59 changes: 59 additions & 0 deletions router-dev/tpl/deis-router-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#helm:generate helm tpl -d $HELM_GENERATE_DIR/tpl/generate_params.toml -o $HELM_GENERATE_DIR/manifests/deis-router-deployment.yaml $HELM_GENERATE_DIR/tpl/deis-router-deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deis-router
namespace: deis
labels:
heritage: deis
annotations:
helm-keep: "true"
{{- if ne .router.platformDomain "" }}
router.deis.io/nginx.platformDomain: {{ .router.platformDomain }}
{{- end }}
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: deis-router
template:
metadata:
labels:
app: deis-router
spec:
serviceAccount: deis-router
containers:
- name: deis-router
image: quay.io/{{.router.org}}/router:{{env "ROUTER_GIT_TAG" | default .router.dockerTag}}
imagePullPolicy: {{.router.pullPolicy}}
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 8080
hostPort: 80
- containerPort: 6443
hostPort: 443
- containerPort: 2222
hostPort: 2222
- containerPort: 9090
hostPort: 9090
livenessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 1
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 1
timeoutSeconds: 1
8 changes: 4 additions & 4 deletions router-dev/tpl/deis-router-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ metadata:
router.deis.io/nginx.platformDomain: {{ .router.platformDomain }}
{{- end }}
spec:
replicas: 1
replicas: 0
selector:
app: deis-router
app: deis-router-deprecated
template:
metadata:
labels:
app: deis-router
app: deis-router-deprecated
spec:
serviceAccount: deis-router
containers:
- name: deis-router
image: quay.io/{{.router.org}}/router:{{.router.dockerTag}}
image: quay.io/{{.router.org}}/router:{{env "ROUTER_GIT_TAG" | default .router.dockerTag}}
imagePullPolicy: {{.router.pullPolicy}}
env:
- name: POD_NAMESPACE
Expand Down
59 changes: 59 additions & 0 deletions workflow-dev/tpl/deis-router-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#helm:generate helm tpl -d $HELM_GENERATE_DIR/tpl/generate_params.toml -o $HELM_GENERATE_DIR/manifests/deis-router-deployment.yaml $HELM_GENERATE_DIR/tpl/deis-router-deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deis-router
namespace: deis
labels:
heritage: deis
annotations:
helm-keep: "true"
{{- if ne .router.platformDomain "" }}
router.deis.io/nginx.platformDomain: {{ .router.platformDomain }}
{{- end }}
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: deis-router
template:
metadata:
labels:
app: deis-router
spec:
serviceAccount: deis-router
containers:
- name: deis-router
image: quay.io/{{.router.org}}/router:{{env "ROUTER_GIT_TAG" | default .router.dockerTag}}
imagePullPolicy: {{.router.pullPolicy}}
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 8080
hostPort: 80
- containerPort: 6443
hostPort: 443
- containerPort: 2222
hostPort: 2222
- containerPort: 9090
hostPort: 9090
livenessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 1
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 1
timeoutSeconds: 1
6 changes: 3 additions & 3 deletions workflow-dev/tpl/deis-router-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ metadata:
router.deis.io/nginx.platformDomain: {{ .router.platformDomain }}
{{- end }}
spec:
replicas: 1
replicas: 0
selector:
app: deis-router
app: deis-router-deprecated
template:
metadata:
labels:
app: deis-router
app: deis-router-deprecated
spec:
serviceAccount: deis-router
containers:
Expand Down

0 comments on commit 7fbeb3f

Please sign in to comment.