Skip to content

Commit

Permalink
Make the service port for the webhook configurable (#976)
Browse files Browse the repository at this point in the history
* make the service port for the webhook configurable

* service port

* version bump

* version bump the examples
  • Loading branch information
jaronoff97 authored Dec 4, 2023
1 parent edae1f7 commit 87f0437
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 22 deletions.
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.43.0
version: 0.43.1
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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -88,7 +88,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -253,7 +253,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -271,7 +271,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.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.43.0
helm.sh/chart: opentelemetry-operator-0.43.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.89.0"
app.kubernetes.io/managed-by: Helm
Expand Down
2 changes: 1 addition & 1 deletion charts/opentelemetry-operator/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 443
- port: {{ .Values.admissionWebhooks.servicePort }}
protocol: TCP
targetPort: webhook-server
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
- name: WEBHOOK_SERVICE_CLUSTERIP
value: "{{ include "opentelemetry-operator.fullname" . }}-webhook"
- name: WEBHOOK_SERVICE_PORT
value: "443"
value: "{{ .Values.admissionWebhooks.servicePort }}"
command:
- sh
- -c
Expand All @@ -82,4 +82,3 @@ spec:
{{- with .Values.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 4 }}
{{- end }}

8 changes: 8 additions & 0 deletions charts/opentelemetry-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,14 @@
true
]
},
"servicePort": {
"type": "integer",
"default": 443,
"title": "The port for the webhook service",
"examples": [
9443
]
},
"failurePolicy": {
"type": "string",
"default": "",
Expand Down
1 change: 1 addition & 0 deletions charts/opentelemetry-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ kubeRBACProxy:
## They also enable the sidecar injection for OpenTelemetryCollector and Instrumentation CR's
admissionWebhooks:
create: true
servicePort: 443
failurePolicy: Fail
secretName: ""

Expand Down

0 comments on commit 87f0437

Please sign in to comment.