Skip to content

Commit

Permalink
make the service port for the webhook configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronoff97 committed Dec 4, 2023
1 parent edae1f7 commit 16f306f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
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
13 changes: 8 additions & 5 deletions charts/opentelemetry-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ manager:
# add annotations on the ServiceMonitor
annotations: {}
metricsEndpoints:
- port: metrics
- port: metrics

podAnnotations: {}
podLabels: {}
Expand All @@ -108,7 +108,6 @@ manager:
# add annotations on the PrometheusRule
annotations: {}


## List of additional cli arguments to configure the manager
## for example: --labels, etc.
extraArgs: []
Expand Down Expand Up @@ -145,7 +144,8 @@ manager:

## Container specific securityContext
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
securityContext: {}
securityContext:
{}
# allowPrivilegeEscalation: false
# capabilities:
# drop:
Expand Down Expand Up @@ -174,7 +174,8 @@ kubeRBACProxy:

## Container specific securityContext
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
securityContext: {}
securityContext:
{}
# allowPrivilegeEscalation: false
# capabilities:
# drop:
Expand All @@ -184,6 +185,7 @@ kubeRBACProxy:
## They also enable the sidecar injection for OpenTelemetryCollector and Instrumentation CR's
admissionWebhooks:
create: true
servicePort: 443
failurePolicy: Fail
secretName: ""

Expand Down Expand Up @@ -211,7 +213,8 @@ admissionWebhooks:
enabled: true
## Provide the issuer kind and name to do the cert auth job.
## By default, OpenTelemetry Operator will use self-signer issuer.
issuerRef: {}
issuerRef:
{}
# kind:
# name:
## Annotations for the cert and issuer if cert-manager is enabled.
Expand Down

0 comments on commit 16f306f

Please sign in to comment.