-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kevin Su <pingsutw@apache.org>
- Loading branch information
Showing
29 changed files
with
378 additions
and
632 deletions.
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.