Skip to content

Commit

Permalink
Fix flower deployment on k8s (#191)
Browse files Browse the repository at this point in the history
* Namespace k8s object names with release name

* Remove unused kompose annotations
  • Loading branch information
c-w authored May 26, 2019
1 parent 2fd43b6 commit efeed75
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 55 deletions.
4 changes: 2 additions & 2 deletions helm/templates/api-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
creationTimestamp: null
name: api
name: {{ .Release.Name }}-api
spec:
maxReplicas: 9
minReplicas: 3
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: api
name: {{ .Release.Name }}-api
targetCPUUtilizationPercentage: 75
9 changes: 3 additions & 6 deletions helm/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert --file=compose.yml --chart
kompose.version: 1.13.0 (84fa826)
creationTimestamp: null
labels:
io.kompose.service: api
name: api
io.kompose.service: {{ .Release.Name }}-api
name: {{ .Release.Name }}-api
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: api
io.kompose.service: {{ .Release.Name }}-api
spec:
containers:
- name: api
Expand Down
9 changes: 3 additions & 6 deletions helm/templates/api-service.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert --file=compose.yml --chart
kompose.version: 1.13.0 (84fa826)
creationTimestamp: null
labels:
io.kompose.service: api
name: api
io.kompose.service: {{ .Release.Name }}-api
name: {{ .Release.Name }}-api
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: api
io.kompose.service: {{ .Release.Name }}-api
status:
loadBalancer: {}
9 changes: 3 additions & 6 deletions helm/templates/flower-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert --file=compose.yml --chart
kompose.version: 1.13.0 (84fa826)
creationTimestamp: null
labels:
io.kompose.service: flower
name: flower
io.kompose.service: {{ .Release.Name }}-flower
name: {{ .Release.Name }}-flower
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: flower
io.kompose.service: {{ .Release.Name }}-flower
spec:
containers:
- name: flower
Expand Down
9 changes: 3 additions & 6 deletions helm/templates/flower-service.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert --file=compose.yml --chart
kompose.version: 1.13.0 (84fa826)
creationTimestamp: null
labels:
io.kompose.service: flower
name: flower
io.kompose.service: {{ .Release.Name }}-flower
name: {{ .Release.Name }}-flower
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: flower
io.kompose.service: {{ .Release.Name }}-flower
status:
loadBalancer: {}
2 changes: 1 addition & 1 deletion helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
name: {{ .Release.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
Expand Down
4 changes: 2 additions & 2 deletions helm/templates/nginx-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
creationTimestamp: null
name: nginx
name: {{ .Release.Name }}-nginx
spec:
maxReplicas: 5
minReplicas: 3
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: nginx
name: {{ .Release.Name }}-nginx
targetCPUUtilizationPercentage: 75
21 changes: 9 additions & 12 deletions helm/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert --file=compose.yml --chart
kompose.version: 1.13.0 (84fa826)
creationTimestamp: null
labels:
io.kompose.service: nginx
name: nginx
io.kompose.service: {{ .Release.Name }}-nginx
name: {{ .Release.Name }}-nginx
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: nginx
io.kompose.service: {{ .Release.Name }}-nginx
spec:
containers:
- name: nginx
Expand All @@ -24,17 +21,17 @@ spec:
- name: DNS_RESOLVER
value: 127.0.0.1:53 ipv6=off
- name: HOSTNAME_FLOWER
value: flower:8080
value: "{{ .Release.Name }}-flower:8080"
- name: HOSTNAME_CLIENT_METRICS
value: api:8080
value: "{{ .Release.Name }}-api:8080"
- name: HOSTNAME_CLIENT_READ
value: api:8080
value: "{{ .Release.Name }}-api:8080"
- name: HOSTNAME_CLIENT_WRITE
value: api:8080
value: "{{ .Release.Name }}-api:8080"
- name: HOSTNAME_EMAIL_RECEIVE
value: api:8080
value: "{{ .Release.Name }}-api:8080"
- name: HOSTNAME_CLIENT_REGISTER
value: api:8080
value: "{{ .Release.Name }}-api:8080"
ports:
- containerPort: 8888
resources: {}
Expand Down
9 changes: 3 additions & 6 deletions helm/templates/nginx-service.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert --file=compose.yml --chart
kompose.version: 1.13.0 (84fa826)
creationTimestamp: null
labels:
io.kompose.service: nginx
name: nginx
io.kompose.service: {{ .Release.Name }}-nginx
name: {{ .Release.Name }}-nginx
spec:
ports:
- name: "8888"
port: 8888
targetPort: 8888
selector:
io.kompose.service: nginx
io.kompose.service: {{ .Release.Name }}-nginx
status:
loadBalancer: {}
4 changes: 2 additions & 2 deletions helm/templates/worker-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
creationTimestamp: null
name: worker
name: {{ .Release.Name }}-worker
spec:
maxReplicas: 9
minReplicas: 3
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: worker
name: {{ .Release.Name }}-worker
targetCPUUtilizationPercentage: 75
9 changes: 3 additions & 6 deletions helm/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert --file=compose.yml --chart
kompose.version: 1.13.0 (84fa826)
creationTimestamp: null
labels:
io.kompose.service: worker
name: worker
io.kompose.service: {{ .Release.Name }}-worker
name: {{ .Release.Name }}-worker
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: worker
io.kompose.service: {{ .Release.Name }}-worker
spec:
containers:
- name: worker
Expand Down

0 comments on commit efeed75

Please sign in to comment.