Skip to content

Commit

Permalink
[YUNIKORN-2626] Add flag to helm chart to disable web container (#178)
Browse files Browse the repository at this point in the history
Closes: #178

Signed-off-by: Yu-Lin Chen <[email protected]>
  • Loading branch information
blueBlue0102 authored and chenyulin0719 committed Jun 22, 2024
1 parent aa9a293 commit 06a42fe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion helm-charts/yunikorn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down Expand Up @@ -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 | `{}` |
Expand Down
2 changes: 2 additions & 0 deletions helm-charts/yunikorn/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -104,3 +105,4 @@ spec:
protocol: TCP
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
{{- end }}
2 changes: 1 addition & 1 deletion helm-charts/yunikorn/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions helm-charts/yunikorn/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions helm-charts/yunikorn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

0 comments on commit 06a42fe

Please sign in to comment.