Skip to content

Commit

Permalink
Skip tls section when tls is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Apr 9, 2024
1 parent 6827138 commit e460c49
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
17 changes: 14 additions & 3 deletions helmfile.d/00-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ releases:
value: {{ .Values.maintainer_email }}
- name: graylog.ingress.hosts
values: [graylog.{{ .Values.server_name }}]
{{- $values := .Values.graylog }}
{{- $useTLS := or (not (hasKey $values ".ingress")) (not (kindIs "invalid" .Values.ingress.tls)) }}
{{- if $useTLS }}
- name: graylog.ingress.tls[0].secretName
value: radar-base-tls
- name: graylog.ingress.tls[0].hosts
values: ["graylog.{{ .Values.server_name }}"]
{{ end }}

- name: fluent-bit
namespace: graylog
Expand Down Expand Up @@ -79,24 +83,31 @@ releases:
value: {{ .Values.server_name }}
- name: kube-prometheus-stack.prometheus.ingress.hosts
values: ["prometheus.{{ .Values.server_name }}"]
- name: kube-prometheus-stack.grafana.ingress.hosts
values: ["grafana.{{ .Values.server_name }}"]
{{- $values := .Values.kube_prometheus_stack }}
{{- $useTLS := or (not (hasKey $values ".ingress")) (not (kindIs "invalid" .Values.ingress.tls)) }}
{{- if $useTLS }}
- name: kube-prometheus-stack.prometheus.ingress.tls[0].secretName
value: radar-base-tls-prometheus
- name: kube-prometheus-stack.prometheus.ingress.tls[0].hosts
values: ["prometheus.{{ .Values.server_name }}"]

- name: kube-prometheus-stack.alertmanager.ingress.hosts
values: ["alertmanager.{{ .Values.server_name }}"]
- name: kube-prometheus-stack.alertmanager.ingress.tls[0].secretName
value: radar-base-tls-alertmanager
- name: kube-prometheus-stack.alertmanager.ingress.tls[0].hosts
values: ["alertmanager.{{ .Values.server_name }}"]
{{ end }}

- name: kube-prometheus-stack.grafana.ingress.hosts
values: ["grafana.{{ .Values.server_name }}"]
{{- $values := .Values.kube_prometheus_stack }}
{{- $useTLS := or (not (hasKey $values ".ingress")) (not (kindIs "invalid" .Values.ingress.tls)) }}
{{- if $useTLS }}
- name: kube-prometheus-stack.grafana.ingress.tls[0].secretName
value: radar-base-tls-grafana
- name: kube-prometheus-stack.grafana.ingress.tls[0].hosts
values: ["grafana.{{ .Values.server_name }}"]
{{ end }}

- name: cert-manager
namespace: cert-manager
Expand Down
4 changes: 4 additions & 0 deletions helmfile.d/10-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ releases:
value: "{{ .Values.server_name }}"
- name: ingress.hosts[0].paths
values: ["/schema/?(.*)"]
{{- $values := .Values.cp_schema_registry }}
{{- $useTLS := or (not (hasKey $values ".ingress")) (not (kindIs "invalid" .Values.ingress.tls)) }}
{{- if $useTLS }}
- name: ingress.tls[0].secretName
value: radar-base-tls
- name: ingress.tls[0].hosts
values: ["{{ .Values.server_name }}"]
{{ end }}

- name: catalog-server
chart: radar/catalog-server
Expand Down
4 changes: 4 additions & 0 deletions helmfile.d/20-grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ releases:
values: ["dashboard.{{ .Values.server_name }}"]
- name: "grafana\\.ini.server.root_url"
value: "https://dashboard.{{ .Values.server_name }}/"
{{- $values := .Values.radar_grafana }}
{{- $useTLS := or (not (hasKey $values ".ingress")) (not (kindIs "invalid" .Values.ingress.tls)) }}
{{- if $useTLS }}
- name: ingress.tls[0].secretName
value: radar-base-tls-dashboard
- name: ingress.tls[0].hosts
values: ["dashboard.{{ .Values.server_name }}"]
{{- end }}
- name: "grafana\\.ini.metrics.basic_auth_username"
value: {{ .Values.grafana_metrics_username }}
- name: "grafana\\.ini.metrics.basic_auth_password"
Expand Down

0 comments on commit e460c49

Please sign in to comment.