From 19ab551eef4263e3072874d4e50bcc3df63c1eff Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Wed, 25 Aug 2021 16:04:53 -0700 Subject: [PATCH] Trigger windows components in logging if either windows field is true --- .../patch/templates/_helpers.tpl.patch | 13 +++++++++++-- .../generated-changes/patch/values.yaml.patch | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/rancher-logging/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-logging/generated-changes/patch/templates/_helpers.tpl.patch index 3bd046f69..80d4d81e7 100644 --- a/packages/rancher-logging/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-logging/generated-changes/patch/templates/_helpers.tpl.patch @@ -1,6 +1,6 @@ --- charts-original/templates/_helpers.tpl +++ charts/templates/_helpers.tpl -@@ -56,3 +56,92 @@ +@@ -56,3 +56,101 @@ {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} @@ -14,13 +14,22 @@ +{{- end -}} + +{{- define "windowsEnabled" }} ++{{ $windowsEnabled := false }} +{{- if not (kindIs "invalid" .Values.global.cattle.windows) }} +{{- if not (kindIs "invalid" .Values.global.cattle.windows.enabled) }} +{{- if .Values.global.cattle.windows.enabled }} -+true ++{{- $windowsEnabled = true }} +{{- end }} +{{- end }} +{{- end }} ++{{- if not (kindIs "invalid" .Values.rke2Windows) }} ++{{- if not (kindIs "invalid" .Values.rke2Windows.enabled) }} ++{{- if .Values.rke2Windows.enabled }} ++{{- $windowsEnabled = true }} ++{{- end }} ++{{- end }} ++{{- end }} ++{{ $windowsEnabled }} +{{- end }} + +{{- define "windowsPathPrefix" -}} diff --git a/packages/rancher-logging/generated-changes/patch/values.yaml.patch b/packages/rancher-logging/generated-changes/patch/values.yaml.patch index 839d3d9c0..51ad683a7 100644 --- a/packages/rancher-logging/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-logging/generated-changes/patch/values.yaml.patch @@ -36,7 +36,7 @@ rbac: enabled: true psp: -@@ -95,3 +103,109 @@ +@@ -95,3 +103,117 @@ additionalLabels: {} metricRelabelings: [] relabelings: [] @@ -131,9 +131,10 @@ + cattle: + systemDefaultRegistry: "" + # Uncomment the below two lines to either enable or disable Windows logging. If this chart is -+ # installed via the Rancher UI, it will set this value to "true" if the cluster is a Windows ++ # installed via the Rancher UI, it will set this value to "true" if the cluster is an RKE1 Windows + # cluster. In that scenario, if you would like to disable Windows logging on Windows clusters, -+ # set the value below to "false". ++ # set both this value below and rke2Windows.enabled to false. ++ # + # windows: + # enabled: true + # Change the "dockerRootDirectory" if the default Docker directory has changed. @@ -146,3 +147,11 @@ + rkeWindowsPathPrefix: "c:\\" + seLinux: + enabled: false ++ ++# Uncomment the below two lines to either enable or disable Windows logging. If this chart is ++# installed via the Rancher UI, you will be able to set this value in an RKE2 Windows ++# cluster. In that scenario, if you would like to disable Windows logging on Windows clusters, ++# set this value below to false. ++# rke2Windows: ++# enabled: false +\ No newline at end of file