Skip to content

Commit

Permalink
fix(opentelemetry-collector): adjust template errors and updated exam…
Browse files Browse the repository at this point in the history
…ples
  • Loading branch information
marcelaraujo committed Oct 24, 2024
1 parent c5ec933 commit 7608306
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Source: opentelemetry-collector/templates/opentelemetrycollector.yaml
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: example-opentelemetry-collector
Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
kubernetes.io/arch: arm64
serviceAccount: default
hostNetwork: false
config: |
config:
exporters:
debug: {}
extensions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ targetAllocator:
tag: v0.95.0

presets:
metadata:
enabled: true
clusterName: "{{.Values.global.clusterName}}"
integrationName: "coralogix-integration-helm"
metadata:
enabled: true
clusterName: "{{.Values.global.clusterName}}"
integrationName: "coralogix-integration-helm"

logsCollection:
enabled: true
includeCollectorLogs: true
storeCheckpoints: true
maxRecombineLogSize: 1048576
extraFilelogOperators: []
logsCollection:
enabled: true
includeCollectorLogs: true
storeCheckpoints: true
maxRecombineLogSize: 1048576
extraFilelogOperators: []

kubernetesAttributes:
enabled: true
hostMetrics:
enabled: true
collectionInterval: "{{.Values.global.collectionInterval}}"
kubeletMetrics:
enabled: true
collectionInterval: "{{.Values.global.collectionInterval}}"
kubernetesAttributes:
enabled: true
hostMetrics:
enabled: true
collectionInterval: "{{.Values.global.collectionInterval}}"
kubeletMetrics:
enabled: true
collectionInterval: "{{.Values.global.collectionInterval}}"
extraVolumes:
- name: etcmachineid
hostPath:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Source: opentelemetry-collector/templates/opentelemetrycollector.yaml
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: example-opentelemetry-collector
Expand Down Expand Up @@ -120,7 +120,7 @@ spec:
name: varlibdbusmachineid
serviceAccount: default
hostNetwork: false
config: |
config:
exporters:
debug: {}
extensions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.collectorCRD.generate -}}
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: {{ include "opentelemetry-collector.fullname" . }}
Expand Down Expand Up @@ -46,23 +46,25 @@ spec:
{{- end }}
{{- with .Values.targetAllocator.resources }}
resources:
{{- toYaml . | nindent 6 }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- if .Values.podAnnotations }}
podAnnotations:
{{- end }}
{{- include "opentelemetry-collector.podAnnotations" . | nindent 8 }}

{{- if and (not (.Values.securityContext)) (not (.Values.isWindows)) (or (.Values.presets.logsCollection.storeCheckpoints) (.Values.presets.hostMetrics.process.enabled)) }}
podSecurityContext:
{{- if and (not (.Values.securityContext)) (not (.Values.isWindows)) (or (.Values.presets.logsCollection.storeCheckpoints) (.Values.presets.hostMetrics.process.enabled)) }}
runAsUser: 0
runAsGroup: 0
{{- if .Values.presets.hostMetrics.process.enabled }}
{{- if .Values.presets.hostMetrics.process.enabled }}
privileged: true
{{- end }}
{{- else -}}
{{- end }}
{{- else -}}
{{- toYaml .Values.securityContext | nindent 6 }}
{{- end }}
{{- end }}

{{- if .Values.image.digest }}
image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}"
{{- else }}
Expand Down Expand Up @@ -106,8 +108,8 @@ spec:
- name: GOMEMLIMIT
value: {{ include "opentelemetry-collector.gomemlimit" .Values.resources.limits.memory | quote }}
{{- end }}
{{- with .Values.extraEnvs }}
{{- . | toYaml | nindent 6 }}
{{- if .Values.extraEnvs }}
{{- toYaml .Values.extraEnvs | nindent 4 }}
{{- end }}
{{- if .Values.lifecycleHooks }}
lifecycle:
Expand Down Expand Up @@ -215,7 +217,7 @@ spec:
{{- end }}
serviceAccount: {{ include "opentelemetry-collector.serviceAccountName" . }}
hostNetwork: {{ .Values.hostNetwork }}
config: |
config:
{{- if or (eq .Values.mode "deployment") (eq .Values.mode "statefulset") -}}
{{- include "opentelemetry-collector.deploymentConfig" . | nindent 4 -}}
{{- else if eq .Values.mode "daemonset" -}}
Expand Down

0 comments on commit 7608306

Please sign in to comment.