Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(opentelemetry-operator): Adding extraEnv #1458

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/opentelemetry-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-operator
version: 0.77.0
version: 0.78.0
description: OpenTelemetry Operator Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -90,7 +90,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -222,7 +222,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -240,7 +240,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -31,7 +31,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: opentelemetry-operator
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-cert-manager"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-metrics"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -43,7 +43,7 @@ metadata:
name: "example-opentelemetry-operator-webhook"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -90,7 +90,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -256,7 +256,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -274,7 +274,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -31,7 +31,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: opentelemetry-operator
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-cert-manager"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-metrics"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -43,7 +43,7 @@ metadata:
name: "example-opentelemetry-operator-webhook"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.77.0
helm.sh/chart: opentelemetry-operator-0.78.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.116.0"
app.kubernetes.io/managed-by: Helm
Expand Down
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.extraEnvs .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.extraEnvs }}
{{- . | 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",
"extraEnvs",
"serviceAccount",
"serviceMonitor",
"deploymentAnnotations",
Expand Down Expand Up @@ -720,6 +721,20 @@
"ENABLE_WEBHOOKS": "true"
}]
},
"extraEnvs": {
"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
10 changes: 9 additions & 1 deletion charts/opentelemetry-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,19 @@ manager:
cpu: 100m
memory: 64Mi
# ephemeral-storage: 50Mi
## Adds additional environment variables
## Adds additional environment variables. This property will be deprecated. Please use extraEnvs instead.
## e.g ENV_VAR: env_value
env:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtyr Minor request, can you please update the docstring here and recommend that people use extraEnvs instead of env please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a short deprecation notice. Please review it.

ENABLE_WEBHOOKS: "true"

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

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