Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

ingresses update for service merge #450

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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: 8 additions & 0 deletions charts/activiti-cloud-query/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default service name.
*/}}
{{- define "servicename" -}}
{{- $name := default (include "fullname" .) .Values.service.name -}}
{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
15 changes: 15 additions & 0 deletions charts/activiti-cloud-query/templates/ingress-audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- template "common.ingress" (list . "activiti.audit.ingress") -}}
{{- define "activiti.audit.ingress" -}}
pec:
rules:
{{- if include "common.ingress-host" . }}
- host: {{ template "common.ingress-host" . }}
http:
{{- else }}
- http:
{{- end }}
paths:
{{- if .Values.ingress.audit.enabled }}
- path: {{ template "common.ingress-path" . }}{{ tpl .Values.ingress.audit.path . }}
{{- end -}}
{{- end -}}
54 changes: 54 additions & 0 deletions charts/activiti-cloud-query/templates/ingress-notifications.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{{- if .Values.ingress.enabled }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}-notifications
labels:
app: {{ template "fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{ toYaml .Values.ingress.notificationsannotations | indent 8 }}
spec:
rules:
{{- if include "common.ingress-host" . }}
- host: {{ template "common.ingress-host" . }}
http:
{{- else }}
- http:
{{- end }}
paths:
{{- if .Values.ingress.actuator.enabled }}
- path: {{ template "common.ingress-path" . }}{{ tpl .Values.ingress.actuator.path . }}
backend:
serviceName: {{ template "servicename" . }}
servicePort: {{ .Values.service.externalPort }}
{{- end }}
{{- if .Values.ingress.web.enabled }}
- path: {{ template "common.ingress-path" . }}{{ tpl .Values.ingress.web.path . }}
backend:
serviceName: {{ template "servicename" . }}
servicePort: {{ .Values.service.externalPort }}
{{- end }}
{{- if .Values.ingress.ws.enabled }}
- path: {{ template "common.ingress-path" . }}{{ tpl .Values.ingress.ws.path . }}
backend:
serviceName: {{ template "servicename" . }}
servicePort: {{ .Values.service.externalPort }}
{{- end }}
{{- if .Values.ingress.graphiql.enabled }}
- path: {{ template "common.ingress-path" . }}{{ tpl .Values.ingress.graphiql.path . }}
backend:
serviceName: {{ template "servicename" . }}
servicePort: {{ .Values.service.externalPort }}
{{- end }}
{{- if include "common.ingress-tls" . }}
tls:
- secretName: {{ template "common.ingress-tlssecretname" . }}
{{- if include "common.ingress-host" . }}
hosts:
- {{ template "common.ingress-host" . }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/activiti-cloud-query/templates/ingress-query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- template "common.ingress" (list . "activiti.query.ingress") -}}
{{- define "activiti.query.ingress" -}}
pec:
rules:
{{- if include "common.ingress-host" . }}
- host: {{ template "common.ingress-host" . }}
http:
{{- else }}
- http:
{{- end }}
paths:
{{- if .Values.ingress.query.enabled }}
- path: {{ template "common.ingress-path" . }}{{ tpl .Values.ingress.query.path . }}
{{- end -}}
{{- end -}}
3 changes: 0 additions & 3 deletions charts/activiti-cloud-query/templates/ingress.yaml

This file was deleted.

50 changes: 49 additions & 1 deletion charts/activiti-cloud-query/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,52 @@ ingress:
tlsSecret:

## Ingress annotations done as key:value pairs
annotations: {}
annotations:
ingress:
# Set to true to enable ingress record generation

#path: /notifications # configure base path template for ingress, i.e. /{{ .Release.Name }}/notifications

actuator:
enabled: true
path: /notifications/actuator
graphiql:
enabled: true
path: /notifications/graphiql
web:
enabled: true
path: /notifications/graphql
ws:
enabled: true
path: /notifications/ws/graphql
query:
enabled: true
path: /query/?(.*)
audit:
enabled: true
path: /audit/?(.*)




annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/cors-allow-header: X-Forwarded-For, X-Forwarded-Proto,
X-Forwarded-Port, X-Forwarded-Prefix, Authorization, Content-Type, Accept
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/x-forwarded-prefix: "true"

notificationsannotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "GET,PUT,POST,DELETE,PATCH,OPTIONS"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers 'Access-Control-Allow-Origin: $http_origin';
nginx.ingress.kubernetes.io/x-forwarded-prefix: "true"
nginx.ingress.kubernetes.io/affinity: cookie
nginx.ingress.kubernetes.io/session-cookie-name: "activiti-cloud-notifications-graphql-route"
nginx.ingress.kubernetes.io/session-cookie-hash: "md5"
nginx.ingress.kubernetes.io/session-cookie-path: '{{ include "common.ingress-path" . }}'