From 63d29a6873157fb6de0aaee3d1f7682f4c1ce56b Mon Sep 17 00:00:00 2001 From: Dani Louca Date: Fri, 26 May 2023 11:34:52 -0400 Subject: [PATCH] runAsUser SecurityContext not working for windows Signed-off-by: Dani Louca --- .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../rendered_manifests/deployment-gateway.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../rendered_manifests/deployment-gateway.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../rendered_manifests/deployment-gateway.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../rendered_manifests/deployment-gateway.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../rendered_manifests/daemonset.yaml | 2 +- .../rendered_manifests/daemonset.yaml | 2 +- .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../deployment-cluster-receiver.yaml | 2 ++ .../splunk-otel-collector/templates/_helpers.tpl | 13 +++++++++++++ .../splunk-otel-collector/templates/daemonset.yaml | 6 +----- .../templates/deployment-cluster-receiver.yaml | 4 +--- .../templates/deployment-gateway.yaml | 4 +--- .../templates/revert-patch-log-dirs-hook.yaml | 2 +- 33 files changed, 71 insertions(+), 14 deletions(-) diff --git a/examples/add-receiver-creator/rendered_manifests/deployment-cluster-receiver.yaml b/examples/add-receiver-creator/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/add-receiver-creator/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/add-receiver-creator/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/add-sampler/rendered_manifests/deployment-cluster-receiver.yaml b/examples/add-sampler/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/add-sampler/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/add-sampler/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/collector-all-modes/rendered_manifests/deployment-cluster-receiver.yaml b/examples/collector-all-modes/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/collector-all-modes/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/collector-all-modes/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/collector-all-modes/rendered_manifests/deployment-gateway.yaml b/examples/collector-all-modes/rendered_manifests/deployment-gateway.yaml index a9b7ffe72a..3612e06aca 100644 --- a/examples/collector-all-modes/rendered_manifests/deployment-gateway.yaml +++ b/examples/collector-all-modes/rendered_manifests/deployment-gateway.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/collector-cluster-receiver-only/rendered_manifests/deployment-cluster-receiver.yaml b/examples/collector-cluster-receiver-only/rendered_manifests/deployment-cluster-receiver.yaml index 6523bd2676..19655b8a6a 100644 --- a/examples/collector-cluster-receiver-only/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/collector-cluster-receiver-only/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/collector-gateway-only/rendered_manifests/deployment-gateway.yaml b/examples/collector-gateway-only/rendered_manifests/deployment-gateway.yaml index 9a4a9277d6..68097e73ef 100644 --- a/examples/collector-gateway-only/rendered_manifests/deployment-gateway.yaml +++ b/examples/collector-gateway-only/rendered_manifests/deployment-gateway.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/crio-logging/rendered_manifests/deployment-cluster-receiver.yaml b/examples/crio-logging/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/crio-logging/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/crio-logging/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/default/rendered_manifests/deployment-cluster-receiver.yaml b/examples/default/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/default/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/default/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/distribution-aks/rendered_manifests/deployment-cluster-receiver.yaml b/examples/distribution-aks/rendered_manifests/deployment-cluster-receiver.yaml index 1d44059427..8248db1cc3 100644 --- a/examples/distribution-aks/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/distribution-aks/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/distribution-eks-fargate/rendered_manifests/deployment-cluster-receiver.yaml b/examples/distribution-eks-fargate/rendered_manifests/deployment-cluster-receiver.yaml index 751c75afa2..be253abca0 100644 --- a/examples/distribution-eks-fargate/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/distribution-eks-fargate/rendered_manifests/deployment-cluster-receiver.yaml @@ -47,6 +47,8 @@ spec: values: - otel-k8s-cluster-receiver topologyKey: kubernetes.io/hostname + securityContext: + runAsUser: "0" initContainers: - name: cluster-receiver-node-discoverer image: public.ecr.aws/amazonlinux/amazonlinux:latest diff --git a/examples/distribution-eks-fargate/rendered_manifests/deployment-gateway.yaml b/examples/distribution-eks-fargate/rendered_manifests/deployment-gateway.yaml index ea418ba26f..cc1512e949 100644 --- a/examples/distribution-eks-fargate/rendered_manifests/deployment-gateway.yaml +++ b/examples/distribution-eks-fargate/rendered_manifests/deployment-gateway.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/distribution-eks/rendered_manifests/deployment-cluster-receiver.yaml b/examples/distribution-eks/rendered_manifests/deployment-cluster-receiver.yaml index 129b652b5e..5296ed2ae4 100644 --- a/examples/distribution-eks/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/distribution-eks/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/distribution-gke-autopilot/rendered_manifests/deployment-cluster-receiver.yaml b/examples/distribution-gke-autopilot/rendered_manifests/deployment-cluster-receiver.yaml index 901c94c75b..420ceeecc9 100644 --- a/examples/distribution-gke-autopilot/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/distribution-gke-autopilot/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/distribution-gke/rendered_manifests/deployment-cluster-receiver.yaml b/examples/distribution-gke/rendered_manifests/deployment-cluster-receiver.yaml index 901c94c75b..420ceeecc9 100644 --- a/examples/distribution-gke/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/distribution-gke/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/distribution-openshift/rendered_manifests/deployment-cluster-receiver.yaml b/examples/distribution-openshift/rendered_manifests/deployment-cluster-receiver.yaml index fa3fe63a06..20c8a82bb1 100644 --- a/examples/distribution-openshift/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/distribution-openshift/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/enable-network-explorer/rendered_manifests/deployment-cluster-receiver.yaml b/examples/enable-network-explorer/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/enable-network-explorer/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/enable-network-explorer/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/enable-network-explorer/rendered_manifests/deployment-gateway.yaml b/examples/enable-network-explorer/rendered_manifests/deployment-gateway.yaml index a9b7ffe72a..3612e06aca 100644 --- a/examples/enable-network-explorer/rendered_manifests/deployment-gateway.yaml +++ b/examples/enable-network-explorer/rendered_manifests/deployment-gateway.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/enable-operator-and-auto-instrumentation/rendered_manifests/deployment-cluster-receiver.yaml b/examples/enable-operator-and-auto-instrumentation/rendered_manifests/deployment-cluster-receiver.yaml index 68e71a6264..d8b178bfd8 100644 --- a/examples/enable-operator-and-auto-instrumentation/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/enable-operator-and-auto-instrumentation/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/enabled-pprof-extension/rendered_manifests/deployment-cluster-receiver.yaml b/examples/enabled-pprof-extension/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/enabled-pprof-extension/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/enabled-pprof-extension/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/filter-container-metrics/rendered_manifests/deployment-cluster-receiver.yaml b/examples/filter-container-metrics/rendered_manifests/deployment-cluster-receiver.yaml index 07437a1774..a74e89e56f 100644 --- a/examples/filter-container-metrics/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/filter-container-metrics/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/fluentd-multiline-logs-java-stack-traces/rendered_manifests/deployment-cluster-receiver.yaml b/examples/fluentd-multiline-logs-java-stack-traces/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/fluentd-multiline-logs-java-stack-traces/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/fluentd-multiline-logs-java-stack-traces/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/kubernetes-windows-nodes/rendered_manifests/deployment-cluster-receiver.yaml b/examples/kubernetes-windows-nodes/rendered_manifests/deployment-cluster-receiver.yaml index 97891ae8fc..5fe78f7492 100644 --- a/examples/kubernetes-windows-nodes/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/kubernetes-windows-nodes/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: windows + securityContext: + {} containers: - name: otel-collector command: diff --git a/examples/only-logs-otel/rendered_manifests/daemonset.yaml b/examples/only-logs-otel/rendered_manifests/daemonset.yaml index 14918a399b..3d2b704eaa 100644 --- a/examples/only-logs-otel/rendered_manifests/daemonset.yaml +++ b/examples/only-logs-otel/rendered_manifests/daemonset.yaml @@ -99,7 +99,7 @@ spec: image: quay.io/signalfx/splunk-otel-collector:0.76.0 imagePullPolicy: IfNotPresent securityContext: - runAsUser: 0 + runAsUser: "0" env: - name: SPLUNK_MEMORY_TOTAL_MIB value: "500" diff --git a/examples/only-logs-with-extra-file-logs/rendered_manifests/daemonset.yaml b/examples/only-logs-with-extra-file-logs/rendered_manifests/daemonset.yaml index 8bad68392f..70f983dd1e 100644 --- a/examples/only-logs-with-extra-file-logs/rendered_manifests/daemonset.yaml +++ b/examples/only-logs-with-extra-file-logs/rendered_manifests/daemonset.yaml @@ -99,7 +99,7 @@ spec: image: quay.io/signalfx/splunk-otel-collector:0.76.0 imagePullPolicy: IfNotPresent securityContext: - runAsUser: 0 + runAsUser: "0" env: - name: SPLUNK_MEMORY_TOTAL_MIB value: "500" diff --git a/examples/only-metrics-platform/rendered_manifests/deployment-cluster-receiver.yaml b/examples/only-metrics-platform/rendered_manifests/deployment-cluster-receiver.yaml index 4242456313..a3e5ba0738 100644 --- a/examples/only-metrics-platform/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/only-metrics-platform/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/only-metrics/rendered_manifests/deployment-cluster-receiver.yaml b/examples/only-metrics/rendered_manifests/deployment-cluster-receiver.yaml index df0c451921..f22f2e148e 100644 --- a/examples/only-metrics/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/only-metrics/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/route-data-through-gateway-deployed-separately/rendered_manifests/deployment-cluster-receiver.yaml b/examples/route-data-through-gateway-deployed-separately/rendered_manifests/deployment-cluster-receiver.yaml index 52a5409e47..1d12fab10c 100644 --- a/examples/route-data-through-gateway-deployed-separately/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/route-data-through-gateway-deployed-separately/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/examples/use-proxy/rendered_manifests/deployment-cluster-receiver.yaml b/examples/use-proxy/rendered_manifests/deployment-cluster-receiver.yaml index 1b9816a288..c19f025207 100644 --- a/examples/use-proxy/rendered_manifests/deployment-cluster-receiver.yaml +++ b/examples/use-proxy/rendered_manifests/deployment-cluster-receiver.yaml @@ -35,6 +35,8 @@ spec: serviceAccountName: default-splunk-otel-collector nodeSelector: kubernetes.io/os: linux + securityContext: + runAsUser: "0" containers: - name: otel-collector command: diff --git a/helm-charts/splunk-otel-collector/templates/_helpers.tpl b/helm-charts/splunk-otel-collector/templates/_helpers.tpl index 24dc89faf3..8fff9efdd6 100644 --- a/helm-charts/splunk-otel-collector/templates/_helpers.tpl +++ b/helm-charts/splunk-otel-collector/templates/_helpers.tpl @@ -428,3 +428,16 @@ Whether clusterReceiver should be enabled {{- $clusterReceiver := fromYaml (include "splunk-otel-collector.clusterReceiver" .) }} {{- and $clusterReceiver.enabled (or (eq (include "splunk-otel-collector.metricsEnabled" .) "true") (eq (include "splunk-otel-collector.objectsOrEventsEnabled" .) "true")) -}} {{- end -}} + + +{{/* +Build the securityContext for Linux and Windows +*/}} +{{- define "splunk-otel-collector.securityContext" -}} +{{- if .isWindows }} +{{- $_ := unset .securityContext "runAsUser" }} +{{- else if (eq (toString .securityContext.runAsUser) "") }} +{{- $_ := set .securityContext "runAsUser" 0 }} +{{- end }} +{{- toYaml .securityContext }} +{{- end -}} diff --git a/helm-charts/splunk-otel-collector/templates/daemonset.yaml b/helm-charts/splunk-otel-collector/templates/daemonset.yaml index d3bcb9b12d..e654a60f3d 100644 --- a/helm-charts/splunk-otel-collector/templates/daemonset.yaml +++ b/helm-charts/splunk-otel-collector/templates/daemonset.yaml @@ -251,11 +251,7 @@ spec: imagePullPolicy: {{ .Values.image.otelcol.pullPolicy }} {{- if or $agent.securityContext (and (eq (include "splunk-otel-collector.logsEnabled" $) "true") (eq .Values.logsEngine "otel")) }} securityContext: - {{- if $agent.securityContext }} - {{- toYaml $agent.securityContext | nindent 10 }} - {{- else }} - runAsUser: 0 - {{- end }} + {{- include "splunk-otel-collector.securityContext" (dict "isWindows" .Values.isWindows "securityContext" $agent.securityContext) | nindent 10 }} {{- end }} env: - name: SPLUNK_MEMORY_TOTAL_MIB diff --git a/helm-charts/splunk-otel-collector/templates/deployment-cluster-receiver.yaml b/helm-charts/splunk-otel-collector/templates/deployment-cluster-receiver.yaml index 58af2e2299..f0707e5ec5 100644 --- a/helm-charts/splunk-otel-collector/templates/deployment-cluster-receiver.yaml +++ b/helm-charts/splunk-otel-collector/templates/deployment-cluster-receiver.yaml @@ -77,10 +77,8 @@ spec: ` }} {{- $clusterReceiver.affinity | mustMergeOverwrite (fromYaml $clusterReceiverPodAntiAffinity) | toYaml | nindent 8 }} {{- end }} - {{- if $clusterReceiver.securityContext }} securityContext: - {{ toYaml $clusterReceiver.securityContext | nindent 8 }} - {{- end }} + {{- include "splunk-otel-collector.securityContext" (dict "isWindows" .Values.isWindows "securityContext" $clusterReceiver.securityContext) | nindent 8 }} {{- if eq (include "splunk-otel-collector.distribution" .) "eks/fargate" }} initContainers: - name: cluster-receiver-node-discoverer diff --git a/helm-charts/splunk-otel-collector/templates/deployment-gateway.yaml b/helm-charts/splunk-otel-collector/templates/deployment-gateway.yaml index 21e3fa3ea7..24cdef2ba3 100644 --- a/helm-charts/splunk-otel-collector/templates/deployment-gateway.yaml +++ b/helm-charts/splunk-otel-collector/templates/deployment-gateway.yaml @@ -57,10 +57,8 @@ spec: affinity: {{- toYaml $gateway.affinity | nindent 8 }} {{- end }} - {{- if $gateway.securityContext }} securityContext: - {{ toYaml $gateway.securityContext | nindent 8 }} - {{- end }} + {{- include "splunk-otel-collector.securityContext" (dict "isWindows" .Values.isWindows "securityContext" $gateway.securityContext) | nindent 8 }} containers: - name: otel-collector command: diff --git a/helm-charts/splunk-otel-collector/templates/revert-patch-log-dirs-hook.yaml b/helm-charts/splunk-otel-collector/templates/revert-patch-log-dirs-hook.yaml index 7ac37d50f3..6f84e3de79 100644 --- a/helm-charts/splunk-otel-collector/templates/revert-patch-log-dirs-hook.yaml +++ b/helm-charts/splunk-otel-collector/templates/revert-patch-log-dirs-hook.yaml @@ -1,4 +1,4 @@ -{{- if or (and (.Values.fluentd.securityContext.runAsUser) (.Values.fluentd.securityContext.runAsGroup)) (and (.Values.agent.securityContext.runAsUser) (.Values.agent.securityContext.runAsGroup)) }} +{{- if or (and (.Values.fluentd.securityContext.runAsUser) (.Values.fluentd.securityContext.runAsGroup) (not .Values.isWindows) ) (and (.Values.agent.securityContext.runAsUser) (.Values.agent.securityContext.runAsGroup) (not .Values.isWindows) ) }} apiVersion: v1 kind: Pod metadata: