Skip to content

Commit

Permalink
Reverted removal of globalConfig from Helm
Browse files Browse the repository at this point in the history
  • Loading branch information
soneillf5 committed Apr 2, 2021
1 parent 20501b9 commit 773686f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
4 changes: 2 additions & 2 deletions deployments/helm-chart/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ spec:
- -enable-tls-passthrough={{ .Values.controller.enableTLSPassthrough }}
- -enable-snippets={{ .Values.controller.enableSnippets }}
- -enable-preview-policies={{ .Values.controller.enablePreviewPolicies }}
{{- if .Values.controller.globalConfiguration }}
- -global-configuration=$(POD_NAMESPACE)/{{ .Values.controller.globalConfiguration }}
{{- if .Values.controller.globalConfiguration.create }}
- -global-configuration=$(POD_NAMESPACE)/{{ include "nginx-ingress.name" . }}
{{- end }}
{{- end }}
- -ready-status={{ .Values.controller.readyStatus.enable }}
Expand Down
4 changes: 2 additions & 2 deletions deployments/helm-chart/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ spec:
- -enable-tls-passthrough={{ .Values.controller.enableTLSPassthrough }}
- -enable-snippets={{ .Values.controller.enableSnippets }}
- -enable-preview-policies={{ .Values.controller.enablePreviewPolicies }}
{{- if .Values.controller.globalConfiguration }}
- -global-configuration=$(POD_NAMESPACE)/{{ .Values.controller.globalConfiguration }}
{{- if .Values.controller.globalConfiguration.create }}
- -global-configuration=$(POD_NAMESPACE)/{{ include "nginx-ingress.name" . }}
{{- end }}
{{- end }}
- -ready-status={{ .Values.controller.readyStatus.enable }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ if .Values.controller.globalConfiguration.create }}
apiVersion: k8s.nginx.org/v1alpha1
kind: GlobalConfiguration
metadata:
name: {{ include "nginx-ingress.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
spec:
{{ toYaml .Values.controller.globalConfiguration.spec | indent 2 }}
{{- end }}
15 changes: 13 additions & 2 deletions deployments/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,19 @@ controller:
## Enable TLS Passthrough on port 443. Requires controller.enableCustomResources.
enableTLSPassthrough: false

## Specifies the name of the GlobalConfiguration custom resource. Requires controller.enableCustomResources.
globalConfiguration: ""
globalConfiguration:
## Creates the GlobalConfiguration custom resource. Requires controller.enableCustomResources.
create: false

## The spec of the GlobalConfiguration for defining the global configuration parameters of the Ingress Controller.
spec: {}
# listeners:
# - name: dns-udp
# port: 5353
# protocol: UDP
# - name: dns-tcp
# port: 5353
# protocol: TCP

## Enable custom NGINX configuration snippets in VirtualServer, VirtualServerRoute and TransportServer resources.
enableSnippets: false
Expand Down

0 comments on commit 773686f

Please sign in to comment.