Skip to content

Commit

Permalink
fix: add containerPort declaration for webhook in helm chart (kubeflo…
Browse files Browse the repository at this point in the history
…w#1961)

* fix: add containerPort declaration for webhook in helm chart

Signed-off-by: Zev Isert <dev@zevisert.ca>

* docs: update helm chart readme

Signed-off-by: Zev Isert <dev@zevisert.ca>

* fix: copied helm value should be for webhook

Signed-off-by: Zev Isert <dev@zevisert.ca>

* build: bump helm chart to 1.2.3

Signed-off-by: Zev Isert <dev@zevisert.ca>

* style: undo unrelated editor autoformatting

Signed-off-by: Zev Isert <dev@zevisert.ca>

---------

Signed-off-by: Zev Isert <dev@zevisert.ca>
Co-authored-by: Mason Legere <masonlegere@gmail.com>
  • Loading branch information
2 people authored and sigmarkarl committed Aug 7, 2024
1 parent 87b4992 commit 2c62296
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/spark-operator-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: spark-operator
description: A Helm chart for Spark on Kubernetes operator
version: 1.2.2
version: 1.2.3
appVersion: v1beta2-1.4.0-3.5.0
keywords:
- spark
Expand Down
1 change: 1 addition & 0 deletions charts/spark-operator-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ All charts linted successfully
| webhook.initResources | object | `{}` | Resources applied to init job |
| webhook.namespaceSelector | string | `""` | The webhook server will only operate on namespaces with this label, specified in the form key1=value1,key2=value2. Empty string (default) will operate on all namespaces |
| webhook.port | int | `8080` | Webhook service port |
| webhook.portName | string | `"webhook"` | Webhook container port name and service target port name |
| webhook.timeout | int | `30` | |

## Maintainers
Expand Down
8 changes: 7 additions & 1 deletion charts/spark-operator-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,16 @@ spec:
{{- toYaml .Values.envFrom | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- if .Values.metrics.enable }}
{{- if or .Values.metrics.enable .Values.webhook.enable }}
ports:
{{ if .Values.metrics.enable }}
- name: {{ .Values.metrics.portName | quote }}
containerPort: {{ .Values.metrics.port }}
{{ end }}
{{ if .Values.webhook.enable }}
- name: {{ .Values.webhook.portName | quote }}
containerPort: {{ .Values.webhook.port }}
{{ end }}
{{ end }}
args:
- -v={{ .Values.logLevel }}
Expand Down
2 changes: 1 addition & 1 deletion charts/spark-operator-chart/templates/webhook-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
ports:
- port: 443
targetPort: {{ .Values.webhook.port }}
targetPort: {{ .Values.webhook.portName | quote }}
name: webhook
selector:
{{- include "spark-operator.selectorLabels" . | nindent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/spark-operator-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ webhook:
enable: false
# -- Webhook service port
port: 8080
# -- Webhook container port name and service target port name
portName: webhook
# -- The webhook server will only operate on namespaces with this label, specified in the form key1=value1,key2=value2.
# Empty string (default) will operate on all namespaces
namespaceSelector: ""
Expand Down

0 comments on commit 2c62296

Please sign in to comment.