-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm): Add ingress to the helm chart (#640)
* Added ingress values. * Added most of the ingress * Fixed indentations. * Commented out the host. * Updated the values so they would actually read the files. * Added tls secret name. * Added tls secret. * Added the option for ingress class name. * Disabled the ingress by default. * Added explanation at the readme. * Updated the readme to the actual behaviour. * Updated the readme template to generate warning about enabling the ingress. * Updated the readme. * Fix docs for tls secret for the ingress. * Bumped the chart version. * Updated the ingress part at the readme.
- Loading branch information
1 parent
f5faab5
commit dde9ee5
Showing
7 changed files
with
139 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{{- if (.Values.ingress).enabled -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ include "sql-exporter.fullname" . }} | ||
labels: | ||
{{- include "sql-exporter.labels" . | nindent 4 }} | ||
{{- with .Values.ingress.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.ingressClassName }} | ||
ingressClassName: {{ .Values.ingress.ingressClassName }} | ||
{{- end }} | ||
{{- if (.Values.ingress.tls).enabled }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.host | required "Ingress host is required if tls is enabled!" }} | ||
secretName: {{ include "sql-exporter.tls.name" . }} | ||
{{- end }} | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ include "sql-exporter.fullname" . }} | ||
port: | ||
number: {{ .Values.service.port }} | ||
{{- if .Values.ingress.host }} | ||
host: {{ .Values.ingress.host }} | ||
{{- end }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# --------------------------------------------------------------------- | ||
# -- This secret holds the tls key and cert of sql_exporter's ingress | ||
# --------------------------------------------------------------------- | ||
{{- if and (((.Values.ingress).tls).enabled) (not ((.Values.ingress).tls).secretName) -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "sql-exporter.tls.name" . }} | ||
labels: | ||
{{- include "sql-exporter.labels" . | nindent 4 }} | ||
type: Opaque | ||
data: | ||
tls.crt: {{ (tpl (.Values.ingress.tls.crt | required "crt is required if you want to create tls secret.") .) | required "crt is required if you want to create tls secret." | b64enc | quote }} | ||
tls.key: {{ (tpl (.Values.ingress.tls.key | required "private key is required if you want to create tls secret.") .) | required "private key is required if you want to create tls secret." | b64enc | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters