-
Notifications
You must be signed in to change notification settings - Fork 837
Migrate flyteconnector chart wiring and runtime defaults for Flyte Connectors #7377
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
70f32c3
c36d214
881ffdb
0fc3d0c
c0dffa7
a5c944d
3709892
e4544d4
1ab9da3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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/ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| apiVersion: v2 | ||||||
| name: flyteconnector | ||||||
| description: A Helm chart for Flyte connector | ||||||
| type: application | ||||||
| version: v0.1.10 # VERSION | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. I've switched to |
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # flyteconnector | ||
|
|
||
|   | ||
|
|
||
| A Helm chart for Flyte connector | ||
|
|
||
| ## 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 flyteconnector deployment | | ||
| | commonAnnotations | object | `{}` | | | ||
| | commonLabels | object | `{}` | | | ||
| | configPath | string | `"/etc/flyteconnector/config/*.yaml"` | Default regex string for searching configuration files | | ||
| | connectorSecret.secretData | object | `{}` | Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). | | ||
| | 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/flyte-connectors"` | Docker image for flyteconnector deployment | | ||
| | image.tag | string | `"latest"` | Docker image tag | | ||
| | nameOverride | string | `""` | | | ||
| | nodeSelector | object | `{}` | nodeSelector for flyteconnector deployment | | ||
| | podAnnotations | object | `{}` | Annotations for flyteconnector pods | | ||
| | podEnv | object | `{}` | Additional flyteconnector pod container environment variables | | ||
| | podLabels | object | `{}` | Labels for flyteconnector pods | | ||
| | podSecurityContext | object | `{}` | | | ||
| | ports.containerPort | int | `8000` | | | ||
| | ports.name | string | `"connector-grpc"` | | | ||
| | priorityClassName | string | `""` | Sets priorityClassName for datacatalog pod(s). | | ||
| | rbac | object | `{"enabled":false,"rules":[{"apiGroups":[""],"resources":["secrets"],"verbs":["get"]}]}` | RBAC configuration for flyteconnector Enable to allow the connector to read secrets across namespaces (required for per-project Databricks token authentication) | | ||
| | rbac.enabled | bool | `false` | Should RBAC resources (ClusterRole/ClusterRoleBinding) be created for flyteconnector | | ||
| | rbac.rules | list | `[{"apiGroups":[""],"resources":["secrets"],"verbs":["get"]}]` | Rules for the ClusterRole created for flyteconnector | | ||
| | readinessProbe | object | `{"grpc":{"port":8000},"initialDelaySeconds":1,"periodSeconds":3}` | https://kubernetes.io/blog/2022/05/13/grpc-probes-now-in-beta/#trying-the-feature-out | | ||
| | replicaCount | int | `1` | Replicas count for flyteconnector deployment | | ||
| | resources | object | `{"limits":{"cpu":"500m","ephemeral-storage":"200Mi","memory":"300Mi"},"requests":{"cpu":"500m","ephemeral-storage":"200Mi","memory":"200Mi"}}` | Default resources requests and limits for flyteconnector deployment | | ||
| | securityContext | object | `{"allowPrivilegeEscalation":false}` | Security context for container | | ||
| | service | object | `{"annotations":{"projectcontour.io/upstream-protocol.h2c":"grpc"},"type":"ClusterIP"}` | Service settings for flyteconnector | | ||
| | serviceAccount | object | `{"annotations":{},"create":true,"imagePullSecrets":[]}` | Configuration for service accounts for flyteconnector | | ||
| | serviceAccount.annotations | object | `{}` | Annotations for ServiceAccount attached to flyteconnector pods | | ||
| | serviceAccount.create | bool | `true` | Should a service account be created for flyteconnector | | ||
| | serviceAccount.imagePullSecrets | list | `[]` | ImagePullSecrets to automatically assign to the service account | | ||
| | tolerations | list | `[]` | tolerations for flyteconnector deployment | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| {{/* 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 -}} | ||
|
Comment on lines
+3
to
+13
|
||
|
|
||
|
|
||
| {{- define "flyteconnector.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
| {{- end -}} | ||
|
Comment on lines
+16
to
+18
|
||
|
|
||
| {{- define "flyteconnector.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ template "flyteconnector.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end -}} | ||
|
|
||
| {{- define "flyteconnector.labels" -}} | ||
| {{ include "flyteconnector.selectorLabels" . }} | ||
| helm.sh/chart: {{ include "flyte.chart" . }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end -}} | ||
|
|
||
| {{- define "flyteconnector.podLabels" -}} | ||
| {{ include "flyteconnector.labels" . }} | ||
| {{- with .Values.podLabels }} | ||
| {{ toYaml . }} | ||
| {{- end }} | ||
| {{- end -}} | ||
|
|
||
| # Optional blocks for secret mount | ||
|
|
||
| {{- define "connectorSecret.volume" -}} | ||
| - name: {{ include "flyte.name" . }} | ||
| secret: | ||
| secretName: {{ include "flyte.name" . }} | ||
| {{- end }} | ||
|
|
||
| {{- define "connectorSecret.volumeMount" -}} | ||
| - mountPath: /etc/secrets | ||
| name: {{ include "flyte.name" . }} | ||
| {{- end }} | ||
|
|
||
| {{- define "flyteconnector.servicePort" -}} | ||
| {{ include .Values.ports.containerPort}} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copilot might be right
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. I've made the requested changes |
||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ template "flyteconnector.name" . }} | ||
| namespace: {{ template "flyte.namespace" . }} | ||
| labels: {{ include "flyteconnector.labels" . | nindent 4 }} | ||
|
Comment on lines
+4
to
+6
|
||
| spec: | ||
| replicas: {{ .Values.replicaCount }} | ||
| selector: | ||
| matchLabels: {{ include "flyteconnector.selectorLabels" . | nindent 6 }} | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| {{- with .Values.podAnnotations }} | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
|
Comment on lines
+13
to
+16
|
||
| labels: {{ include "flyteconnector.podLabels" . | nindent 8 }} | ||
| spec: | ||
| {{- if .Values.priorityClassName }} | ||
| priorityClassName: {{ .Values.priorityClassName }} | ||
| {{- end }} | ||
| securityContext: | ||
| {{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
| containers: | ||
| - command: | ||
| - flyte | ||
| - serve | ||
| - connector | ||
| {{- if .Values.podEnv }} | ||
| env: | ||
| {{- with .Values.podEnv }} | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
Comment on lines
+25
to
+32
|
||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
| imagePullPolicy: "{{ .Values.image.pullPolicy }}" | ||
| name: flyteconnector | ||
| volumeMounts: | ||
| {{- include "connectorSecret.volumeMount" . | nindent 8 }} | ||
| {{- with .Values.additionalVolumeMounts -}} | ||
| {{ tpl (toYaml .) $ | nindent 8 }} | ||
| {{- end }} | ||
| ports: | ||
| - containerPort: {{ .Values.ports.containerPort }} | ||
| name: {{ .Values.ports.name }} | ||
| readinessProbe: | ||
| {{- with .Values.readinessProbe -}} | ||
| {{ tpl (toYaml .) $ | nindent 10 }} | ||
| {{- end }} | ||
|
Comment on lines
+46
to
+49
|
||
| securityContext: | ||
| {{- toYaml .Values.securityContext | nindent 12 }} | ||
| resources: {{- toYaml .Values.resources | nindent 10 }} | ||
| {{- with .Values.additionalContainers -}} | ||
| {{- tpl (toYaml .) $ | nindent 6}} | ||
| {{- end }} | ||
| serviceAccountName: {{ template "flyteconnector.name" . }} | ||
| volumes: {{- include "connectorSecret.volume" . | nindent 6 }} | ||
| {{- with .Values.additionalVolumes -}} | ||
| {{ tpl (toYaml .) $ | nindent 6 }} | ||
| {{- end }} | ||
| {{- with .Values.nodeSelector }} | ||
| nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.affinity }} | ||
| affinity: {{ tpl (toYaml .) $ | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.tolerations }} | ||
| tolerations: {{ tpl (toYaml .) $ | nindent 8 }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| {{- if .Values.rbac.enabled }} | ||
| {{- if $.Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }} | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| {{- else }} | ||
| apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
| {{- end }} | ||
| kind: ClusterRole | ||
| metadata: | ||
| name: {{ template "flyte.namespace" . -}}-{{- template "flyteconnector.name" . }} | ||
| labels: {{ include "flyteconnector.labels" . | nindent 4 }} | ||
| rules: | ||
| {{- toYaml .Values.rbac.rules | nindent 2 }} | ||
| --- | ||
| {{- if $.Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }} | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| {{- else }} | ||
| apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
| {{- end }} | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: {{ template "flyte.namespace" . -}}-{{- template "flyteconnector.name" . }} | ||
| labels: {{ include "flyteconnector.labels" . | nindent 4 }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: {{ template "flyte.namespace" . -}}-{{- template "flyteconnector.name" . }} | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ template "flyteconnector.name" . }} | ||
| namespace: {{ template "flyte.namespace" . }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ template "flyteconnector.name" . }} | ||
| namespace: {{ template "flyte.namespace" . }} | ||
| type: Opaque | ||
| {{- with .Values.connectorSecret.secretData -}} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we update here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I updated this by making the Secret conditional on connectorSecret.secretData. |
||
| {{ tpl (toYaml .) $ | nindent 0 }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ template "flyteconnector.name" . }} | ||
| namespace: {{ template "flyte.namespace" . }} | ||
| labels: {{ include "flyteconnector.labels" . | nindent 4 }} | ||
| {{- with .Values.service.annotations }} | ||
| annotations: {{ tpl (toYaml .) $ | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| {{- with .Values.service.type}} | ||
| type: {{ . }} | ||
| {{- end }} | ||
| ports: | ||
| - name: {{ .Values.ports.name }} | ||
| port: {{ .Values.ports.containerPort }} | ||
| protocol: TCP | ||
| appProtocol: TCP | ||
|
Comment on lines
+14
to
+18
|
||
| targetPort: {{ .Values.ports.name }} | ||
|
Comment on lines
+16
to
+19
|
||
| selector: {{ include "flyteconnector.selectorLabels" . | nindent 4 }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| {{- if .Values.serviceAccount.create }} | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: {{ template "flyteconnector.name" . }} | ||
| namespace: {{ template "flyte.namespace" . }} | ||
| labels: {{ include "flyteconnector.labels" . | nindent 4 }} | ||
| {{- with .Values.serviceAccount.annotations }} | ||
| annotations: {{ tpl (toYaml .) $ | nindent 4 }} | ||
| {{- end}} | ||
| {{- with .Values.serviceAccount.imagePullSecrets }} | ||
| imagePullSecrets: {{ tpl (toYaml .) $ | nindent 2 }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
Comment on lines
+11
to
+15
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # --------------------------------------------------------------------- | ||
| # FLYTE_CONNCETOR SETTINGS | ||
|
kevinliao852 marked this conversation as resolved.
Outdated
|
||
| # --------------------------------------------------------------------- | ||
|
|
||
| # nameOverride String to override flyteconnector.name template | ||
| nameOverride: "" | ||
| # fullnameOverride String to override flyteconnector.fullname template | ||
| fullnameOverride: "" | ||
|
Comment on lines
+5
to
+8
|
||
| # commonLabels Add labels to all the deployed resources | ||
| commonLabels: {} | ||
| # commonAnnotations Add annotations to all the deployed resources | ||
| commonAnnotations: {} | ||
|
Comment on lines
+9
to
+12
|
||
|
|
||
| connectorSecret: | ||
| # -- Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). | ||
| secretData: {} | ||
|
|
||
| # -- Replicas count for flyteconnector deployment | ||
| replicaCount: 1 | ||
| image: | ||
| # -- Docker image for flyteconnector deployment | ||
| repository: ghcr.io/flyteorg/flyte-connectors # FLYTECONNECTOR_IMAGE | ||
| # -- Docker image tag | ||
| tag: latest # FLYTECONNECTOR_TAG | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use 2.3.6 for now. ghcr.io/flyteorg/flyte-connectors:py3.12-v2.3.6
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the clarification. I'll use ghcr.io/flyteorg/flyte-connectors:py3.12-v2.3.6 for now. |
||
| # -- Docker image pull policy | ||
| pullPolicy: IfNotPresent | ||
| ports: | ||
| containerPort: 8000 | ||
| name: connector-grpc | ||
| # -- Default resources requests and limits for flyteconnector deployment | ||
| resources: | ||
| limits: | ||
| cpu: 500m | ||
| ephemeral-storage: 200Mi | ||
| memory: 300Mi | ||
| requests: | ||
| cpu: 500m | ||
| ephemeral-storage: 200Mi | ||
| memory: 200Mi | ||
| # -- Default regex string for searching configuration files | ||
| configPath: /etc/flyteconnector/config/*.yaml | ||
|
Comment on lines
+40
to
+41
Comment on lines
+40
to
+41
|
||
| # -- Service settings for flyteconnector | ||
| service: | ||
| annotations: | ||
| projectcontour.io/upstream-protocol.h2c: grpc | ||
| type: ClusterIP | ||
| # -- Configuration for service accounts for flyteconnector | ||
| serviceAccount: | ||
| # -- Should a service account be created for flyteconnector | ||
| create: true | ||
| # -- Annotations for ServiceAccount attached to flyteconnector pods | ||
| annotations: {} | ||
| # -- ImagePullSecrets to automatically assign to the service account | ||
| imagePullSecrets: [] | ||
| # -- Security context for pod | ||
| # -- RBAC configuration for flyteconnector | ||
| # Enable to allow the connector to read secrets across namespaces | ||
| # (required for per-project Databricks token authentication) | ||
| rbac: | ||
| # -- Should RBAC resources (ClusterRole/ClusterRoleBinding) be created for flyteconnector | ||
| enabled: false | ||
| # -- Rules for the ClusterRole created for flyteconnector | ||
| rules: | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - secrets | ||
| verbs: | ||
| - get | ||
| podSecurityContext: {} | ||
| # -- Readiness probe for flyteconnector. Use readinessProbe: {} if connector doesn't implement grpc-health-checking service. | ||
| # -- https://kubernetes.io/blog/2022/05/13/grpc-probes-now-in-beta/#trying-the-feature-out | ||
| readinessProbe: | ||
| grpc: | ||
| port: 8000 | ||
| initialDelaySeconds: 1 | ||
| periodSeconds: 3 | ||
| # -- Security context for container | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| # -- Annotations for flyteconnector pods | ||
| podAnnotations: {} | ||
| # -- Additional flyteconnector pod container environment variables | ||
| podEnv: {} | ||
| # -- Labels for flyteconnector pods | ||
| podLabels: {} | ||
|
Comment on lines
+82
to
+86
|
||
| # -- nodeSelector for flyteconnector deployment | ||
| nodeSelector: {} | ||
| # -- tolerations for flyteconnector deployment | ||
| tolerations: [] | ||
| # -- affinity for flyteconnector 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: {} | ||
|
Comment on lines
+97
to
+100
|
||
| # -- Sets priorityClassName for datacatalog pod(s). | ||
|
kevinliao852 marked this conversation as resolved.
Outdated
|
||
| priorityClassName: "" | ||
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.