Alerta: Add ingress templates

This change adds templates to the alerta chart for
enabling ingress to the application

Change-Id: I5e4fb71465555dc1cb113bc4332d3c3957f81a45
This commit is contained in:
Steven Fitzpatrick 2020-09-09 14:05:54 +00:00
parent c336d93530
commit c61c45f72d
5 changed files with 73 additions and 1 deletions

View File

@ -0,0 +1,18 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if and .Values.manifests.alerta.ingress .Values.network.alerta.ingress.public }}
{{- $ingressOpts := dict "envAll" . "backendService" "alerta" "backendServiceType" "alerta" "backendPort" "server" -}}
{{ $ingressOpts | include "helm-toolkit.manifests.ingress" }}
{{- end }}

View File

@ -0,0 +1,17 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.secret_ingress_tls }}
{{- include "helm-toolkit.manifests.secret_ingress_tls" ( dict "envAll" . "backendServiceType" "alerta" "backendService" "alerta" ) }}
{{- end }}

View File

@ -0,0 +1,18 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if and .Values.manifests.service_ingress .Values.network.alerta.ingress.public }}
{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "alerta" -}}
{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }}
{{- end }}

View File

@ -21,7 +21,7 @@ metadata:
name: alerta name: alerta
spec: spec:
ports: ports:
- name: http - name: server
{{ if .Values.network.alerta.node_port.enabled }} {{ if .Values.network.alerta.node_port.enabled }}
nodePort: {{ .Values.network.alerta.node_port.port }} nodePort: {{ .Values.network.alerta.node_port.port }}
{{ end }} {{ end }}

View File

@ -151,6 +151,10 @@ endpoints:
secrets: secrets:
postgresql: postgresql:
admin: postgresql-admin admin: postgresql-admin
tls:
alerta:
alerta:
public: alerta-tls-public
storage: [] storage: []
@ -160,6 +164,18 @@ jobs: []
network: network:
alerta: alerta:
ingress:
public: true
classes:
namespace: "nginx"
cluster: "nginx-cluster"
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/affinity: cookie
nginx.ingress.kubernetes.io/session-cookie-name: kube-ingress-session-alerta
nginx.ingress.kubernetes.io/session-cookie-hash: sha1
nginx.ingress.kubernetes.io/session-cookie-expires: "600"
nginx.ingress.kubernetes.io/session-cookie-max-age: "600"
node_port: node_port:
enabled: true enabled: true
port: 30480 port: 30480
@ -171,8 +187,11 @@ manifests:
configmap_bin: true configmap_bin: true
configmap_etc: true configmap_etc: true
deployment: true deployment: true
ingress: false
secret: true secret: true
secret_ingress_tls: false
service: true service: true
service_ingress: false
create_db: true create_db: true
conf: conf: