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

Helm template upgrade to auto-generate co-pilot configuration #1056

Merged
merged 2 commits into from
May 27, 2021
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
32 changes: 16 additions & 16 deletions deployment/eks/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,6 @@ data:
limits.cpu: {{ projectQuotaCpu }}
limits.memory: {{ projectQuotaMemory }}

ac_project_copilot_dataconfig.yaml: |
kind: ConfigMap
apiVersion: v1
metadata:
name: flyte-data-config
namespace: {{ namespace }}
data:
config.yaml: |
storage:
type: s3
container: <BUCKET_NAME>
connection:
auth-type: iam
region: <AWS_REGION>
enable-multicontainer: true

ad_spark_role.yaml: |
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
Expand Down Expand Up @@ -192,6 +176,22 @@ data:
- kind: ServiceAccount
name: spark
namespace: {{ namespace }}

zz_copilot_config.yaml: |
kind: ConfigMap
apiVersion: v1
metadata:
name: flyte-data-config
namespace: {{ namespace }}
data:
config.yaml: |
storage:
type: s3
container: "<BUCKET_NAME>"
connection:
auth-type: iam
region: <AWS_REGION>
enable-multicontainer: true
---
# Source: flyte/templates/admin/configmap.yaml
apiVersion: v1
Expand Down
21 changes: 10 additions & 11 deletions deployment/gcp/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,23 @@ data:
limits.cpu: {{ projectQuotaCpu }}
limits.memory: {{ projectQuotaMemory }}

ac_project_copilot_dataconfig.yaml: |
zz_copilot_config.yaml: |
kind: ConfigMap
apiVersion: v1
metadata:
name: flyte-data-config
namespace: {{ namespace }}
data:
config.yaml: |
config.yaml: |
storage:
connection:
access-key: minio
auth-type: accesskey
disable-ssl: true
endpoint: http://minio.flyte.svc.cluster.local:9000
region: us-east-1
secret-key: miniostorage
type: minio
container: my-s3-bucket
type: stow
stow:
kind: google
config:
json: ""
project_id: <GOOGLE_PROJECT_ID>
scopes: https://www.googleapis.com/auth/devstorage.read_write
container: "<BUCKET_NAME>"
enable-multicontainer: true
---
# Source: flyte/templates/admin/configmap.yaml
Expand Down
10 changes: 5 additions & 5 deletions deployment/sandbox/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,24 +283,24 @@ data:
limits.cpu: {{ projectQuotaCpu }}
limits.memory: {{ projectQuotaMemory }}

ac_project_copilot_dataconfig.yaml: |
zz_copilot_config.yaml: |
kind: ConfigMap
apiVersion: v1
metadata:
name: flyte-data-config
namespace: {{ namespace }}
data:
config.yaml: |
config.yaml: |
storage:
type: minio
container: "my-s3-bucket"
connection:
access-key: minio
auth-type: accesskey
secret-key: miniostorage
disable-ssl: true
endpoint: http://minio.flyte.svc.cluster.local:9000
region: us-east-1
secret-key: miniostorage
type: minio
container: my-s3-bucket
enable-multicontainer: true
---
# Source: flyte/templates/admin/configmap.yaml
Expand Down
19 changes: 17 additions & 2 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{- end }}

{{- define "storage" -}}
{{- define "storage.base" -}}
storage:
{{- if eq .Values.storage.type "s3" }}
type: s3
Expand Down Expand Up @@ -196,6 +196,21 @@ storage:
{{ toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}

{{- define "storage" -}}
{{ include "storage.base" .}}
limits:
maxDownloadMBs: 10
{{- end }}
{{- end }}

{{- define "copilot.config" -}}
kind: ConfigMap
apiVersion: v1
metadata:
name: flyte-data-config
namespace: {{`{{ namespace }}`}}
data:
config.yaml: | {{ include "storage.base" . | nindent 4 }}
enable-multicontainer: true
{{- end }}
1 change: 1 addition & 0 deletions helm/templates/admin/cluster_resource_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ data:
{{- range .Values.cluster_resource_manager.templates }}
{{ .key }}.yaml: | {{ .value | nindent 4 }}
{{- end }}
zz_copilot_config.yaml: | {{ include "copilot.config" . | nindent 4 }}
{{- end }}
18 changes: 0 additions & 18 deletions helm/values-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -400,24 +400,6 @@ cluster_resource_manager:
limits.cpu: {{ projectQuotaCpu }}
limits.memory: {{ projectQuotaMemory }}

# -- Template copilot configuration
- key: ac_project_copilot_dataconfig
value: |
kind: ConfigMap
apiVersion: v1
metadata:
name: flyte-data-config
namespace: {{ namespace }}
data:
config.yaml: |
storage:
type: s3
container: <BUCKET_NAME>
connection:
auth-type: iam
region: <AWS_REGION>
enable-multicontainer: true

# -- Template for spark role
- key: ad_spark_role
value: |
Expand Down
23 changes: 0 additions & 23 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -739,29 +739,6 @@ cluster_resource_manager:
limits.cpu: {{ projectQuotaCpu }}
limits.memory: {{ projectQuotaMemory }}

# -- Template for spark role
- key: ac_project_copilot_dataconfig
value: |
kind: ConfigMap
apiVersion: v1
metadata:
name: flyte-data-config
namespace: {{ namespace }}
data:
config.yaml: |
storage:
connection:
access-key: minio
auth-type: accesskey
disable-ssl: true
endpoint: http://minio.flyte.svc.cluster.local:9000
region: us-east-1
secret-key: miniostorage
type: minio
container: my-s3-bucket
enable-multicontainer: true


# --------------------------------------------------------
# Optional Plugins
# --------------------------------------------------------
Expand Down