Skip to content

Commit

Permalink
Merge pull request #13 from amitai-devops/main
Browse files Browse the repository at this point in the history
🎨 improve helm values, add configurable options
rubenfiszel authored Apr 20, 2023
2 parents 14d7115 + b9dae7e commit 5ae12a9
Showing 8 changed files with 233 additions and 51 deletions.
1 change: 1 addition & 0 deletions .github/workflows/helm_test.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ on:
push:
branches:
- main
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

108 changes: 66 additions & 42 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions charts/windmill/Chart.yaml
Original file line number Diff line number Diff line change
@@ -15,10 +15,10 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.2
version: 1.1.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. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 1.87.0
appVersion: 1.87.1
49 changes: 49 additions & 0 deletions charts/windmill/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# windmill

![Version: 1.1.3](https://img.shields.io/badge/Version-1.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.87.1](https://img.shields.io/badge/AppVersion-1.87.1-informational?style=flat-square)

A Helm chart for Kubernetes

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| enterprise.enabled | bool | `false` | enable Windmill Enterprise , requires license key. |
| enterprise.licenseKey | string | `"123456F"` | Windmill provided Enterprise license key. Sets LICENSE_KEY environment variable in frontend and worker container. |
| enterprise.s3CacheBucket | string | `"mybucketname"` | S3 bucket to use for dependency cache. Sets S3_CACHE_BUCKET environment variable in worker container |
| lsp | string | `"latest"` | |
| postgres.dbName | string | `"windmill"` | database name for postgres demo container |
| postgres.enabled | bool | `true` | enabled included Postgres container for demo purposes only |
| postgres.password | string | `"changeme"` | password for postgres demo container |
| windmill.baseInternalUrl | string | `"http://windmill-app:8000"` | used internally by the app, should match the service for the frontend deployment, sets BASE_INTERNAL_URL environment variable in frontend and worker container |
| windmill.baseUrl | string | `"http://localhost"` | domain as shown in browser, change to https etc based on your endpoint/ingress configuration, sets BASE_URL environment variable in frontend and worker container |
| windmill.databaseUrl | string | `"postgres://postgres:changeme@postgres/windmill?sslmode=disable"` | Postgres URI, pods will crashloop if database is unreachable, sets DATABASE_URL environment variable in frontend and worker container |
| windmill.denoPath | string | `"/usr/bin/deno"` | deno binary built into Windmill image, should not be changed. Sets DENO_PATH environment variable in frontend and worker container |
| windmill.disableNsjail | bool | `true` | enables/disables nsjail which provide isolation in untrusted environment is disabled by default. Sets DISABLE_NJSAIL environment variable in worker container |
| windmill.disableNuser | bool | `true` | nsjail user . Sets DISABLE_NUSER environment variable in worker container |
| windmill.frontend | object | `{"affinity":{},"annotations":{},"nodeSelector":{},"resources":{},"tolerations":[]}` | frontend configuration |
| windmill.frontend.affinity | object | `{}` | Affinity rules to apply to the pods |
| windmill.frontend.annotations | object | `{}` | Annotations to apply to the pods |
| windmill.frontend.nodeSelector | object | `{}` | Node selector to use for scheduling the pods |
| windmill.frontend.resources | object | `{}` | Resource limits and requests for the pods |
| windmill.frontend.tolerations | list | `[]` | Tolerations to apply to the pods |
| windmill.frontendReplicas | int | `2` | replica for the application frontend |
| windmill.image | string | `"main"` | |
| windmill.lsp | object | `{"affinity":{},"annotations":{},"nodeSelector":{},"resources":{},"tolerations":[]}` | lsp configuration |
| windmill.lsp.affinity | object | `{}` | Affinity rules to apply to the pods |
| windmill.lsp.annotations | object | `{}` | Annotations to apply to the pods |
| windmill.lsp.nodeSelector | object | `{}` | Node selector to use for scheduling the pods |
| windmill.lsp.resources | object | `{}` | Resource limits and requests for the pods |
| windmill.lsp.tolerations | list | `[]` | Tolerations to apply to the pods |
| windmill.lspReplicas | int | `2` | replicas for the lsp containers used by the frontend |
| windmill.nsjailPath | string | `"nsjail"` | nsjail binary. Sets NSJAIL_PATH environment variable in worker container |
| windmill.numWorkers | int | `1` | workers per worker container, default and recommended is 1 to isolate one process per container, sets NUM_WORKER environment variable for worker container. Frontend container has 0 NUM_WORKERS by default |
| windmill.oauthConfig | string | `"{}\n"` | Oauth configuration for logins and connections. e.g of values "github": { "id": "asdfasdf", "secret": "asdfasdfasdf" } |
| windmill.pythonPath | string | `"/usr/local/bin/python3"` | python binary built into Windmill image, should not be changed. Sets PYTHON_PATH environment variable in frontend and worker container |
| windmill.rustBacktrace | int | `1` | rust back trace information enabled, sets RUST_BACKTRACE environment variable in frontend and worker container |
| windmill.rustLog | string | `"info"` | rust log level, set to debug for more information etc, sets RUST_LOG environment variable in frontend and worker container |
| windmill.workerReplicas | int | `4` | replicas for the workers, jobs are executed on the workers |
| windmill.workers | object | `{"affinity":{},"annotations":{},"nodeSelector":{},"resources":{},"tolerations":[]}` | workers configuration |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
21 changes: 20 additions & 1 deletion charts/windmill/templates/deploy_lsp.yaml
Original file line number Diff line number Diff line change
@@ -2,8 +2,13 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: lsp
labels:
app: lsp
chart: {{ template "windmill.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: 2
replicas: {{ .Values.windmill.lspReplicas }}
strategy:
type: RollingUpdate
rollingUpdate:
@@ -24,6 +29,20 @@ spec:
imagePullPolicy: Always
ports:
- containerPort: 3001
resources:
{{ toYaml .Values.windmill.lsp.resources | indent 12 }}
{{- with .Values.windmill.lsp.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.lsp.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.lsp.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
securityContext:
runAsUser: 0
# ---
31 changes: 25 additions & 6 deletions charts/windmill/templates/deploy_windmill.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,11 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: windmill

labels:
app: windmill
chart: {{ template "windmill.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.windmill.frontendReplicas }}
strategy:
@@ -14,13 +18,14 @@ spec:
matchLabels:
app: windmill-app
template:

metadata:
annotations:
timestamp: {{ now | quote }}
labels:
labels:
app: windmill-app
container: windmill-app
release: {{ .Release.Name }}
{{- with .Values.server.annotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
terminationGracePeriodSeconds: 40
containers:
@@ -79,6 +84,20 @@ spec:
value: "{{ .Values.windmill.pythonPath }}"
- name: "NSJAIL_PATH"
value: "{{ .Values.windmill.nsjailPath }}"
resources:
{{ toYaml .Values.windmill.frontend.resources | indent 12 }}
{{- with .Values.windmill.frontend.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.frontend.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.frontend.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
19 changes: 19 additions & 0 deletions charts/windmill/templates/deploy_windmill_workers.yaml
Original file line number Diff line number Diff line change
@@ -2,6 +2,11 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: windmill-workers
labels:
app: windmill-workers
chart: {{ template "windmill.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.windmill.workerReplicas }}
strategy:
@@ -71,6 +76,20 @@ spec:
- name: "RCLONE_S3_PROVIDER"
value: "AWS"
{{ end }}
resources:
{{ toYaml .Values.windmill.workers.resources | indent 12 }}
{{- with .Values.windmill.workers.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.workers.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.workers.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
securityContext:
runAsUser: 0
---
51 changes: 51 additions & 0 deletions charts/windmill/values.yaml
Original file line number Diff line number Diff line change
@@ -43,6 +43,57 @@ windmill:
# }
oauthConfig: |
{}
# -- workers configuration
workers:
# Annotations to apply to the pods
annotations: {}

# Node selector to use for scheduling the pods
nodeSelector: {}

# Tolerations to apply to the pods
tolerations: []

# Affinity rules to apply to the pods
affinity: {}

# Resource limits and requests for the pods
resources: {}

# -- frontend configuration
frontend:
# -- Annotations to apply to the pods
annotations: {}

# -- Node selector to use for scheduling the pods
nodeSelector: {}

# -- Tolerations to apply to the pods
tolerations: []

# -- Affinity rules to apply to the pods
affinity: {}

# -- Resource limits and requests for the pods
resources: {}


# -- lsp configuration
lsp:
# -- Annotations to apply to the pods
annotations: {}

# -- Node selector to use for scheduling the pods
nodeSelector: {}

# -- Tolerations to apply to the pods
tolerations: []

# -- Affinity rules to apply to the pods
affinity: {}

# -- Resource limits and requests for the pods
resources: {}

lsp: "latest"

0 comments on commit 5ae12a9

Please sign in to comment.