Skip to content

Commit

Permalink
Updated flyte-sandbox-bundled helm chart (flyteorg#3066)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeev B <[email protected]>
  • Loading branch information
jeevb authored Nov 15, 2022
1 parent e90c2a3 commit 9f9e5c2
Show file tree
Hide file tree
Showing 54 changed files with 3,116 additions and 1,016 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ jobs:
registry: ghcr.io
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
- name: Setup destination directories for image tarballs
run: |
mkdir -p docker/sandbox-bundled/images/tar/{arm64,amd64}
- name: Export ARM64 Image
uses: docker/build-push-action@v3
env:
Expand All @@ -178,7 +181,7 @@ jobs:
file: Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/flyte-arm64.tar
outputs: type=docker,dest=docker/sandbox-bundled/images/tar/arm64/flyte-binary.tar
- name: Export AMD64 Image
uses: docker/build-push-action@v3
env:
Expand All @@ -191,7 +194,7 @@ jobs:
file: Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/flyte-amd64.tar
outputs: type=docker,dest=docker/sandbox-bundled/images/tar/amd64/flyte-binary.tar
- name: Build and push Image
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v3
Expand All @@ -210,8 +213,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: single-binary-image
path: /tmp/flyte-*.tar

path: docker/sandbox-bundled/images/tar

trigger-sandbox-bundled-build:
runs-on: ubuntu-latest
Expand All @@ -224,7 +226,7 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: single-binary-image
path: /tmp/
path: docker/sandbox-bundled/images/tar
- name: Prepare DIND Image Names
id: dind-names
uses: docker/metadata-action@v3
Expand All @@ -249,9 +251,6 @@ jobs:
registry: ghcr.io
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
- name: Prepare Sandbox images for single binary
run: |
make -C docker/sandbox-bundled images-ci
- name: Build and push Image
uses: docker/build-push-action@v3
env:
Expand All @@ -261,7 +260,6 @@ jobs:
allow: "security.insecure"
platforms: linux/arm64, linux/amd64
tags: ${{ steps.dind-names.outputs.tags }}
file: docker/sandbox-bundled/images/dockerfiles/k3s/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
1 change: 1 addition & 0 deletions charts/flyte-binary/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gen
23 changes: 23 additions & 0 deletions charts/flyte-binary/.helmignore
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/
16 changes: 16 additions & 0 deletions charts/flyte-binary/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: flyte-binary
description: Chart for basic single Flyte executable deployment

type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
17 changes: 17 additions & 0 deletions charts/flyte-binary/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

GENERATED_FILE="gen/binary_manifest.yaml"
DEMO_GENERATED_FILE="gen/demomanifest.yaml"

cleanhelm:
@[ -f $(GENERATED_FILE) ] && rm $(GENERATED_FILE) || true

cleandemo:
@[ -f $(DEMO_GENERATED_FILE) ] && rm $(DEMO_GENERATED_FILE) || true

.PHONY: helm
helm: cleanhelm
helm template binary-tst-deploy ./ -n flyte --dependency-update --debug --create-namespace -a rbac.authorization.k8s.io/v1 -a networking.k8s.io/v1/Ingress -a apiextensions.k8s.io/v1/CustomResourceDefinition > $(GENERATED_FILE)

.PHONY: demohelm
demohelm: cleandemo
helm template flytedemo ./ -f flytectldemo.yaml -n flyte --dependency-update --debug --create-namespace -a rbac.authorization.k8s.io/v1 -a networking.k8s.io/v1/Ingress -a apiextensions.k8s.io/v1/CustomResourceDefinition > $(DEMO_GENERATED_FILE)
30 changes: 30 additions & 0 deletions charts/flyte-binary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# flyte-binary

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

Chart for basic single Flyte executable deployment

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| database.dbname | string | `"flyteadmin"` | |
| database.host | string | `"127.0.0.1"` | |
| database.password | string | `""` | |
| database.port | int | `5432` | |
| database.username | string | `"postgres"` | |
| images.flyte.pullPolicy | string | `"IfNotPresent"` | |
| images.flyte.repository | string | `"ghcr.io/flyteorg/flyte-sandbox"` | |
| images.flyte.tag | string | `"flytebinary_1007"` | |
| images.postgres.pullPolicy | string | `"IfNotPresent"` | |
| images.postgres.repository | string | `"postgres"` | |
| images.postgres.tag | string | `"15-alpine"` | |
| logger.level | int | `1` | |
| networking.host | bool | `true` | |
| paths.externalFlyteConfig | string | `""` | |
| proxy.enabled | bool | `false` | |
| storage.metadataContainer | string | `"my-s3-bucket"` | |
| storage.region | string | `"my-region"` | |
| storage.type | string | `"minio"` | |
| storage.userDataContainer | string | `"my-s3-bucket"` | |

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
propeller:
rawoutput-prefix: "s3://my-s3-bucket/data/"
rawoutput-prefix: "s3://{{ .Values.storage.userDataContainer }}/data/"
create-flyteworkflow-crd: true
webhook:
certDir: /var/run/flyte/certs
Expand All @@ -15,27 +15,28 @@ tasks:
- container_array: K8S-ARRAY
database:
postgres:
port: 30001
username: postgres
host: 127.0.0.1
dbname: flyteadmin
port: {{ .Values.database.port }}
username: {{ .Values.database.username }}
host: {{ .Values.database.host }}
dbname: {{ .Values.database.dbname }}
options: "sslmode=disable"
{{- if .Values.database.password }}
{{- include "flyte-binary.database.secretpathconfig" . | nindent 4 }}
{{- end }}
storage:
type: minio
type: {{ .Values.storage.type }}
connection:
region: my-region
access-key: minio
auth-type: accesskey
secret-key: miniostorage
disable-ssl: true
endpoint: "http://localhost:30002"
region: {{ .Values.storage.region }}
{{- if eq .Values.storage.type "minio" }}
{{- include "flyte-binary.minioExtraConnectionSettings" . | nindent 4 }}
{{- end }}
cache:
max_size_mbs: 10
target_gc_percent: 100
container: "my-s3-bucket"
container: "{{ .Values.storage.metadataContainer }}"
logger:
show-source: true
level: 1
level: {{ .Values.logger.level }}
admin:
endpoint: localhost:8089
insecure: true
Expand All @@ -46,52 +47,29 @@ plugins:
default-env-vars:
- AWS_METADATA_SERVICE_TIMEOUT: 5
- AWS_METADATA_SERVICE_NUM_ATTEMPTS: 20
- FLYTE_AWS_ENDPOINT: "http://minio.minio:9000"
- FLYTE_AWS_ACCESS_KEY_ID: minio
- FLYTE_AWS_SECRET_ACCESS_KEY: miniostorage
{{- if eq .Values.storage.type "minio" }}
{{- include "flyte-binary.minioExtraEnvVars" . | nindent 6 }}
{{- end }}
# Logging configuration
# Escape Helm templating because admin will template these later
logs:
kubernetes-enabled: true
kubernetes-template-uri:
"http://localhost:30080/kubernetes-dashboard/#/log/{{ .namespace }}/{{ .podName }}/pod?namespace={{ .namespace }}"
{{`"http://localhost:30080/kubernetes-dashboard/#/log/{{ .namespace }}/{{ .podName }}/pod?namespace={{ .namespace }}"`}}
k8s-array:
logs:
config:
kubernetes-enabled: true
kubernetes-template-uri:
"http://localhost:30080/kubernetes-dashboard/#/log/{{ .namespace }}/{{ .podName }}/pod?namespace={{ .namespace }}"

{{`"http://localhost:30080/kubernetes-dashboard/#/log/{{ .namespace }}/{{ .podName }}/pod?namespace={{ .namespace }}"`}}
cluster_resources:
refreshInterval: 5m
templatePath: "/etc/flyte/cluster-resource-templates"
# -- Starts the cluster resource manager in standalone mode with requisite auth credentials to call flyteadmin service endpoints
standaloneDeployment: false
customData:
- production:
- projectQuotaCpu:
value: "5"
- projectQuotaMemory:
value: "4000Mi"
- staging:
- projectQuotaCpu:
value: "2"
- projectQuotaMemory:
value: "3000Mi"
- development:
- projectQuotaCpu:
value: "4"
- projectQuotaMemory:
value: "3000Mi"
refresh: 5m
task_resources:
defaults:
cpu: 500m
memory: 500Mi
storage: 500Mi
catalog-cache:
endpoint: localhost:8081
insecure: true
type: datacatalog
namespace_mapping:
template: "{{ project }}-{{ domain }}"
template: {{`"{{ project }}-{{ domain }}"`}}
4 changes: 4 additions & 0 deletions charts/flyte-binary/cluster-resource-templates/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ namespace }}
16 changes: 16 additions & 0 deletions charts/flyte-binary/eks-override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
networking:
host: false

storage:
metadataContainer: flyte-single-binary-test
userDataContainer: flyte-single-binary-test/userdata
type: s3
region: us-east-2

database:
username: postgres
host: trinity1.cmp0wwpbez1r.us-east-2.rds.amazonaws.com
password: awesomesauce

proxy:
enabled: true
9 changes: 9 additions & 0 deletions charts/flyte-binary/flytectldemo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
image:
fqn: "flyte"

database:
port: 30001

paths:
# Specifying because this is mounted in by flytectl.
externalFlyteConfig: "/srv/flyte/flyte.yaml"
6 changes: 6 additions & 0 deletions charts/flyte-binary/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


Your Flyte binary installation should be run with this config:
```yaml
{{ tpl (.Files.Get "_flyte_config.yaml") $ }}
```
Loading

0 comments on commit 9f9e5c2

Please sign in to comment.