Skip to content

Commit

Permalink
feat: add additional options in helm chart
Browse files Browse the repository at this point in the history
Signed-off-by: Killian Muldoon <[email protected]>
  • Loading branch information
killianmuldoon committed Feb 14, 2025
1 parent b7e073a commit 087d118
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 8 deletions.
13 changes: 13 additions & 0 deletions charts/kwok/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ The following table lists the configurable parameters of the kwok chart and thei
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| enableDeployment | bool | `true` | |
| env[0].name | string | `"POD_IP"` | |
| env[0].valueFrom.fieldRef.fieldPath | string | `"status.podIP"` | |
| env[1].name | string | `"HOST_IP"` | |
| env[1].valueFrom.fieldRef.fieldPath | string | `"status.hostIP"` | |
| fullnameOverride | string | `"kwok-controller"` | Override the `fullname` of the chart. |
| hostNetwork | bool | `false` | Change `hostNetwork` to `true` if you want to deploy in a kind cluster. |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. |
Expand All @@ -48,3 +53,11 @@ The following table lists the configurable parameters of the kwok chart and thei
| replicas | int | `1` | The replica count for Deployment. |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| tolerations[0].effect | string | `"NoSchedule"` | |
| tolerations[0].key | string | `"node-role.kubernetes.io/control-plane"` | |
| tolerations[0].operator | string | `"Exists"` | |
| tolerations[1].effect | string | `"NoSchedule"` | |
| tolerations[1].key | string | `"node-role.kubernetes.io/master"` | |
| tolerations[1].operator | string | `"Exists"` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |
15 changes: 7 additions & 8 deletions charts/kwok/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.enableDeployment }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -51,14 +52,7 @@ spec:
- --enable-crds=ResourceUsage
- --enable-crds=ClusterResourceUsage
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{ toYaml .Values.env | nindent 10 }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
Expand Down Expand Up @@ -89,6 +83,8 @@ spec:
initialDelaySeconds: 2
periodSeconds: 10
timeoutSeconds: 2
volumeMounts:
{{- toYaml .Values.volumeMounts | nindent 10 }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
{{- with .Values.nodeSelector }}
Expand All @@ -104,3 +100,6 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
hostNetwork: {{ .Values.hostNetwork }}
volumes:
{{- toYaml .Values.volumes | nindent 8 }}
{{ end }}
19 changes: 19 additions & 0 deletions charts/kwok/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,22 @@ replicas: 1

# -- Change `hostNetwork` to `true` if you want to deploy in a kind cluster.
hostNetwork: false
tolerations:
- operator: Exists
effect: NoSchedule
key: node-role.kubernetes.io/control-plane
- operator: Exists
effect: NoSchedule
key: node-role.kubernetes.io/master
volumes: []
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumeMounts: []
enableDeployment: true

0 comments on commit 087d118

Please sign in to comment.