-
Notifications
You must be signed in to change notification settings - Fork 661
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
Flyte Agent Helm Chart #3935
Merged
Merged
Flyte Agent Helm Chart #3935
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6cc60b6
Add flyte agent helm chart
pingsutw 93e86df
Add generated file
pingsutw fbb0760
Merged master
pingsutw 5557cab
Update github action
pingsutw 71cd378
lint
pingsutw 9278896
lint
pingsutw 77913bd
lint
pingsutw e9ff03b
update secret
pingsutw f231b81
update value.yaml
pingsutw 6602957
update value.yaml
pingsutw 4919221
update value.yaml
pingsutw 7296af7
make helm
pingsutw b8eb4b8
disable agent in flyte-binary
pingsutw 56d80c9
helm dep update
pingsutw 7b6b387
helm dep update
pingsutw dae513c
update chart
pingsutw 2fc4ace
Merged master
pingsutw 5f67a62
Updated configmap
pingsutw 72d7e09
Add agent dir
pingsutw feefa16
merged master
pingsutw 371dd2f
remove name from agent secret
pingsutw b0a581d
make generate
pingsutw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v2 | ||
name: flyteagent | ||
description: A Helm chart for Flyte agent | ||
type: application | ||
version: v0.1.10 # VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# flyteagent | ||
|
||
![Version: v0.1.10](https://img.shields.io/badge/Version-v0.1.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) | ||
|
||
A Helm chart for Flyte agent | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| additionalContainers | list | `[]` | Appends additional containers to the deployment spec. May include template values. | | ||
| additionalVolumeMounts | list | `[]` | Appends additional volume mounts to the main container's spec. May include template values. | | ||
| additionalVolumes | list | `[]` | Appends additional volumes to the deployment spec. May include template values. | | ||
| affinity | object | `{}` | affinity for flyteagent deployment | | ||
| agentSecret.secretData | object | `{"data":{"username":"User"}}` | Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). | | ||
| commonAnnotations | object | `{}` | | | ||
| commonLabels | object | `{}` | | | ||
| configPath | string | `"/etc/flyteagent/config/*.yaml"` | Default regex string for searching configuration files | | ||
| extraArgs | object | `{}` | Appends extra command line arguments to the main command | | ||
| fullnameOverride | string | `""` | | | ||
| image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | | ||
| image.repository | string | `"ghcr.io/flyteorg/flyteagent"` | Docker image for flyteagent deployment | | ||
| image.tag | string | `"1.8.3"` | Docker image tag | | ||
| nameOverride | string | `""` | | | ||
| nodeSelector | object | `{}` | nodeSelector for flyteagent deployment | | ||
| podAnnotations | object | `{}` | Annotations for flyteagent pods | | ||
| ports.containerPort | int | `8000` | | | ||
| ports.name | string | `"agent-grpc"` | | | ||
| priorityClassName | string | `""` | Sets priorityClassName for datacatalog pod(s). | | ||
| replicaCount | int | `1` | Replicas count for flyteagent deployment | | ||
| resources | object | `{"limits":{"cpu":"500m","ephemeral-storage":"200Mi","memory":"200Mi"},"requests":{"cpu":"500m","ephemeral-storage":"200Mi","memory":"200Mi"}}` | Default resources requests and limits for flyteagent deployment | | ||
| service | object | `{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"type":"ClusterIP"}` | Service settings for flyteagent | | ||
| serviceAccount | object | `{"annotations":{},"create":true,"imagePullSecrets":[]}` | Configuration for service accounts for flyteagent | | ||
| serviceAccount.annotations | object | `{}` | Annotations for ServiceAccount attached to flyteagent pods | | ||
| serviceAccount.create | bool | `true` | Should a service account be created for flyteagent | | ||
| serviceAccount.imagePullSecrets | list | `[]` | ImagePullSecrets to automatically assign to the service account | | ||
| tolerations | list | `[]` | tolerations for flyteagent deployment | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{- define "flyte.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "flyte.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "flyte.namespace" -}} | ||
{{- default .Release.Namespace .Values.forceNamespace | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
|
||
{{- define "flyteagent.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "flyteagent.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ template "flyteagent.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{- define "flyteagent.labels" -}} | ||
{{ include "flyteagent.selectorLabels" . }} | ||
helm.sh/chart: {{ include "flyte.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
# Optional blocks for secret mount | ||
|
||
{{- define "agentSecret.volume" -}} | ||
- name: {{ include "flyte.name" . }} | ||
secret: | ||
secretName: {{ include "flyte.name" . }} | ||
{{- end }} | ||
|
||
{{- define "agentSecret.volumeMount" -}} | ||
- mountPath: /etc/secrets | ||
name: {{ include "flyte.name" . }} | ||
{{- end }} | ||
|
||
{{- define "flyteagent.servicePort" -}} | ||
{{ include .Values.ports.containerPort}} | ||
{{- end }} |
34 changes: 17 additions & 17 deletions
34
...lyte-core/templates/agent/deployment.yaml → ...yte-agent/templates/agent/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
{{- if .Values.flyteagent.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "flyteagent.name" . }} | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteagent.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.flyteagent.replicaCount }} | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: {{ include "flyteagent.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
annotations: | ||
{{- with .Values.flyteagent.podAnnotations }} | ||
{{- with .Values.podAnnotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: {{ include "flyteagent.labels" . | nindent 8 }} | ||
spec: | ||
{{- if .Values.flyteagent.priorityClassName }} | ||
priorityClassName: {{ .Values.flyteagent.priorityClassName }} | ||
{{- if .Values.priorityClassName }} | ||
priorityClassName: {{ .Values.priorityClassName }} | ||
{{- end }} | ||
containers: | ||
- command: | ||
- pyflyte | ||
- serve | ||
image: "{{ .Values.flyteagent.image.repository }}:{{ .Values.flyteagent.image.tag }}" | ||
imagePullPolicy: "{{ .Values.flyteagent.image.pullPolicy }}" | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: "{{ .Values.image.pullPolicy }}" | ||
name: flyteagent | ||
volumeMounts: {{- include "agentSecret.volumeMount" . | nindent 8 }} | ||
ports: | ||
- containerPort: {{ .Values.flyteagent.ports.containerPort }} | ||
name: {{ .Values.flyteagent.ports.name }} | ||
resources: {{- toYaml .Values.flyteagent.resources | nindent 10 }} | ||
{{- with .Values.flyteagent.additionalVolumeMounts -}} | ||
- containerPort: {{ .Values.ports.containerPort }} | ||
name: {{ .Values.ports.name }} | ||
resources: {{- toYaml .Values.resources | nindent 10 }} | ||
{{- with .Values.additionalVolumeMounts -}} | ||
{{ tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.flyteagent.additionalContainers -}} | ||
{{- with .Values.additionalContainers -}} | ||
{{- tpl (toYaml .) $ | nindent 6}} | ||
{{- end }} | ||
serviceAccountName: {{ template "flyteagent.name" . }} | ||
{{- with .Values.flyteagent.additionalVolumes -}} | ||
volumes: {{- include "agentSecret.volume" . | nindent 6 }} | ||
{{- with .Values.additionalVolumes -}} | ||
{{ tpl (toYaml .) $ | nindent 6 }} | ||
{{- end }} | ||
{{- with .Values.flyteagent.nodeSelector }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.flyteagent.affinity }} | ||
{{- with .Values.affinity }} | ||
affinity: {{ tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.flyteagent.tolerations }} | ||
{{- with .Values.tolerations }} | ||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "flyteagent.name" . }} | ||
namespace: {{ template "flyte.namespace" . }} | ||
type: Opaque | ||
{{- with .Values.agentSecret.secretData -}} | ||
{{ tpl (toYaml .) $ | nindent 0 }} | ||
{{- end }} |
12 changes: 5 additions & 7 deletions
12
...s/flyte-core/templates/agent/service.yaml → .../flyte-agent/templates/agent/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
{{- if .Values.flyteagent.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "flyteagent.name" . }} | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteagent.labels" . | nindent 4 }} | ||
{{- with .Values.flyteagent.service.annotations }} | ||
{{- with .Values.service.annotations }} | ||
annotations: {{ tpl (toYaml .) $ | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.flyteagent.service.type}} | ||
{{- with .Values.service.type}} | ||
type: {{ . }} | ||
{{- end }} | ||
ports: | ||
- name: {{ .Values.flyteagent.ports.name }} | ||
port: {{ .Values.flyteagent.ports.containerPort }} | ||
- name: {{ .Values.ports.name }} | ||
port: {{ .Values.ports.containerPort }} | ||
protocol: TCP | ||
targetPort: {{ .Values.flyteagent.ports.name }} | ||
targetPort: {{ .Values.ports.name }} | ||
selector: {{ include "flyteagent.selectorLabels" . | nindent 4 }} | ||
{{- end }} |
8 changes: 3 additions & 5 deletions
8
charts/flyte-core/templates/agent/rbac.yaml → ...agent/templates/agent/serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
{{- if .Values.flyteagent.enabled }} | ||
--- | ||
{{- if .Values.flyteagent.serviceAccount.create }} | ||
{{- if .Values.serviceAccount.create }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ template "flyteagent.name" . }} | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteagent.labels" . | nindent 4 }} | ||
{{- with .Values.flyteagent.serviceAccount.annotations }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: {{ tpl (toYaml .) $ | nindent 4 }} | ||
{{- end}} | ||
{{- with .Values.flyteagent.serviceAccount.imagePullSecrets }} | ||
{{- with .Values.serviceAccount.imagePullSecrets }} | ||
imagePullSecrets: {{ tpl (toYaml .) $ | nindent 2 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# --------------------------------------------------------------------- | ||
# FLYTE_AGENT SETTINGS | ||
# --------------------------------------------------------------------- | ||
|
||
# nameOverride String to override flyte-agent.name template | ||
nameOverride: "" | ||
# fullnameOverride String to override flyte-agent.fullname template | ||
fullnameOverride: "" | ||
# commonLabels Add labels to all the deployed resources | ||
commonLabels: {} | ||
# commonAnnotations Add annotations to all the deployed resources | ||
commonAnnotations: {} | ||
|
||
agentSecret: | ||
# -- Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). | ||
secretData: | ||
data: | ||
username: User | ||
|
||
# -- Replicas count for flyteagent deployment | ||
replicaCount: 1 | ||
image: | ||
# -- Docker image for flyteagent deployment | ||
repository: ghcr.io/flyteorg/flyteagent | ||
# -- Docker image tag | ||
tag: 1.8.3 | ||
# -- Docker image pull policy | ||
pullPolicy: IfNotPresent | ||
ports: | ||
containerPort: 8000 | ||
name: agent-grpc | ||
# -- Default resources requests and limits for flyteagent deployment | ||
resources: | ||
limits: | ||
cpu: 500m | ||
ephemeral-storage: 200Mi | ||
memory: 200Mi | ||
requests: | ||
cpu: 500m | ||
ephemeral-storage: 200Mi | ||
memory: 200Mi | ||
# -- Default regex string for searching configuration files | ||
configPath: /etc/flyteagent/config/*.yaml | ||
# -- Service settings for flyteagent | ||
service: | ||
annotations: | ||
projectcontour.io/upstream-protocol.h2c: grpc | ||
type: ClusterIP | ||
# -- Configuration for service accounts for flyteagent | ||
serviceAccount: | ||
# -- Should a service account be created for flyteagent | ||
create: true | ||
# -- Annotations for ServiceAccount attached to flyteagent pods | ||
annotations: {} | ||
# -- ImagePullSecrets to automatically assign to the service account | ||
imagePullSecrets: [] | ||
# -- Annotations for flyteagent pods | ||
podAnnotations: {} | ||
# -- nodeSelector for flyteagent deployment | ||
nodeSelector: {} | ||
# -- tolerations for flyteagent deployment | ||
tolerations: [] | ||
# -- affinity for flyteagent deployment | ||
affinity: {} | ||
# -- Appends additional volumes to the deployment spec. May include template values. | ||
additionalVolumes: [] | ||
# -- Appends additional volume mounts to the main container's spec. May include template values. | ||
additionalVolumeMounts: [] | ||
# -- Appends additional containers to the deployment spec. May include template values. | ||
additionalContainers: [] | ||
# -- Appends extra command line arguments to the main command | ||
extraArgs: {} | ||
# -- Sets priorityClassName for datacatalog pod(s). | ||
priorityClassName: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be value in consolidating the format of our
values.yaml
files so that users can start getting familiar. Right now, all charts are very different from each other.