Skip to content

Commit

Permalink
chore: rename otelwindows -> otellogswindows
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed Apr 2, 2024
1 parent c0a2f1a commit 471fabc
Show file tree
Hide file tree
Showing 28 changed files with 86 additions and 86 deletions.
26 changes: 13 additions & 13 deletions deploy/helm/sumologic/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ filelog/containers:
{{- if eq .Values.debug.logs.collector.stopLogsIngestion true }}
{{ include "logs.collector.files.list" . | nindent 4 }}
{{- end }}
{{- if eq .Values.debug.logs.otelwindows.stopLogsIngestion true }}
{{- if eq .Values.debug.logs.otellogswindows.stopLogsIngestion true }}
{{ include "logs.collector.windows.files.list" . | nindent 4 }}
{{- end }}
{{- if eq .Values.debug.metrics.metadata.stopLogsIngestion true }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exporters:
queue_size: 10
# this improves load balancing at the cost of more network traffic
disable_keep_alives: true
{{- if eq .Values.debug.logs.otelwindows.print true }}
{{- if eq .Values.debug.logs.otellogswindows.print true }}
debug:
verbosity: detailed
{{- end }}
Expand Down Expand Up @@ -51,4 +51,4 @@ service:
{{- end }}
telemetry:
logs:
level: {{ .Values.otelwindows.logLevel | quote }}
level: {{ .Values.otellogswindows.logLevel | quote }}
18 changes: 9 additions & 9 deletions deploy/helm/sumologic/templates/_helpers/_logs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Example Usage:
{{ $enabled }}
{{- end -}}
{{- define "logs.collector.otelwindows.enabled" -}}
{{- $enabled := and (eq (include "logs.enabled" .) "true") (eq .Values.sumologic.logs.collector.otelwindows.enabled true) -}}
{{- define "logs.collector.otellogswindows.enabled" -}}
{{- $enabled := and (eq (include "logs.enabled" .) "true") (eq .Values.sumologic.logs.collector.otellogswindows.enabled true) -}}
{{ $enabled }}
{{- end -}}
Expand Down Expand Up @@ -189,7 +189,7 @@ Return the exporters for kubelet log pipeline.
{{- end -}}

{{- define "sumologic.labels.app.logs.collector.windows" -}}
{{- template "sumologic.fullname" . }}-otelwindows-logs-collector
{{- template "sumologic.fullname" . }}-otellogswindows-logs-collector
{{- end -}}

{{- define "sumologic.labels.app.logs.collector.configmap" -}}
Expand Down Expand Up @@ -373,7 +373,7 @@ Return the otelcol log collector image
{{- end -}}

{{- define "sumologic.logs.collector.windows.image" -}}
{{ template "utils.getOtelImage" (dict "overrideImage" .Values.otelwindows.image "defaultImage" .Values.sumologic.otelcolImage) }}
{{ template "utils.getOtelImage" (dict "overrideImage" .Values.otellogswindows.image "defaultImage" .Values.sumologic.otelcolImage) }}
{{- end -}}

{{- define "sumologic.logs.collector.tolerations" -}}
Expand All @@ -385,8 +385,8 @@ Return the otelcol log collector image
{{- end -}}

{{- define "sumologic.logs.collector.windows.tolerations" -}}
{{- if .Values.otelwindows.daemonset.tolerations -}}
{{- toYaml .Values.otelwindows.daemonset.tolerations -}}
{{- if .Values.otellogswindows.daemonset.tolerations -}}
{{- toYaml .Values.otellogswindows.daemonset.tolerations -}}
{{- else -}}
{{- template "kubernetes.defaultTolerations" . -}}
{{- end -}}
Expand Down Expand Up @@ -439,11 +439,11 @@ Example Usage:
{{- end }}

{{- define "logs.collector.windows.files.list" }}
{{- if eq (include "logs.collector.otelwindows.enabled" .) "true" }}
{{- if eq (include "logs.collector.otellogswindows.enabled" .) "true" }}
{{- $ctx := . }}
{{- $instance := "" -}}
{{- $daemonsets := dict "" $.Values.otelwindows.daemonset -}}
{{- $daemonsets = deepCopy $daemonsets | merge $.Values.otelwindows.additionalDaemonSets -}}
{{- $daemonsets := dict "" $.Values.otellogswindows.daemonset -}}
{{- $daemonsets = deepCopy $daemonsets | merge $.Values.otellogswindows.additionalDaemonSets -}}
{{- range $name, $value := $daemonsets }}
{{- if not (eq $name "") }}
{{- $instance = (printf "-%s" $name ) }}
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/sumologic/templates/checks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
{{- end -}}
{{- end -}}

{{- $nameservers := (dig "otelwindows" "daemonset" "nameservers" (list "...") .Values.AsMap) -}}
{{- $nameservers := (dig "otellogswindows" "daemonset" "nameservers" (list "...") .Values.AsMap) -}}
{{/* Check if Windows nameservers has been overriden */}}
{{- if and (eq (include "logs.collector.otelwindows.enabled" .) "true") (has "..." $nameservers) -}}
{{- if and (eq (include "logs.collector.otellogswindows.enabled" .) "true") (has "..." $nameservers) -}}
{{- fail "\nPlease set cluster namserver for windows log collection" -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or (and (eq (include "logs.collector.otelcol.enabled" .) "true") (.Values.otellogs.metrics.enabled)) (and (eq (include "logs.collector.otelwindows.enabled" .) "true") (.Values.otelwindows.metrics.enabled)) }}
{{- if or (and (eq (include "logs.collector.otelcol.enabled" .) "true") (.Values.otellogs.metrics.enabled)) (and (eq (include "logs.collector.otellogswindows.enabled" .) "true") (.Values.otellogswindows.metrics.enabled)) }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or (eq (include "logs.collector.otelcol.enabled" .) "true") (eq (include "logs.collector.otelwindows.enabled" .) "true") }}
{{- if or (eq (include "logs.collector.otelcol.enabled" .) "true") (eq (include "logs.collector.otellogswindows.enabled" .) "true") }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if eq (include "logs.collector.otelwindows.enabled" .) "true" }}
{{ $baseConfig := (tpl (.Files.Get "conf/logs/collector/otelwindows/config.yaml") (deepCopy . | merge (dict "Type" "windows" ))) | fromYaml }}
{{ $mergeConfig := .Values.otelwindows.config.merge }}
{{ $overrideConfig := .Values.otelwindows.config.override }}
{{- if eq (include "logs.collector.otellogswindows.enabled" .) "true" }}
{{ $baseConfig := (tpl (.Files.Get "conf/logs/collector/otellogswindows/config.yaml") (deepCopy . | merge (dict "Type" "windows" ))) | fromYaml }}
{{ $mergeConfig := .Values.otellogswindows.config.merge }}
{{ $overrideConfig := .Values.otellogswindows.config.override }}
{{ $finalConfig := "" }}
{{ if $overrideConfig }}
{{ $finalConfig = $overrideConfig }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- if eq (include "logs.collector.otelwindows.enabled" .) "true" }}
{{- if eq (include "logs.collector.otellogswindows.enabled" .) "true" }}
{{- $ctx := . }}
{{- $instance := "" -}}
{{- $defaultTolerations := (include "sumologic.logs.collector.tolerations" .) }}
{{- $defaultAffinity := (include "kubernetes.defaultAffinity" .) }}
{{- $daemonsets := dict "" $.Values.otelwindows.daemonset -}}
{{- $daemonsets = deepCopy $daemonsets | merge $.Values.otelwindows.additionalDaemonSets -}}
{{- $daemonsets := dict "" $.Values.otellogswindows.daemonset -}}
{{- $daemonsets = deepCopy $daemonsets | merge $.Values.otellogswindows.additionalDaemonSets -}}
{{- range $name, $daemonset := $daemonsets }}
{{- $defaultDaemonset := deepCopy $.Values.otelwindows.daemonset }}
{{- $defaultDaemonset := deepCopy $.Values.otellogswindows.daemonset }}
{{- $daemonset := mergeOverwrite $defaultDaemonset $daemonset -}}
{{- if not (eq $name "") }}
{{- $instance = (printf "-%s" $name ) }}
Expand Down Expand Up @@ -47,7 +47,7 @@ spec:
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/logs/collector/otelwindows/configmap.yaml") $ctx | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/logs/collector/otellogswindows/configmap.yaml") $ctx | sha256sum }}
{{- if $.Values.sumologic.podAnnotations }}
{{ toYaml $.Values.sumologic.podAnnotations | indent 8 }}
{{- end }}
Expand Down Expand Up @@ -93,7 +93,7 @@ spec:
args:
- --config=etc/otelcol/config.yaml
image: {{ template "sumologic.logs.collector.windows.image" $ctx }}
imagePullPolicy: {{ $.Values.otelwindows.image.pullPolicy }}
imagePullPolicy: {{ $.Values.otellogswindows.image.pullPolicy }}
name: otelcol
livenessProbe:
httpGet:
Expand Down
6 changes: 3 additions & 3 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ sumologic:
otelcol:
enabled: true
## Experimental
otelwindows:
otellogswindows:
enabled: false
otelcloudwatch:
enabled: false
Expand Down Expand Up @@ -2134,7 +2134,7 @@ otellogs:

## Experimental
## Configure OpenTelemetry Logs Collector for Windows Nodes
otelwindows:
otellogswindows:
## Metrics from Collector
metrics:
enabled: true
Expand Down Expand Up @@ -2591,7 +2591,7 @@ debug:
collector:
print: false
stopLogsIngestion: false
otelwindows:
otellogswindows:
print: false
stopLogsIngestion: false

Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ your `user-values.yaml`:
sumologic:
logs:
collector:
otelwindows:
otellogswindows:
enabled: true
otelwindows:
otellogswindows:
daemonset:
nameservers:
- ${NAMESERVER_IP}
Expand Down
2 changes: 1 addition & 1 deletion tests/helm/testdata/goldenfile/logs_otc/debug.input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ debug:
stopLogsIngestion: true
metadata:
stopLogsIngestion: true
otelwindows:
otellogswindows:
stopLogsIngestion: true
metrics:
collector:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
sumologic:
logs:
collector:
otelwindows:
otellogswindows:
enabled: true

otelwindows:
otellogswindows:
daemonset:
nameservers:
- 10.100.0.10
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# Source: sumologic/templates/logs/collector/otelwindows/configmap.yaml
# Source: sumologic/templates/logs/collector/otellogswindows/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: RELEASE-NAME-sumologic-otelcol-windows-logs-collector
namespace: sumologic
labels:
app: RELEASE-NAME-sumologic-otelwindows-logs-collector
app: RELEASE-NAME-sumologic-otellogswindows-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sumologic:
logs:
collector:
otelwindows:
otellogswindows:
enabled: true
debug:
logs:
otelwindows:
otellogswindows:
print: true
stopLogsIngestion: true
collector:
Expand All @@ -27,7 +27,7 @@ debug:
events:
stopLogsIngestion: true

otelwindows:
otellogswindows:
daemonset:
nameservers:
- 10.100.0.10
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# Source: sumologic/templates/logs/collector/otelwindows/configmap.yaml
# Source: sumologic/templates/logs/collector/otellogswindows/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: RELEASE-NAME-sumologic-otelcol-windows-logs-collector
namespace: sumologic
labels:
app: RELEASE-NAME-sumologic-otelwindows-logs-collector
app: RELEASE-NAME-sumologic-otellogswindows-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sumologic:
logs:
collector:
otelwindows:
otellogswindows:
enabled: true
multiline:
enabled: false
Expand All @@ -10,7 +10,7 @@ sumologic:
container:
enabled: false

otelwindows:
otellogswindows:
logLevel: debug
daemonset:
nameservers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# Source: sumologic/templates/logs/collector/otelwindows/configmap.yaml
# Source: sumologic/templates/logs/collector/otellogswindows/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: RELEASE-NAME-sumologic-otelcol-windows-logs-collector
namespace: sumologic
labels:
app: RELEASE-NAME-sumologic-otelwindows-logs-collector
app: RELEASE-NAME-sumologic-otellogswindows-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
sumologic:
logs:
collector:
otelwindows:
otellogswindows:
enabled: true
otelwindows:
otellogswindows:
additionalDaemonSets:
linux:
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Source: sumologic/templates/logs/collector/otelwindows/daemonset.yaml
# Source: sumologic/templates/logs/collector/otellogswindows/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand All @@ -8,22 +8,22 @@ metadata:
annotations:
name: additionalAnnotation
labels:
app: RELEASE-NAME-sumologic-otelwindows-logs-collector
app: RELEASE-NAME-sumologic-otellogswindows-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
name: additionalLabel
spec:
selector:
matchLabels:
app.kubernetes.io/name: RELEASE-NAME-sumologic-otelwindows-logs-collector-linux
app.kubernetes.io/name: RELEASE-NAME-sumologic-otellogswindows-logs-collector-linux
template:
metadata:
annotations:
checksum/config: "%CONFIG_CHECKSUM%"
name: additionalPodAnnotation
labels:
app.kubernetes.io/name: RELEASE-NAME-sumologic-otelwindows-logs-collector-linux
app.kubernetes.io/name: RELEASE-NAME-sumologic-otellogswindows-logs-collector-linux
app.kubernetes.io/app-name: RELEASE-NAME-sumologic-otelcol-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
sumologic:
logs:
collector:
otelwindows:
otellogswindows:
enabled: true
otelwindows:
otellogswindows:
additionalDaemonSets:
linux:
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
---
# Source: sumologic/templates/logs/collector/otelwindows/daemonset.yaml
# Source: sumologic/templates/logs/collector/otellogswindows/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: RELEASE-NAME-sumologic-otelcol-windows-logs-collector-linux
namespace: sumologic
labels:
app: RELEASE-NAME-sumologic-otelwindows-logs-collector
app: RELEASE-NAME-sumologic-otellogswindows-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
spec:
selector:
matchLabels:
app.kubernetes.io/name: RELEASE-NAME-sumologic-otelwindows-logs-collector-linux
app.kubernetes.io/name: RELEASE-NAME-sumologic-otellogswindows-logs-collector-linux
template:
metadata:
annotations:
checksum/config: "%CONFIG_CHECKSUM%"
labels:
app.kubernetes.io/name: RELEASE-NAME-sumologic-otelwindows-logs-collector-linux
app.kubernetes.io/name: RELEASE-NAME-sumologic-otellogswindows-logs-collector-linux
app.kubernetes.io/app-name: RELEASE-NAME-sumologic-otelcol-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ namespaceOverride: "sumologic"
sumologic:
logs:
collector:
otelwindows:
otellogswindows:
enabled: true
otelwindows:
otellogswindows:
daemonset:
nameservers:
- 10.100.0.10
Loading

0 comments on commit 471fabc

Please sign in to comment.