Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(base-job-template): Add base job template name #275

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/prefect-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ helm install prefect-worker prefect/prefect-worker -f values.yaml --set-file wor
| worker.cloudApiConfig.cloudUrl | string | `"https://api.prefect.cloud/api"` | prefect cloud API url; the full URL is constructed as https://cloudUrl/accounts/accountId/workspaces/workspaceId |
| worker.cloudApiConfig.workspaceId | string | `""` | prefect workspace ID |
| worker.clusterUid | string | `""` | unique cluster identifier, if none is provided this value will be infered at time of helm install |
| worker.config.baseJobTemplateName | string | `nil` | Name for the base job template. If unspecified, Prefect will use the default base job template name for the given worker type. |
| worker.config.baseJobTemplate | string | `nil` | JSON formatted base job template. If unspecified, Prefect will use the default base job template for the given worker type. If the work pool already exists, this will be ignored. |
| worker.config.http2 | bool | `true` | connect using HTTP/2 if the server supports it (experimental) |
| worker.config.installPolicy | string | `"prompt"` | install policy to use workers from Prefect integration packages. |
Expand Down
3 changes: 2 additions & 1 deletion charts/prefect-worker/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: prefect-worker-base-job-template
name: {{ default "prefect-worker-base-job-template" .Values.worker.config.baseJobTemplateName . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: worker
Expand All @@ -12,3 +12,4 @@ metadata:
data:
baseJobTemplate.json: {{ .Values.worker.config.baseJobTemplate | toJson }}
{{- end }}

2 changes: 1 addition & 1 deletion charts/prefect-worker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,5 @@ spec:
{{- if .Values.worker.config.baseJobTemplate }}
- name: base-job-template-file
configMap:
name: prefect-worker-base-job-template
name: {{ default "prefect-worker-base-job-template" .Values.worker.config.baseJobTemplateName . }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/prefect-worker/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@
"description": "the type of worker to start i.e kubernetes",
"form": true
},
"baseJobTemplateName": {
"type": ["string", "null"],
"title": "Base Job Template Name",
"description": "Template name of the base job template. If unspecified, Prefect will use the default base job template name for the given worker type.",
"form": true
},
"baseJobTemplate": {
"type": ["string", "null"],
"title": "Base Job Template",
Expand Down
Loading