Skip to content

Commit

Permalink
Merge pull request #79 from witalloliveira/feat/license-key-as-secret
Browse files Browse the repository at this point in the history
feat: add support for enterprise license key as secret
  • Loading branch information
rubenfiszel authored Oct 10, 2024
2 parents 335b623 + 17bdb1e commit 8783176
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ enterprise:
| enterprise.enabled | bool | `false` | enable Windmill Enterprise , requires license key. |
| enterprise.enabledS3DistributedCache | bool | `false` | |
| enterprise.licenseKey | string | `"123456F"` | Windmill provided Enterprise license key. Sets LICENSE_KEY environment variable in app and worker container. |
| enterprise.licenseKeySecretName | string | `""` | name of the secret storing the Enterprise license key, take precedence over licenseKey. The default key is `"licenseKey"` |
| enterprise.nsjail | bool | `false` | use nsjail for sandboxing |
| enterprise.s3CacheBucket | string | `"mybucketname"` | S3 bucket to use for dependency cache. Sets S3_CACHE_BUCKET environment variable in worker container |
| enterprise.samlMetadata | string | `""` | SAML Metadata URL to enable SAML SSO (Can be set in the Instance Settings UI, which is the recommended method) |
Expand Down
8 changes: 8 additions & 0 deletions charts/windmill/templates/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ spec:
value: "true"
{{ end }}
{{ if .Values.enterprise.enabled }}
{{ if .Values.enterprise.licenseKeySecretName }}
- name: "LICENSE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.enterprise.licenseKeySecretName }}
key: {{ .Values.enterprise.licenseKeySecretKey }}
{{ else }}
- name: "LICENSE_KEY"
value: "{{ .Values.enterprise.licenseKey }}"
{{ end }}
Expand All @@ -132,6 +139,7 @@ spec:
- name: "SCIM_TOKEN"
value: "{{ .Values.enterprise.scimToken }}"
{{ end }}
{{ end }}
{{ if .Values.windmill.openaiAzureBasePath}}
- name: OPENAI_AZURE_BASE_PATH
value: "{{ .Values.windmill.openaiAzureBasePath }}"
Expand Down
17 changes: 15 additions & 2 deletions charts/windmill/templates/hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,21 @@ spec:
value: "true"
- name: PUBLIC_APP_URL
value: "{{ .Values.windmill.baseProtocol }}://{{ .Values.windmill.baseDomain }}"
- name: LICENSE_KEY
value: "{{ .Values.hub.licenseKey }}"
{{ if .Values.enterprise.enabled }}
{{ if .Values.enterprise.licenseKeySecretName }}
- name: "LICENSE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.enterprise.licenseKeySecretName }}
key: {{ .Values.enterprise.licenseKeySecretKey }}
{{ else if .Values.enterprise.licenseKey }}
- name: "LICENSE_KEY"
value: "{{ .Values.enterprise.licenseKey }}"
{{ else }}
- name: "LICENSE_KEY"
value: "{{ .Values.hub.licenseKey }}" #DEPRECATED
{{ end }}
{{ end }}
resources:
{{ toYaml .Values.hub.resources | indent 12 }}
{{- with .Values.hub.nodeSelector }}
Expand Down
8 changes: 8 additions & 0 deletions charts/windmill/templates/worker-groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,16 @@ spec:
value: "{{ $.Values.windmill.npmConfigRegistry }}"
{{ end }}
{{ if $.Values.enterprise.enabled }}
{{ if $.Values.enterprise.licenseKeySecretName }}
- name: "LICENSE_KEY"
valueFrom:
secretKeyRef:
name: {{ $.Values.enterprise.licenseKeySecretName }}
key: {{ $.Values.enterprise.licenseKeySecretKey }}
{{ else }}
- name: "LICENSE_KEY"
value: "{{ $.Values.enterprise.licenseKey }}"
{{ end }}
{{ if $.Values.enterprise.enabledS3DistributedCache }}
- name: "S3_CACHE_BUCKET"
value: "{{ $.Values.enterprise.s3CacheBucket }}"
Expand Down
4 changes: 4 additions & 0 deletions charts/windmill/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ ingress:
enterprise:
# -- enable Windmill Enterprise, requires license key.
enabled: false
# -- name of the secret storing the enterprise license key, take precedence over licenseKey string.
licenseKeySecretName: ""
# -- name of the key in secret storing the enterprise license key. The default key is 'licenseKey'
licenseKeySecretKey: licenseKey
# -- enterprise license key. (Recommended to avoid: It is recommended to pass it from the Instance settings UI instead)
licenseKey: ""
enabledS3DistributedCache: false
Expand Down

0 comments on commit 8783176

Please sign in to comment.