Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various helm chart fixes and improvements #221

Merged
merged 5 commits into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions artemis-chart/templates/backend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: backend
app: {{ .Release.Name }}
name: backend
name: {{ .Release.Name }}-backend
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
Expand Down Expand Up @@ -175,6 +175,10 @@ spec:
name: {{ .Release.Name }}-volumes
name: backend-configmap
- persistentVolumeClaim:
claimName: {{ .Release.Name }}-pvc
claimName: {{ .Release.Name }}-backend-pvc
name: backend-pvc
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
14 changes: 10 additions & 4 deletions artemis-chart/templates/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: frontend
app: {{ .Release.Name }}
name: frontend
name: {{ .Release.Name }}-frontend
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
Expand Down Expand Up @@ -154,7 +154,8 @@ spec:
- mountPath: /etc/artemis/
name: frontend-configmap
- mountPath: /etc/webapp/db/
name: frontend-emptydir
name: frontend-pvc
subPath: webbapp-db
restartPolicy: Always
volumes:
- configMap:
Expand All @@ -165,6 +166,11 @@ spec:
- key: logging.yaml
path: logging.yaml
name: frontend-configmap
- emptyDir: {}
name: frontend-emptydir
- persistentVolumeClaim:
claimName: {{ .Release.Name }}-frontend-pvc
name: frontend-pvc
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
6 changes: 5 additions & 1 deletion artemis-chart/templates/graphql-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: graphql
app: {{ .Release.Name }}
name: graphql
name: {{ .Release.Name }}-graphql
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy: {}
Expand Down Expand Up @@ -49,4 +49,8 @@ spec:
name: graphql
resources: {}
restartPolicy: Always
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
14 changes: 12 additions & 2 deletions artemis-chart/templates/ingresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ .Release.Name }}-backend-ingress
name: {{ .Release.Name }}-frontend-ingress
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.ingress.frontend.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.ingress.tlsEnabled }}
tls:
- hosts:
- {{ .Values.ingress.host | default "artemis.com" }}
secretName: {{ .Release.Name }}-secret-tls
{{- end }}
rules:
- host: {{ .Values.ingress.host | default "artemis.com" }}
http:
Expand All @@ -29,12 +34,17 @@ metadata:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
nginx.ingress.kubernetes.io/rewrite-target: /v1alpha1/graphql
{{- range $key, $value := .Values.ingress.graphql.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}

spec:
{{- if .Values.ingress.tlsEnabled }}
tls:
- hosts:
- {{ .Values.ingress.host | default "artemis.com" }}
secretName: {{ .Release.Name }}-secret-tls
{{- end }}
rules:
- host: {{ .Values.ingress.host | default "artemis.com" }}
http:
Expand Down
8 changes: 6 additions & 2 deletions artemis-chart/templates/monitor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: monitor
app: {{ .Release.Name }}
name: monitor
name: {{ .Release.Name }}-monitor
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
Expand Down Expand Up @@ -169,6 +169,10 @@ spec:
name: {{ .Release.Name }}-volumes
name: monitor-configmap
- persistentVolumeClaim:
claimName: {{ .Release.Name }}-pvc
claimName: {{ .Release.Name }}-monitor-pvc
name: monitor-pvc
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
6 changes: 5 additions & 1 deletion artemis-chart/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
io.kompose.service: nginx
app: {{ .Release.Name }}
name: nginx
name: {{ .Release.Name }}-nginx
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
Expand Down Expand Up @@ -48,5 +48,9 @@ spec:
- key: tls.key
path: key.pem
name: nginx-secret0
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
{{- end -}}
2 changes: 1 addition & 1 deletion artemis-chart/templates/nginx-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
labels:
io.kompose.service: nginx
name: nginx
name: {{ .Release.Name }}-nginx
spec:
ports:
- name: "80"
Expand Down
6 changes: 5 additions & 1 deletion artemis-chart/templates/pg-amqp-bridge-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: pg-amqp-bridge
app: {{ .Release.Name }}
name: pg-amqp-bridge
name: {{ .Release.Name }}-pg-amqp-bridge
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
Expand Down Expand Up @@ -39,4 +39,8 @@ spec:
name: pg-amqp-bridge
resources: {}
restartPolicy: Always
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
14 changes: 8 additions & 6 deletions artemis-chart/templates/postgres-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: postgres
app: {{ .Release.Name }}
name: postgres
name: {{ .Release.Name }}-postgres
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
Expand Down Expand Up @@ -66,8 +66,8 @@ spec:
- mountPath: /docker-entrypoint-initdb.d/libs/rabbitmq/
name: postgres-configmap3
- mountPath: /var/lib/postgresql/data/
name: postgres-emptydir
# subPath: postgres-data
name: postgres-pvc
subPath: postgres-data
- mountPath: /tmp/
name: postgres-pvc
subPath: postgres-backup
Expand All @@ -94,9 +94,11 @@ spec:
- key: schema.sql
path: schema.sql
name: postgres-configmap3
- emptyDir: {}
name: postgres-emptydir
- persistentVolumeClaim:
claimName: {{ .Release.Name }}-pvc
claimName: {{ .Release.Name }}-postgres-pvc
name: postgres-pvc
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
6 changes: 5 additions & 1 deletion artemis-chart/templates/postgrest-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: postgrest
app: {{ .Release.Name }}
name: postgrest
name: {{ .Release.Name }}-postgrest
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy: {}
Expand Down Expand Up @@ -38,4 +38,8 @@ spec:
name: postgrest
resources: {}
restartPolicy: Always
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
57 changes: 54 additions & 3 deletions artemis-chart/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,63 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-pvc
name: {{ .Release.Name }}-postgres-pvc
labels:
app: {{ .Release.Name }}
spec:
accessModes:
- ReadWriteMany
- {{ .Values.pvc.accessMode | default "ReadWriteMany" }}
resources:
requests:
storage: 1Gi
storage: {{ .Values.pvc.storage }}
{{- if hasKey .Values.pvc "storageClassName" }}
storageClassName: {{ .Values.pvc.storageClassName }}
{{- end }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-monitor-pvc
labels:
app: {{ .Release.Name }}
spec:
accessModes:
- {{ .Values.pvc.accessMode | default "ReadWriteMany" }}
resources:
requests:
storage: {{ .Values.pvc.storage }}
{{- if hasKey .Values.pvc "storageClassName" }}
storageClassName: {{ .Values.pvc.storageClassName }}
{{- end }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-backend-pvc
labels:
app: {{ .Release.Name }}
spec:
accessModes:
- {{ .Values.pvc.accessMode | default "ReadWriteMany" }}
resources:
requests:
storage: {{ .Values.pvc.storage }}
{{- if hasKey .Values.pvc "storageClassName" }}
storageClassName: {{ .Values.pvc.storageClassName }}
{{- end }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-frontend-pvc
labels:
app: {{ .Release.Name }}
spec:
accessModes:
- {{ .Values.pvc.accessMode | default "ReadWriteMany" }}
resources:
requests:
storage: {{ .Values.pvc.storage }}
{{- if hasKey .Values.pvc "storageClassName" }}
storageClassName: {{ .Values.pvc.storageClassName }}
{{- end }}
6 changes: 5 additions & 1 deletion artemis-chart/templates/rabbitmq-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
io.kompose.service: rabbitmq
app: {{ .Release.Name }}
name: rabbitmq
name: {{ .Release.Name }}-rabbitmq
spec:
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
Expand Down Expand Up @@ -41,4 +41,8 @@ spec:
- configMap:
name: {{ .Release.Name }}-volumes
name: rabbitmq-configmap0
nodeSelector:
{{- range $key, $value := .Values.nodeSelector }}
{{ $key }}: {{ $value }}
{{- end }}
status: {}
2 changes: 2 additions & 0 deletions artemis-chart/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data:
adminPass: {{ .Values.adminPass | default "admin123" | b64enc }}
rabbitmqPass: {{ .Values.rabbitmqPass | default "guest" | b64enc }}
---
{{- if or (not .Values.ingress.enabled) (.Values.ingress.tlsEnabled) -}}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -25,3 +26,4 @@ type: kubernetes.io/tls
data:
tls.crt: {{ required "A valid .Values.certificate entry required!" .Values.certificate | b64enc }}
tls.key: {{ required "A valid .Values.privKey entry required!" .Values.privKey | b64enc }}
{{- end -}}
15 changes: 13 additions & 2 deletions artemis-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,18 @@ svc:
ingress:
enabled: true
# Used to create an Ingress record.
hosts:
- artemis.com
host: artemis.com
tlsEnabled: true
annotations:
kubernetes.io/ingress.class: nginx
graphql:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /v1alpha1/graphql
frontend:
annotations:
pvc:
storage: 1Gi
# storageClassName: rook-block
# accessMode: ReadWriteMany

nodeSelector: