Skip to content

Commit

Permalink
Add an option to add extra annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed Jun 8, 2021
1 parent a39a64d commit a98ca12
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

- Add an option to add extra annotations to deployments, daemonset, pods and service account (#158)
- Add an option to mount extra volumes to gateway-mode and k8s cluster receiver collectors (#157)

## [0.26.2] - 2021-05-28
Expand Down
7 changes: 7 additions & 0 deletions helm-charts/splunk-otel-collector/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ metadata:
{{- if .Values.logsEnabled }}
engine: fluentd
{{- end }}
{{- if .Values.otelAgent.annotations }}
annotations:
{{- toYaml .Values.otelAgent.annotations | nindent 4 }}
{{- end }}
spec:
updateStrategy:
type: RollingUpdate
Expand All @@ -25,6 +29,9 @@ spec:
release: {{ .Release.Name }}
annotations:
checksum/config: {{ print (include (print $.Template.BasePath "/configmap-fluentd.yaml") .) (include (print $.Template.BasePath "/configmap-otel-agent.yaml") .) | sha256sum }}
{{- if .Values.otelAgent.podAnnotations }}
{{- toYaml .Values.otelAgent.podAnnotations | nindent 8 }}
{{- end }}
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ metadata:
chart: {{ template "splunk-otel-collector.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.otelCollector.annotations }}
annotations:
{{- toYaml .Values.otelCollector.annotations | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.otelCollector.replicaCount }}
selector:
Expand All @@ -24,6 +28,9 @@ spec:
release: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap-otel-collector.yaml") . | sha256sum }}
{{- if .Values.otelCollector.podAnnotations }}
{{- toYaml .Values.otelCollector.podAnnotations | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "splunk-otel-collector.serviceAccountName" . }}
{{- if .Values.otelCollector.nodeSelector }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ metadata:
chart: {{ template "splunk-otel-collector.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.otelK8sClusterReceiver.annotations }}
annotations:
{{- toYaml .Values.otelK8sClusterReceiver.annotations | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
Expand All @@ -24,6 +28,9 @@ spec:
release: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap-otel-k8s-cluster-receiver.yaml") . | sha256sum }}
{{- if .Values.otelK8sClusterReceiver.podAnnotations }}
{{- toYaml .Values.otelK8sClusterReceiver.podAnnotations | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "splunk-otel-collector.serviceAccountName" . }}
{{- if .Values.otelK8sClusterReceiver.nodeSelector }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ metadata:
chart: {{ template "splunk-otel-collector.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}
11 changes: 11 additions & 0 deletions helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ otelK8sClusterReceiver:
terminationGracePeriodSeconds: 600
priorityClassName: ""

# k8s cluster receiver collector annotations
annotations: {}
podAnnotations: {}

# Extra enviroment variables to be set in the OTel Cluster Receiver container
extraEnvs: []

Expand Down Expand Up @@ -517,6 +521,9 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name:

# Service account annotations
annotations: {}

podSecurityPolicy:
# Specifies whether Pod Security Policy resources should be created.
# This should be set to `false` if either:
Expand Down Expand Up @@ -615,6 +622,10 @@ otelCollector:
terminationGracePeriodSeconds: 600
priorityClassName: ""

# OTel collector annotations
annotations: {}
podAnnotations: {}

# Extra enviroment variables to be set in the standalone OTel collector container
extraEnvs: []

Expand Down

0 comments on commit a98ca12

Please sign in to comment.