Skip to content

Commit

Permalink
feat: Allow to change port for Webhooks and add hostnetwork
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Cantin <103442330+mcantinqc@users.noreply.github.com>
  • Loading branch information
mcantinqc committed Jun 20, 2023
1 parent 2251672 commit ca1b161
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
Binary file added docs/keda-2.10.3.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion keda/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kubeVersion: ">=v1.24.0-0"

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.10.2
version: 2.10.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
11 changes: 7 additions & 4 deletions keda/templates/webhooks/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
app: {{ .Values.webhooks.name }}
name: {{ .Values.webhooks.name }}
app.kubernetes.io/name: {{ .Values.webhooks.name }}
{{- include "keda.labels" . | indent 8 }}
{{- include "keda.labels" . | indent 8 }}
{{- if .Values.podLabels.webhooks }}
{{- toYaml .Values.podLabels.webhooks | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -69,6 +69,8 @@ spec:
- "--zap-encoder={{ .Values.logging.webhooks.format }}"
- "--zap-time-encoding={{ .Values.logging.webhooks.timeEncoding }}"
- "--cert-dir={{ .Values.certificates.mountPath }}"
- "--health-probe-bind-address=:{{ .Values.webhooks.healthProbePort }}"
- "--port={{ .Values.webhooks.port }}"
{{- if .Values.prometheus.webhooks.enabled }}
- --metrics-bind-address=:{{ .Values.prometheus.webhooks.port }}
{{- end }}
Expand All @@ -79,15 +81,15 @@ spec:
livenessProbe:
httpGet:
path: /healthz
port: 8081
port: {{ .Values.webhooks.healthProbePort }}
initialDelaySeconds: 25
readinessProbe:
httpGet:
path: /readyz
port: 8081
port: {{ .Values.webhooks.healthProbePort }}
initialDelaySeconds: 20
ports:
- containerPort: 9443
- containerPort: {{ .Values.webhooks.port }}
name: http
protocol: TCP
{{- if .Values.prometheus.webhooks.enabled }}
Expand Down Expand Up @@ -130,6 +132,7 @@ spec:
{{- if .Values.volumes.webhooks.extraVolumes }}
{{- toYaml .Values.volumes.webhooks.extraVolumes | nindent 8 }}
{{- end }}
hostNetwork: {{ .Values.metricsServer.useHostNetwork }}
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.nodeSelector }}
Expand Down
1 change: 1 addition & 0 deletions keda/templates/webhooks/validatingconfiguration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ webhooks:
name: {{ .Values.webhooks.name }}
namespace: {{ .Release.Namespace }}
path: /validate-keda-sh-v1alpha1-scaledobject
port: {{ .Values.webhooks.port }}
failurePolicy: {{ .Values.webhooks.failurePolicy }}
matchPolicy: Equivalent
name: vscaledobject.kb.io
Expand Down
10 changes: 8 additions & 2 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ metricsServer:
webhooks:
# -- Enable admission webhooks (this feature option will be removed in v2.12)
enabled: true
# -- Port number to use for KEDA admission webhooks
port: 9443
# -- Port number to use for KEDA admission webhooks health probe
healthProbePort: 8081
# -- Enable webhook to use host network, this is required on EKS with custom CNI
useHostNetwork: false
# -- Name of the KEDA admission webhooks
name: keda-admission-webhooks
# -- Capability to configure the number of replicas for KEDA admission webhooks
Expand Down Expand Up @@ -224,8 +230,8 @@ podIdentity:
# This will be set as a annotation on the KEDA service account.
enabled: false
# -- GCP IAM Service Account Email which you would like to use for workload identity.
gcpIAMServiceAccount: ""
gcpIAMServiceAccount: ""

# -- Set this if you are using an external scaler and want to communicate
# over TLS (recommended). This variable holds the name of the secret that
# will be mounted to the /grpccerts path on the Pod
Expand Down

0 comments on commit ca1b161

Please sign in to comment.