This is an automated email from the ASF dual-hosted git repository.
chenyulin0719 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-release.git
The following commit(s) were added to refs/heads/master by this push:
new 06a42fe [YUNIKORN-2626] Add flag to helm chart to disable web
container (#178)
06a42fe is described below
commit 06a42febe61f9b3af6e0fccc590a1548ba0ded6d
Author: Tzu-Hua Lan <[email protected]>
AuthorDate: Sat Jun 22 02:23:02 2024 +0000
[YUNIKORN-2626] Add flag to helm chart to disable web container (#178)
Closes: #178
Signed-off-by: Yu-Lin Chen <[email protected]>
---
helm-charts/yunikorn/README.md | 3 ++-
helm-charts/yunikorn/templates/deployment.yaml | 2 ++
helm-charts/yunikorn/templates/ingress.yaml | 2 +-
helm-charts/yunikorn/templates/service.yaml | 2 ++
helm-charts/yunikorn/values.yaml | 4 ++++
5 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/helm-charts/yunikorn/README.md b/helm-charts/yunikorn/README.md
index 82b76c9..b288456 100644
--- a/helm-charts/yunikorn/README.md
+++ b/helm-charts/yunikorn/README.md
@@ -60,7 +60,7 @@ helm install yunikorn yunikorn/yunikorn
The following table lists the configurable parameters of the YuniKorn chart
and their default values:
| Parameter | Description
| Default |
-|-------------------------------------------------|-------------------------------------------------------------|---------------------------------|
+| ----------------------------------------------- |
----------------------------------------------------------- |
------------------------------- |
| `imagePullSecrets` | Docker repository secrets
| `[]` |
| `serviceAccount` | Service account name
| `yunikorn-admin` |
| `hostNetwork` | Whether scheduler should
run in the host network | `false` |
@@ -106,6 +106,7 @@ The following table lists the configurable parameters of
the YuniKorn chart and
| `web.resources.limits.memory` | Web app memory resource
limit | `500Mi` |
| `embedAdmissionController` | Flag for
enabling/disabling the admission controller | `true`
|
| `enableSchedulerPlugin` | Flag for
enabling/disabling scheduler plugin mode | `false`
|
+| `enableWebService` | Flag for
enabling/disabling web service | `true`
|
| `nodeSelector` | Scheduler deployment
nodeSelector(s) | `{}` |
| `tolerations` | Scheduler deployment
tolerations | `[]` |
| `affinity` | Scheduler deployment
affinity | `{}` |
diff --git a/helm-charts/yunikorn/templates/deployment.yaml
b/helm-charts/yunikorn/templates/deployment.yaml
index 399ba12..2fbfe40 100644
--- a/helm-charts/yunikorn/templates/deployment.yaml
+++ b/helm-charts/yunikorn/templates/deployment.yaml
@@ -95,6 +95,7 @@ spec:
fieldPath: metadata.namespace
resources:
{{- toYaml .Values.resources | nindent 12 }}
+ {{- if .Values.enableWebService }}
- name: yunikorn-scheduler-web
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag
}}"
imagePullPolicy: {{ .Values.web.image.pullPolicy }}
@@ -104,3 +105,4 @@ spec:
protocol: TCP
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
+ {{- end }}
diff --git a/helm-charts/yunikorn/templates/ingress.yaml
b/helm-charts/yunikorn/templates/ingress.yaml
index 5e053ec..8663a0d 100644
--- a/helm-charts/yunikorn/templates/ingress.yaml
+++ b/helm-charts/yunikorn/templates/ingress.yaml
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-{{- if .Values.ingress.enabled }}
+{{- if and .Values.ingress.enabled .Values.enableWebService }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
diff --git a/helm-charts/yunikorn/templates/service.yaml
b/helm-charts/yunikorn/templates/service.yaml
index 89ecb14..42e91c9 100644
--- a/helm-charts/yunikorn/templates/service.yaml
+++ b/helm-charts/yunikorn/templates/service.yaml
@@ -30,10 +30,12 @@ spec:
targetPort: http1
protocol: TCP
name: yunikorn-core
+ {{- if .Values.enableWebService }}
- port: {{ .Values.service.portWeb }}
targetPort: http2
protocol: TCP
name: yunikorn-service
+ {{- end }}
selector:
app: yunikorn
component: yunikorn-scheduler
diff --git a/helm-charts/yunikorn/values.yaml b/helm-charts/yunikorn/values.yaml
index 3b6f149..19a5127 100644
--- a/helm-charts/yunikorn/values.yaml
+++ b/helm-charts/yunikorn/values.yaml
@@ -122,5 +122,9 @@ embedAdmissionController: true
# When this flag is false, the scheduler will be deployed as a standalone
scheduler.
enableSchedulerPlugin: false
+# When this flag is true, the web service will be deployed.
+# When this flag is false, the web service will not be deployed.
+enableWebService: true
+
podLabels: {}
podAnnotations: {}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]