Skip to content

Commit

Permalink
Fixups for flyte-binary chart (flyteorg#3192)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeev B <[email protected]>

Signed-off-by: Jeev B <[email protected]>
  • Loading branch information
jeevb authored Dec 28, 2022
1 parent a0b8096 commit 5c5c9e1
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 72 deletions.
1 change: 1 addition & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
datacatalog,
flytescheduler,
flytecopilot,
flyte-binary,
]
steps:
- name: Checkout
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Build & Push Sandbox Docker Image
on:
pull_request:
paths:
# The flyte-binary image build is managed solely in this pipeline. Trigger
# the pipeline when there are any changes to the Dockerfile for this image.
# Ideally this image is built in a separate, standalone pipeline.
# TODO: Build flyte-binary image in a separate GHA pipeline
- Dockerfile
- docker/**
- charts/**
- .github/workflows/sandbox.yml
Expand Down Expand Up @@ -145,14 +150,16 @@ jobs:
else
echo ::set-output name=flyte_version::latest
fi
- name: Prepare DIND Image Names
id: dind-names
- name: Prepare Image Names
id: image-names
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository_owner }}/flyte-binary
tags: |
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
${{ inputs.version }}
type=sha,format=long,
- name: Set up QEMU
Expand Down Expand Up @@ -196,19 +203,18 @@ jobs:
cache-to: type=gha,mode=max
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
env:
DOCKER_CLI_EXPERIMENTAL: enabled
with:
context: .
platforms: linux/arm64, linux/amd64
tags: ${{ steps.dind-names.outputs.tags }}
tags: ${{ steps.image-names.outputs.tags }}
build-args: ""
file: Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name == 'release' }}
push: true
- name: Upload Artifact GitHub Action
uses: actions/upload-artifact@v2
with:
Expand All @@ -227,14 +233,16 @@ jobs:
with:
name: single-binary-image
path: docker/sandbox-bundled/images/tar
- name: Prepare DIND Image Names
id: dind-names
- name: Prepare Image Names
id: image-names
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository_owner }}/flyte-sandbox-bundled
tags: |
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
${{ inputs.version }}
type=sha,format=long,
- name: Set up QEMU
Expand All @@ -259,7 +267,7 @@ jobs:
context: docker/sandbox-bundled
allow: "security.insecure"
platforms: linux/arm64, linux/amd64
tags: ${{ steps.dind-names.outputs.tags }}
tags: ${{ steps.image-names.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
2 changes: 1 addition & 1 deletion charts/flyte-binary/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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
version: v0.1.10 # VERSION

# 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
Expand Down
9 changes: 3 additions & 6 deletions charts/flyte-binary/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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)
![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) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

Chart for basic single Flyte executable deployment

Expand Down Expand Up @@ -60,12 +60,9 @@ Chart for basic single Flyte executable deployment
| deployment.extraVolumes | list | `[]` | |
| deployment.genAdminAuthSecret.args | list | `[]` | |
| deployment.genAdminAuthSecret.command | list | `[]` | |
| deployment.genAdminAuthSecret.image.pullPolicy | string | `"IfNotPresent"` | |
| deployment.genAdminAuthSecret.image.repository | string | `"cr.flyte.org/flyteorg/flyteadmin"` | |
| deployment.genAdminAuthSecret.image.tag | string | `"v1.1.57"` | |
| deployment.image.pullPolicy | string | `"IfNotPresent"` | |
| deployment.image.repository | string | `"ghcr.io/flyteorg/flyte-sandbox"` | |
| deployment.image.tag | string | `"flytebinary_1007"` | |
| deployment.image.repository | string | `"ghcr.io/flyteorg/flyte-binary"` | |
| deployment.image.tag | string | `"latest"` | |
| deployment.initContainers | list | `[]` | |
| deployment.labels | object | `{}` | |
| deployment.lifecycleHooks | object | `{}` | |
Expand Down
20 changes: 10 additions & 10 deletions charts/flyte-binary/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ Get the Flyte logging configuration.
*/}}
{{- define "flyte-binary.configuration.logging.plugins" -}}
{{- with .Values.configuration.logging.plugins -}}
{{- if .kubernetes.enabled -}}
kubernetes-enabled: true
kubernetes-enabled: {{ .kubernetes.enabled }}
{{- if .kubernetes.enabled }}
kubernetes-template-uri: {{ required "Template URI required for Kubernetes logging plugin" .kubernetes.templateUri }}
{{- end -}}
{{- if .cloudwatch.enabled -}}
cloudwatch-enabled: true
{{- end }}
cloudwatch-enabled: {{ .cloudwatch.enabled }}
{{- if .cloudwatch.enabled }}
cloudwatch-template-uri: {{ required "Template URI required for CloudWatch logging plugin" .cloudwatch.templateUri }}
{{- end -}}
{{- if .stackdriver.enabled -}}
stackdriver-enabled: true
{{- end }}
stackdriver-enabled: {{ .stackdriver.enabled }}
{{- if .stackdriver.enabled }}
stackdriver-template-uri: {{ required "Template URI required for stackdriver logging plugin" .stackdriver.templateUri }}
{{- end -}}
{{- if .custom -}}
{{- end }}
{{- if .custom }}
templates: {{- toYaml .custom | nindent 2 -}}
{{- end -}}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions charts/flyte-binary/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ spec:
{{- end }}
{{- if .Values.configuration.auth.enabled }}
- name: gen-admin-auth-secret
{{- with .Values.deployment.genAdminAuthSecret.image }}
{{- with .Values.deployment.image }}
image: {{ printf "%s:%s" .repository .tag | quote }}
imagePullPolicy: {{ .pullPolicy | quote }}
{{- end }}
Expand All @@ -113,9 +113,9 @@ spec:
{{- tpl ( .Values.deployment.genAdminAuthSecret.args | toYaml ) . | nindent 12 }}
{{- else }}
- |
flyteadmin --config=/etc/flyte/config.d/*.yaml \
flyte --config=/etc/flyte/config.d/*.yaml \
secrets init --localPath /tmp/admin-auth-secret
flyteadmin --config=/etc/flyte/config.d/*.yaml \
flyte --config=/etc/flyte/config.d/*.yaml \
secrets create \
--name {{ include "flyte-binary.configuration.auth.adminAuthSecretName" . }} \
--fromPath /tmp/admin-auth-secret
Expand Down
12 changes: 2 additions & 10 deletions charts/flyte-binary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ deployment:
# image Configure image to use for Flyte
image:
# repository Flyte image repository
repository: ghcr.io/flyteorg/flyte-sandbox
repository: ghcr.io/flyteorg/flyte-binary # FLYTE_IMAGE
# tag Flyte image tag
tag: flytebinary_1007
tag: latest # FLYTE_TAG
# pullPolicy Flyte image pull policy
pullPolicy: IfNotPresent
# extraEnvVars Array with extra environment variables to add to Flyte
Expand Down Expand Up @@ -172,14 +172,6 @@ deployment:
args: []
# genAdminAuthSecret Configure init container to generate secrets for internal use
genAdminAuthSecret:
# image Configure image to use for gen-admin-auth-secret init container
image:
# repository Init container image repository
repository: cr.flyte.org/flyteorg/flyteadmin
# tag Init container image tag
tag: v1.1.57
# pullPolicy Init container image pull policy
pullPolicy: IfNotPresent
# command Override default init container command
command: []
# args Override default init container args
Expand Down
6 changes: 3 additions & 3 deletions charts/flyte-sandbox/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 2.2.2
- name: flyte-binary
repository: file://../flyte-binary
version: 0.1.0
version: v0.1.10
- name: kubernetes-dashboard
repository: https://kubernetes.github.io/dashboard/
version: 5.11.0
Expand All @@ -14,5 +14,5 @@ dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 12.1.0
digest: sha256:c649b0ca244081c66ef17865bf2e63429eb3c9c080b61748278a0411cda780e2
generated: "2022-12-22T15:09:50.02147-08:00"
digest: sha256:398b480f861351e28080997e6fc1058519e33171494e52beae6a7acf9daa54d6
generated: "2022-12-28T10:53:15.75989-08:00"
2 changes: 1 addition & 1 deletion charts/flyte-sandbox/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
repository: https://helm.twun.io/
condition: docker-registry.enabled
- name: flyte-binary
version: 0.1.0
version: v0.1.10
repository: file://../flyte-binary
condition: flyte-binary.enabled
- name: kubernetes-dashboard
Expand Down
2 changes: 1 addition & 1 deletion charts/flyte-sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A Helm chart for the Flyte local sandbox

| Repository | Name | Version |
|------------|------|---------|
| file://../flyte-binary | flyte-binary | 0.1.0 |
| file://../flyte-binary | flyte-binary | v0.1.10 |
| https://charts.bitnami.com/bitnami | minio | 11.10.13 |
| https://charts.bitnami.com/bitnami | postgresql | 12.1.0 |
| https://helm.twun.io/ | docker-registry | 2.2.2 |
Expand Down
Binary file removed charts/flyte-sandbox/charts/flyte-binary-0.1.0.tgz
Binary file not shown.
Binary file not shown.
30 changes: 17 additions & 13 deletions deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: flyte-flyte-binary
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand All @@ -20,7 +20,7 @@ metadata:
name: flyte-flyte-binary-cluster-resource-templates
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand All @@ -40,7 +40,7 @@ metadata:
name: flyte-flyte-binary-config
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand Down Expand Up @@ -81,11 +81,15 @@ data:
- container_array: K8S-ARRAY
plugins:
logs:
kubernetes-enabled: false
cloudwatch-enabled: false
stackdriver-enabled: false
k8s-array:
logs:
config:
kubernetes-enabled: false
cloudwatch-enabled: false
stackdriver-enabled: false
002-database.yaml: |
database:
postgres:
Expand Down Expand Up @@ -113,7 +117,7 @@ metadata:
name: flyte-flyte-binary-cluster-role
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand Down Expand Up @@ -193,7 +197,7 @@ metadata:
name: flyte-flyte-binary-cluster-role-binding
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand All @@ -215,7 +219,7 @@ metadata:
name: flyte-flyte-binary
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand Down Expand Up @@ -243,7 +247,7 @@ metadata:
name: flyte-flyte-binary-webhook
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand All @@ -266,7 +270,7 @@ metadata:
name: flyte-flyte-binary
namespace: "flyte"
labels:
helm.sh/chart: flyte-binary-0.1.0
helm.sh/chart: flyte-binary-v0.1.10
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
app.kubernetes.io/version: "1.16.0"
Expand All @@ -286,8 +290,8 @@ spec:
app.kubernetes.io/name: flyte-binary
app.kubernetes.io/instance: flyte
annotations:
checksum/configuration: e353e8eeef9f7c15de463039962283149249e68463b63e530683f183d4afe5e6
checksum/cluster-resource-templates: 107623522504d692aadc02559747bc8dd8e66095b46f0c17d6ebd0d8957cb089
checksum/configuration: db5acb3814626b8953a925e83ed5b99dc9379794cc57eee9db0f5d36e50532b8
checksum/cluster-resource-templates: 7dfa59f3d447e9c099b8f8ffad3af466fecbc9cf9f8c97295d9634254a55d4ae
spec:
serviceAccountName: flyte-flyte-binary
initContainers:
Expand All @@ -314,7 +318,7 @@ spec:
cpu: 1
containers:
- name: flyte
image: "ghcr.io/flyteorg/flyte-sandbox:flytebinary_1007"
image: "ghcr.io/flyteorg/flyte-binary:latest"
imagePullPolicy: "IfNotPresent"
args:
- start
Expand Down
Loading

0 comments on commit 5c5c9e1

Please sign in to comment.