Skip to content

Commit

Permalink
feat(opentelemetry-operator): Adding extraEnv
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Tyr <jiri.tyr@gmail.com>
  • Loading branch information
jtyr committed Dec 9, 2024
1 parent 11361d7 commit c47d6a2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
7 changes: 4 additions & 3 deletions charts/opentelemetry-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ spec:
{{- end }}
command:
- /manager
{{- if or .Values.manager.env .Values.manager.createRbacPermissions }}
{{- if or .Values.manager.env .Values.manager.extraEnv .Values.manager.createRbacPermissions }}
env:
{{- if .Values.manager.env }}
{{- range $name, $value := .Values.manager.env }}
- name: {{ $name }}
value: {{ $value | quote -}}
value: {{ $value | quote }}
{{- end }}
{{- with .Values.manager.extraEnv }}
{{- . | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.manager.createRbacPermissions }}
- name: SERVICE_ACCOUNT_NAME
Expand Down
15 changes: 15 additions & 0 deletions charts/opentelemetry-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"featureGates",
"ports",
"env",
"extraEnv",
"serviceAccount",
"serviceMonitor",
"deploymentAnnotations",
Expand Down Expand Up @@ -720,6 +721,20 @@
"ENABLE_WEBHOOKS": "true"
}]
},
"extraEnv": {
"type": "array",
"default": [],
"title": "Extra definitions of environment variables",
"examples": [{
"name": "GOMEMLIMIT",
"valueFrom": {
"resourceFieldRef": {
"containerName": "manager",
"resource": "limits.memory"
}
}
}]
},
"serviceAccount": {
"type": "object",
"default": {},
Expand Down
8 changes: 8 additions & 0 deletions charts/opentelemetry-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ manager:
env:
ENABLE_WEBHOOKS: "true"

# Extra definitions of environment variables.
extraEnv: []
# - name: GOMEMLIMIT
# valueFrom:
# resourceFieldRef:
# containerName: manager
# resource: limits.memory

# -- Create the manager ServiceAccount
serviceAccount:
create: true
Expand Down

0 comments on commit c47d6a2

Please sign in to comment.