Skip to content

Commit

Permalink
Merge pull request #322 from gabriel-milan/master
Browse files Browse the repository at this point in the history
[Feature] Allows custom job templates on helm chart
  • Loading branch information
zanieb authored Nov 30, 2021
2 parents e7706de + b083f6b commit 5dcb159
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
23 changes: 23 additions & 0 deletions changes/pr322.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# An example changelog entry
#
# 1. Choose one (or more if a PR encompasses multiple changes) of the following headers:
# - feature
# - enhancement
# - fix
# - deprecation
# - breaking (for breaking changes)
# - migration (for database migrations)
#
# 2. Fill in one (or more) bullet points under the heading, describing the change.
# Markdown syntax may be used.
#
# 3. If you would like to be credited as helping with this release, add a
# contributor section with your name and github username.
#
# Here's an example of a PR that adds an enhancement

feature:
- "Allows custom job templates on helm chart - [#322](https://github.com/PrefectHQ/server/pull/322)"

contributor:
- "[Gabriel Gazola Milan](https://github.com/gabriel-milan)"
4 changes: 4 additions & 0 deletions helm/prefect-server/templates/agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ spec:
command:
- bash
- "-c"
{{- if .Values.agent.jobTemplateFilePath }}
- "prefect agent kubernetes start --job-template {{ .Values.agent.jobTemplateFilePath }}"
{{- else }}
- "prefect agent kubernetes start"
{{- end }}
env:
- name: PREFECT__CLOUD__API
value: {{ include "prefect-server.apollo-api-url" . }}
Expand Down
28 changes: 13 additions & 15 deletions helm/prefect-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# images which are used for the apollo, graphql, and towel
# services. If null, this value defaults to `appVersion` but is
# provided here to allow override at chart install time. Each
# service image tag can be overriden individually in their
# service image tag can be overriden individually in their
# configurations but it is not recommended.
# See https://github.com/helm/helm/issues/8194 for details
# on why the `appVersion` cannot be set at install time.
Expand All @@ -25,7 +25,8 @@ uiVersionTag: "latest"
# imagePullSecrets provides configuration to reference the k8s Secret
# resources the Helm chart's pods can get credentials from to pull
# their images.
imagePullSecrets: []
imagePullSecrets:
[]
# - name: "secret_name"

# annotations to merge into all object configurations
Expand Down Expand Up @@ -127,11 +128,9 @@ prefectConfig:
# telemetry:
# enabled: "true"


# hasura configures the Prefect hasura deployment and service
# which creates a graphql api from the postgres database
hasura:

# hasura.image configures the docker image used for hasura
# and is the only image in the chart that is not hosted by
# Prefect
Expand Down Expand Up @@ -161,11 +160,9 @@ hasura:
tolerations: []
affinity: {}


# graphql configures the Prefect graphql deployment and service
# which provides a python graphql server on starlette
graphql:

image:
name: prefecthq/server
tag: null
Expand All @@ -189,7 +186,6 @@ graphql:
tolerations: []
affinity: {}


init:
# init.resources configures resources for the initContainer
# which upgrades the database
Expand Down Expand Up @@ -227,7 +223,8 @@ apollo:
labels: {}

## Hosts must be provided if Ingress is enabled.
hosts: []
hosts:
[]
# - prefecthq-apollo.domain.com

## Path to use for ingress rules
Expand All @@ -254,10 +251,9 @@ apollo:

# ui configures the Prefect ui deployment and service
ui:

image:
name: prefecthq/ui
tag: null # See `uiVersionTag` instead
tag: null # See `uiVersionTag` instead
pullPolicy: Always
pullSecrets: []
# - name: "secret_name"
Expand Down Expand Up @@ -285,7 +281,8 @@ ui:
labels: {}

## Hosts must be provided if Ingress is enabled.
hosts: []
hosts:
[]
# - prefecthq-ui.domain.com

## Path to use for ingress rules
Expand Down Expand Up @@ -332,18 +329,21 @@ towel:
tolerations: []
affinity: {}


# agent configures an optional Prefect Kubernetes agent which will
# schedule flows as jobs in the cluster
agent:

# enabled determines if the Prefect Kubernetes agent is deployed
enabled: false

# prefectLabels defines what scheduling labels (not K8s labels) should
# be associated with the agent
prefectLabels: []

# jobTemplateFilePath defines which template to use for the agent's jobs. Defaults
# to an empty string, which will use the default template.
# reference: https://docs.prefect.io/orchestration/agents/kubernetes.html#custom-job-template
jobTemplateFilePath: ""

# image configures the container image for the agent deployment
image:
name: prefecthq/prefect
Expand Down Expand Up @@ -400,10 +400,8 @@ serviceAccount:
# prefect-server.nameField template
name: null


# jobs contain one-time job definitions
jobs:

# create a tenant so that Agent and UI are immediately usable after installation
createTenant:
enabled: false
Expand Down

0 comments on commit 5dcb159

Please sign in to comment.