diff --git a/.github/workflows/flyte-binary-v2.yml b/.github/workflows/flyte-binary-v2.yml index c1fba4a4d52..bb10f4f48d4 100644 --- a/.github/workflows/flyte-binary-v2.yml +++ b/.github/workflows/flyte-binary-v2.yml @@ -24,13 +24,13 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - working-directory: docker/sandbox-bundled/bootstrap + working-directory: docker/demo-bundled/bootstrap - name: Check formatting - working-directory: docker/sandbox-bundled/bootstrap + working-directory: docker/demo-bundled/bootstrap run: | make check-fmt - name: Test - working-directory: docker/sandbox-bundled/bootstrap + working-directory: docker/demo-bundled/bootstrap run: | make test @@ -70,7 +70,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Setup destination directories for image tarballs run: | - mkdir -p docker/sandbox-bundled/images/tar/{arm64,amd64} + mkdir -p docker/demo-bundled/images/tar/{arm64,amd64} - name: Export ARM64 Image uses: docker/build-push-action@v6 with: @@ -81,7 +81,7 @@ jobs: FLYTECONSOLE_VERSION=${{ env.FLYTECONSOLE_VERSION }} FLYTE_VERSION=${{ env.FLYTE_VERSION }} file: Dockerfile - outputs: type=docker,dest=docker/sandbox-bundled/images/tar/arm64/flyte-binary.tar + outputs: type=docker,dest=docker/demo-bundled/images/tar/arm64/flyte-binary.tar - name: Export AMD64 Image uses: docker/build-push-action@v6 with: @@ -92,12 +92,12 @@ jobs: FLYTECONSOLE_VERSION=${{ env.FLYTECONSOLE_VERSION }} FLYTE_VERSION=${{ env.FLYTE_VERSION }} file: Dockerfile - outputs: type=docker,dest=docker/sandbox-bundled/images/tar/amd64/flyte-binary.tar + outputs: type=docker,dest=docker/demo-bundled/images/tar/amd64/flyte-binary.tar - name: Upload single binary image uses: actions/upload-artifact@v4 with: name: single-binary-image - path: docker/sandbox-bundled/images/tar + path: docker/demo-bundled/images/tar - name: Login to GitHub Container Registry if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} uses: docker/login-action@v2 @@ -118,7 +118,7 @@ jobs: file: Dockerfile push: true - build-and-push-sandbox-bundled-image: + build-and-push-demo-bundled-image: runs-on: ubuntu-latest needs: [build-and-push-single-binary-image] steps: @@ -127,7 +127,7 @@ jobs: - uses: actions/download-artifact@v4 with: name: single-binary-image - path: docker/sandbox-bundled/images/tar + path: docker/demo-bundled/images/tar - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx @@ -138,12 +138,15 @@ jobs: - name: Set version id: set_version run: | - echo "FLYTE_SANDBOX_VERSION=${{ github.sha }}" >> $GITHUB_ENV + echo "FLYTE_DEMO_VERSION=${{ github.sha }}" >> $GITHUB_ENV - name: Prepare Image Names id: image-names uses: docker/metadata-action@v3 with: + # Push to both flyte-demo and flyte-sandbox-v2 (legacy name) + # so existing users pulling the old image continue to work. images: | + ghcr.io/${{ github.repository_owner }}/flyte-demo ghcr.io/${{ github.repository_owner }}/flyte-sandbox-v2 tags: | type=raw,value=nightly,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/v2' }} @@ -156,18 +159,18 @@ jobs: password: "${{ secrets.FLYTE_BOT_PAT }}" - name: Save console image tarballs run: | - mkdir -p docker/sandbox-bundled/images/tar/amd64 docker/sandbox-bundled/images/tar/arm64 + mkdir -p docker/demo-bundled/images/tar/amd64 docker/demo-bundled/images/tar/arm64 docker pull --platform linux/amd64 ghcr.io/flyteorg/flyte-client-v2:latest - docker save ghcr.io/flyteorg/flyte-client-v2:latest -o docker/sandbox-bundled/images/tar/amd64/flyte-client-v2.tar + docker save ghcr.io/flyteorg/flyte-client-v2:latest -o docker/demo-bundled/images/tar/amd64/flyte-client-v2.tar docker pull --platform linux/arm64 ghcr.io/flyteorg/flyte-client-v2:latest - docker save ghcr.io/flyteorg/flyte-client-v2:latest -o docker/sandbox-bundled/images/tar/arm64/flyte-client-v2.tar + docker save ghcr.io/flyteorg/flyte-client-v2:latest -o docker/demo-bundled/images/tar/arm64/flyte-client-v2.tar - name: Build and push multi-arch image if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} uses: docker/build-push-action@v6 with: - context: docker/sandbox-bundled + context: docker/demo-bundled allow: "security.insecure" platforms: linux/arm64, linux/amd64 tags: ${{ steps.image-names.outputs.tags }} - build-args: "FLYTE_SANDBOX_VERSION=${{ env.FLYTE_SANDBOX_VERSION }}" + build-args: "FLYTE_DEMO_VERSION=${{ env.FLYTE_DEMO_VERSION }}" push: true diff --git a/.gitignore b/.gitignore index e1f0f404e90..fcc4f70a57d 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ dist/ dist *.db vendor/ -/docker/sandbox-bundled/images/tar +/docker/demo-bundled/images/tar **/bin/ docs/_tags/ docs/api/flytectl diff --git a/Makefile b/Makefile index 5009bf9b8a3..18eba8c1e09 100644 --- a/Makefile +++ b/Makefile @@ -36,17 +36,33 @@ build: verify ## Build all Go service binaries # ============================================================================= .PHONY: sandbox-build -sandbox-build: ## Build and start the flyte sandbox (docker/sandbox-bundled) - $(MAKE) -C docker/sandbox-bundled build +sandbox-build: ## Build and start the flyte sandbox (docker/demo-bundled) + $(MAKE) -C docker/demo-bundled build # Run in dev mode with extra arg FLYTE_DEV=True .PHONY: sandbox-run sandbox-run: ## Start the flyte sandbox without rebuilding the image - $(MAKE) -C docker/sandbox-bundled start + $(MAKE) -C docker/demo-bundled start .PHONY: sandbox-stop sandbox-stop: ## Stop the flyte sandbox - $(MAKE) -C docker/sandbox-bundled stop + $(MAKE) -C docker/demo-bundled stop + +# ============================================================================= +# Demo Commands +# ============================================================================= + +.PHONY: demo-build +demo-build: ## Build and start the flyte demo cluster (docker/demo-bundled) + $(MAKE) -C docker/demo-bundled build + +.PHONY: demo-run +demo-run: ## Start the flyte demo cluster without rebuilding the image + $(MAKE) -C docker/demo-bundled start + +.PHONY: demo-stop +demo-stop: ## Stop the flyte demo cluster + $(MAKE) -C docker/demo-bundled stop .PHONY: help help: ## Show this help message diff --git a/charts/flyte-binary/values.yaml b/charts/flyte-binary/values.yaml index 6efb7161800..93782f4e311 100644 --- a/charts/flyte-binary/values.yaml +++ b/charts/flyte-binary/values.yaml @@ -59,7 +59,7 @@ flyte-core-components: secret: kubernetes: namespace: "flyte" - clusterName: "flyte-sandbox" + clusterName: "flyte-demo" kubeconfig: "" qps: 100 burst: 200 diff --git a/charts/flyte-sandbox/.helmignore b/charts/flyte-demo/.helmignore similarity index 100% rename from charts/flyte-sandbox/.helmignore rename to charts/flyte-demo/.helmignore diff --git a/charts/flyte-sandbox/Chart.lock b/charts/flyte-demo/Chart.lock similarity index 100% rename from charts/flyte-sandbox/Chart.lock rename to charts/flyte-demo/Chart.lock diff --git a/charts/flyte-sandbox/Chart.yaml b/charts/flyte-demo/Chart.yaml similarity index 88% rename from charts/flyte-sandbox/Chart.yaml rename to charts/flyte-demo/Chart.yaml index 5480af55a67..5a3679e74aa 100644 --- a/charts/flyte-sandbox/Chart.yaml +++ b/charts/flyte-demo/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: flyte-sandbox -description: A Helm chart for the Flyte local sandbox +name: flyte-demo +description: A Helm chart for the Flyte local demo cluster # A chart can be either an 'application' or a 'library' chart. # @@ -36,7 +36,3 @@ dependencies: version: 12.6.7 repository: https://charts.bitnami.com/bitnami condition: minio.enabled - - name: postgresql - version: 12.8.1 - repository: https://charts.bitnami.com/bitnami - condition: postgresql.enabled diff --git a/charts/flyte-sandbox/README.md b/charts/flyte-demo/README.md similarity index 69% rename from charts/flyte-sandbox/README.md rename to charts/flyte-demo/README.md index 2719ed739fa..5d9fef8c1cc 100644 --- a/charts/flyte-sandbox/README.md +++ b/charts/flyte-demo/README.md @@ -1,16 +1,15 @@ -# flyte-sandbox +# flyte-demo ![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.1](https://img.shields.io/badge/AppVersion-1.16.1-informational?style=flat-square) -A Helm chart for the Flyte local sandbox +A Helm chart for the Flyte local demo cluster ## Requirements | Repository | Name | Version | |------------|------|---------| -| file://../flyte-binary | flyte-binary | v0.1.10 | +| file://../flyte-binary | flyte-binary | v0.2.0 | | https://charts.bitnami.com/bitnami | minio | 12.6.7 | -| https://charts.bitnami.com/bitnami | postgresql | 12.8.1 | | https://twuni.github.io/docker-registry.helm | docker-registry | 2.2.2 | ## Values @@ -18,19 +17,27 @@ A Helm chart for the Flyte local sandbox | Key | Type | Default | Description | |-----|------|---------|-------------| | docker-registry.enabled | bool | `true` | | +| docker-registry.fullnameOverride | string | `"docker-registry"` | | | docker-registry.image.pullPolicy | string | `"Never"` | | | docker-registry.image.tag | string | `"sandbox"` | | | docker-registry.persistence.enabled | bool | `false` | | +| docker-registry.secrets.haSharedSecret | string | `"flytesandboxsecret"` | | | docker-registry.service.nodePort | int | `30000` | | | docker-registry.service.type | string | `"NodePort"` | | -| flyte-binary.clusterResourceTemplates.inlineConfigMap | string | `"{{ include \"flyte-sandbox.clusterResourceTemplates.inlineConfigMap\" . }}"` | | -| flyte-binary.configuration.database.host | string | `"{{ printf \"%s-postgresql\" .Release.Name | trunc 63 | trimSuffix \"-\" }}"` | | +| flyte-binary.clusterResourceTemplates.inlineConfigMap | string | `"{{ include \"flyte-demo.clusterResourceTemplates.inlineConfigMap\" . }}"` | | +| flyte-binary.configuration.database.host | string | `"postgresql"` | | | flyte-binary.configuration.database.password | string | `"postgres"` | | -| flyte-binary.configuration.inline.plugins.k8s.default-env-vars[0].FLYTE_AWS_ENDPOINT | string | `"http://{{ printf \"%s-minio\" .Release.Name | trunc 63 | trimSuffix \"-\" }}.{{ .Release.Namespace }}:9000"` | | +| flyte-binary.configuration.inline.plugins.k8s.default-env-vars[0].FLYTE_AWS_ENDPOINT | string | `"http://minio.{{ .Release.Namespace }}:9000"` | | | flyte-binary.configuration.inline.plugins.k8s.default-env-vars[1].FLYTE_AWS_ACCESS_KEY_ID | string | `"minio"` | | | flyte-binary.configuration.inline.plugins.k8s.default-env-vars[2].FLYTE_AWS_SECRET_ACCESS_KEY | string | `"miniostorage"` | | -| flyte-binary.configuration.inline.plugins.k8s.default-env-vars[3].FLYTE_PLATFORM_URL | string | `"{{ printf \"%s-http\" .Release.Name }}.{{ .Release.Namespace }}:8090"` | | -| flyte-binary.configuration.inline.plugins.k8s.default-env-vars[4].FLYTE_PLATFORM_INSECURE | bool | `true` | | +| flyte-binary.configuration.inline.plugins.k8s.default-env-vars[3]._U_EP_OVERRIDE | string | `"flyte-binary-http.{{ .Release.Namespace }}:8090"` | | +| flyte-binary.configuration.inline.plugins.k8s.default-env-vars[4]._U_INSECURE | string | `"true"` | | +| flyte-binary.configuration.inline.plugins.k8s.default-env-vars[5]._U_USE_ACTIONS | string | `"1"` | | +| flyte-binary.configuration.inline.runs.database.postgres.dbName | string | `"runs"` | | +| flyte-binary.configuration.inline.runs.database.postgres.host | string | `"postgresql.{{ .Release.Namespace }}"` | | +| flyte-binary.configuration.inline.runs.database.postgres.password | string | `"postgres"` | | +| flyte-binary.configuration.inline.runs.database.postgres.port | int | `5432` | | +| flyte-binary.configuration.inline.runs.database.postgres.user | string | `"postgres"` | | | flyte-binary.configuration.inline.storage.signedURL.stowConfigOverride.endpoint | string | `"http://localhost:30002"` | | | flyte-binary.configuration.inline.task_resources.defaults.cpu | string | `"500m"` | | | flyte-binary.configuration.inline.task_resources.defaults.ephemeralStorage | int | `0` | | @@ -40,39 +47,48 @@ A Helm chart for the Flyte local sandbox | flyte-binary.configuration.inline.task_resources.limits.ephemeralStorage | int | `0` | | | flyte-binary.configuration.inline.task_resources.limits.gpu | int | `0` | | | flyte-binary.configuration.inline.task_resources.limits.memory | int | `0` | | -| flyte-binary.configuration.inlineConfigMap | string | `"{{ include \"flyte-sandbox.configuration.inlineConfigMap\" . }}"` | | +| flyte-binary.configuration.inlineConfigMap | string | `"{{ include \"flyte-demo.configuration.inlineConfigMap\" . }}"` | | | flyte-binary.configuration.logging.level | int | `5` | | -| flyte-binary.configuration.logging.plugins.kubernetes.enabled | bool | `true` | | -| flyte-binary.configuration.storage.metadataContainer | string | `"my-s3-bucket"` | | +| flyte-binary.configuration.storage.metadataContainer | string | `"flyte-data"` | | | flyte-binary.configuration.storage.provider | string | `"s3"` | | | flyte-binary.configuration.storage.providerConfig.s3.accessKey | string | `"minio"` | | | flyte-binary.configuration.storage.providerConfig.s3.authType | string | `"accesskey"` | | | flyte-binary.configuration.storage.providerConfig.s3.disableSSL | bool | `true` | | -| flyte-binary.configuration.storage.providerConfig.s3.endpoint | string | `"http://{{ printf \"%s-minio\" .Release.Name | trunc 63 | trimSuffix \"-\" }}.{{ .Release.Namespace }}:9000"` | | +| flyte-binary.configuration.storage.providerConfig.s3.endpoint | string | `"http://minio.{{ .Release.Namespace }}:9000"` | | | flyte-binary.configuration.storage.providerConfig.s3.secretKey | string | `"miniostorage"` | | | flyte-binary.configuration.storage.providerConfig.s3.v2Signing | bool | `true` | | -| flyte-binary.configuration.storage.userDataContainer | string | `"my-s3-bucket"` | | +| flyte-binary.configuration.storage.userDataContainer | string | `"flyte-data"` | | | flyte-binary.deployment.image.pullPolicy | string | `"Never"` | | -| flyte-binary.deployment.image.repository | string | `"flyte-binary"` | | +| flyte-binary.deployment.image.repository | string | `"flyte-binary-v2"` | | | flyte-binary.deployment.image.tag | string | `"sandbox"` | | +| flyte-binary.deployment.livenessProbe.httpGet.path | string | `"/healthz"` | | +| flyte-binary.deployment.livenessProbe.httpGet.port | string | `"http"` | | +| flyte-binary.deployment.readinessProbe.httpGet.path | string | `"/readyz"` | | +| flyte-binary.deployment.readinessProbe.httpGet.port | string | `"http"` | | +| flyte-binary.deployment.readinessProbe.periodSeconds | int | `1` | | +| flyte-binary.deployment.startupProbe.failureThreshold | int | `30` | | +| flyte-binary.deployment.startupProbe.httpGet.path | string | `"/healthz"` | | +| flyte-binary.deployment.startupProbe.httpGet.port | string | `"http"` | | +| flyte-binary.deployment.startupProbe.periodSeconds | int | `1` | | | flyte-binary.deployment.waitForDB.image.pullPolicy | string | `"Never"` | | | flyte-binary.deployment.waitForDB.image.repository | string | `"bitnami/postgresql"` | | | flyte-binary.deployment.waitForDB.image.tag | string | `"sandbox"` | | | flyte-binary.enabled | bool | `true` | | -| flyte-binary.nameOverride | string | `"flyte-sandbox"` | | +| flyte-binary.fullnameOverride | string | `"flyte-binary"` | | | flyte-binary.rbac.extraRules[0].apiGroups[0] | string | `"*"` | | | flyte-binary.rbac.extraRules[0].resources[0] | string | `"*"` | | | flyte-binary.rbac.extraRules[0].verbs[0] | string | `"*"` | | | minio.auth.rootPassword | string | `"miniostorage"` | | | minio.auth.rootUser | string | `"minio"` | | -| minio.defaultBuckets | string | `"my-s3-bucket"` | | +| minio.defaultBuckets | string | `"flyte-data"` | | | minio.enabled | bool | `true` | | | minio.extraEnvVars[0].name | string | `"MINIO_BROWSER_REDIRECT_URL"` | | | minio.extraEnvVars[0].value | string | `"http://localhost:30080/minio"` | | +| minio.fullnameOverride | string | `"minio"` | | | minio.image.pullPolicy | string | `"Never"` | | | minio.image.tag | string | `"sandbox"` | | | minio.persistence.enabled | bool | `true` | | -| minio.persistence.existingClaim | string | `"{{ include \"flyte-sandbox.persistence.minioVolumeName\" . }}"` | | +| minio.persistence.existingClaim | string | `"{{ include \"flyte-demo.persistence.minioVolumeName\" . }}"` | | | minio.service.nodePorts.api | int | `30002` | | | minio.service.type | string | `"NodePort"` | | | minio.volumePermissions.enabled | bool | `true` | | @@ -80,10 +96,11 @@ A Helm chart for the Flyte local sandbox | minio.volumePermissions.image.tag | string | `"sandbox"` | | | postgresql.auth.postgresPassword | string | `"postgres"` | | | postgresql.enabled | bool | `true` | | +| postgresql.fullnameOverride | string | `"postgresql"` | | | postgresql.image.pullPolicy | string | `"Never"` | | | postgresql.image.tag | string | `"sandbox"` | | | postgresql.primary.persistence.enabled | bool | `true` | | -| postgresql.primary.persistence.existingClaim | string | `"{{ include \"flyte-sandbox.persistence.dbVolumeName\" . }}"` | | +| postgresql.primary.persistence.existingClaim | string | `"{{ include \"flyte-demo.persistence.dbVolumeName\" . }}"` | | | postgresql.primary.service.nodePorts.postgresql | int | `30001` | | | postgresql.primary.service.type | string | `"NodePort"` | | | postgresql.shmVolume.enabled | bool | `false` | | @@ -91,7 +108,7 @@ A Helm chart for the Flyte local sandbox | postgresql.volumePermissions.image.pullPolicy | string | `"Never"` | | | postgresql.volumePermissions.image.tag | string | `"sandbox"` | | | sandbox.console.enabled | bool | `true` | | -| sandbox.console.image.pullPolicy | string | `"IfNotPresent"` | | +| sandbox.console.image.pullPolicy | string | `"Never"` | | | sandbox.console.image.repository | string | `"ghcr.io/flyteorg/flyte-client-v2"` | | | sandbox.console.image.tag | string | `"latest"` | | | sandbox.dev | bool | `false` | | diff --git a/charts/flyte-sandbox/templates/NOTES.txt b/charts/flyte-demo/templates/NOTES.txt similarity index 100% rename from charts/flyte-sandbox/templates/NOTES.txt rename to charts/flyte-demo/templates/NOTES.txt diff --git a/charts/flyte-sandbox/templates/_helpers.tpl b/charts/flyte-demo/templates/_helpers.tpl similarity index 70% rename from charts/flyte-sandbox/templates/_helpers.tpl rename to charts/flyte-demo/templates/_helpers.tpl index aeb9286d1f9..1305770cc24 100644 --- a/charts/flyte-sandbox/templates/_helpers.tpl +++ b/charts/flyte-demo/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "flyte-sandbox.name" -}} +{{- define "flyte-demo.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -10,7 +10,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "flyte-sandbox.fullname" -}} +{{- define "flyte-demo.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "flyte-sandbox.chart" -}} +{{- define "flyte-demo.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "flyte-sandbox.labels" -}} -helm.sh/chart: {{ include "flyte-sandbox.chart" . }} -{{ include "flyte-sandbox.selectorLabels" . }} +{{- define "flyte-demo.labels" -}} +helm.sh/chart: {{ include "flyte-demo.chart" . }} +{{ include "flyte-demo.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "flyte-sandbox.selectorLabels" -}} -app.kubernetes.io/name: {{ include "flyte-sandbox.name" . }} +{{- define "flyte-demo.selectorLabels" -}} +app.kubernetes.io/name: {{ include "flyte-demo.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Create the name of the service account to use */}} -{{- define "flyte-sandbox.serviceAccountName" -}} +{{- define "flyte-demo.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "flyte-sandbox.fullname" .) .Values.serviceAccount.name }} +{{- default (include "flyte-demo.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} @@ -64,28 +64,28 @@ Create the name of the service account to use {{/* Name of inline ConfigMap containing additional configuration or overrides for Flyte */}} -{{- define "flyte-sandbox.configuration.inlineConfigMap" -}} +{{- define "flyte-demo.configuration.inlineConfigMap" -}} {{- printf "%s-extra-config" .Release.Name -}} {{- end }} {{/* Name of inline ConfigMap containing additional cluster resource templates */}} -{{- define "flyte-sandbox.clusterResourceTemplates.inlineConfigMap" -}} +{{- define "flyte-demo.clusterResourceTemplates.inlineConfigMap" -}} {{- printf "%s-extra-cluster-resource-templates" .Release.Name -}} {{- end }} {{/* Name of PersistentVolume and PersistentVolumeClaim for PostgreSQL database */}} -{{- define "flyte-sandbox.persistence.dbVolumeName" -}} +{{- define "flyte-demo.persistence.dbVolumeName" -}} {{- printf "%s-db-storage" .Release.Name -}} {{- end }} {{/* Name of PersistentVolume and PersistentVolumeClaim for Minio */}} -{{- define "flyte-sandbox.persistence.minioVolumeName" -}} +{{- define "flyte-demo.persistence.minioVolumeName" -}} {{- printf "%s-minio-storage" .Release.Name -}} {{- end }} @@ -93,14 +93,14 @@ Name of PersistentVolume and PersistentVolumeClaim for Minio {{/* Selector labels for console */}} -{{- define "flyte-sandbox.consoleSelectorLabels" -}} -{{ include "flyte-sandbox.selectorLabels" . }} +{{- define "flyte-demo.consoleSelectorLabels" -}} +{{ include "flyte-demo.selectorLabels" . }} app.kubernetes.io/component: console {{- end }} {{/* Name of development-mode Flyte headless service */}} -{{- define "flyte-sandbox.localHeadlessService" -}} +{{- define "flyte-demo.localHeadlessService" -}} {{- printf "%s-local" .Release.Name | trunc 63 | trimSuffix "-" -}} {{- end }} diff --git a/charts/flyte-sandbox/templates/config/cluster-resource-template-inline-configmap.yaml b/charts/flyte-demo/templates/config/cluster-resource-template-inline-configmap.yaml similarity index 65% rename from charts/flyte-sandbox/templates/config/cluster-resource-template-inline-configmap.yaml rename to charts/flyte-demo/templates/config/cluster-resource-template-inline-configmap.yaml index a72dcd1e72d..8cd11975340 100644 --- a/charts/flyte-sandbox/templates/config/cluster-resource-template-inline-configmap.yaml +++ b/charts/flyte-demo/templates/config/cluster-resource-template-inline-configmap.yaml @@ -2,6 +2,6 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "flyte-sandbox.clusterResourceTemplates.inlineConfigMap" . }} + name: {{ include "flyte-demo.clusterResourceTemplates.inlineConfigMap" . }} namespace: {{ .Release.Namespace | quote }} {{- end }} diff --git a/charts/flyte-sandbox/templates/config/configuration-inline-configmap.yaml b/charts/flyte-demo/templates/config/configuration-inline-configmap.yaml similarity index 68% rename from charts/flyte-sandbox/templates/config/configuration-inline-configmap.yaml rename to charts/flyte-demo/templates/config/configuration-inline-configmap.yaml index 7354956a6e1..d74cb61af8e 100644 --- a/charts/flyte-sandbox/templates/config/configuration-inline-configmap.yaml +++ b/charts/flyte-demo/templates/config/configuration-inline-configmap.yaml @@ -2,6 +2,6 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "flyte-sandbox.configuration.inlineConfigMap" . }} + name: {{ include "flyte-demo.configuration.inlineConfigMap" . }} namespace: {{ .Release.Namespace | quote }} {{- end }} diff --git a/charts/flyte-sandbox/templates/console/deployment.yaml b/charts/flyte-demo/templates/console/deployment.yaml similarity index 75% rename from charts/flyte-sandbox/templates/console/deployment.yaml rename to charts/flyte-demo/templates/console/deployment.yaml index 2b34d852e73..aa51159860d 100644 --- a/charts/flyte-sandbox/templates/console/deployment.yaml +++ b/charts/flyte-demo/templates/console/deployment.yaml @@ -2,16 +2,16 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "flyte-sandbox.fullname" . }}-console + name: flyte-console namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-sandbox.labels" . | nindent 4 }} + labels: {{- include "flyte-demo.labels" . | nindent 4 }} spec: replicas: 1 selector: - matchLabels: {{- include "flyte-sandbox.consoleSelectorLabels" . | nindent 6 }} + matchLabels: {{- include "flyte-demo.consoleSelectorLabels" . | nindent 6 }} template: metadata: - labels: {{- include "flyte-sandbox.consoleSelectorLabels" . | nindent 8 }} + labels: {{- include "flyte-demo.consoleSelectorLabels" . | nindent 8 }} spec: containers: - name: console diff --git a/charts/flyte-sandbox/templates/console/service.yaml b/charts/flyte-demo/templates/console/service.yaml similarity index 53% rename from charts/flyte-sandbox/templates/console/service.yaml rename to charts/flyte-demo/templates/console/service.yaml index 93953f5303a..fedc32f917b 100644 --- a/charts/flyte-sandbox/templates/console/service.yaml +++ b/charts/flyte-demo/templates/console/service.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "flyte-sandbox.fullname" . }}-console + name: flyte-console namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-sandbox.labels" . | nindent 4 }} + labels: {{- include "flyte-demo.labels" . | nindent 4 }} spec: - selector: {{- include "flyte-sandbox.consoleSelectorLabels" . | nindent 4 }} + selector: {{- include "flyte-demo.consoleSelectorLabels" . | nindent 4 }} ports: - name: http port: 80 diff --git a/charts/flyte-sandbox/templates/local/endpoint.yaml b/charts/flyte-demo/templates/local/endpoint.yaml similarity index 76% rename from charts/flyte-sandbox/templates/local/endpoint.yaml rename to charts/flyte-demo/templates/local/endpoint.yaml index f313aed788e..255b292a9ba 100644 --- a/charts/flyte-sandbox/templates/local/endpoint.yaml +++ b/charts/flyte-demo/templates/local/endpoint.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: Endpoints metadata: - name: {{ include "flyte-sandbox.localHeadlessService" . }} + name: {{ include "flyte-demo.localHeadlessService" . }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "flyte-sandbox.labels" . | nindent 4 }} + {{- include "flyte-demo.labels" . | nindent 4 }} subsets: - addresses: - ip: '%{HOST_GATEWAY_IP}%' diff --git a/charts/flyte-sandbox/templates/local/service.yaml b/charts/flyte-demo/templates/local/service.yaml similarity index 74% rename from charts/flyte-sandbox/templates/local/service.yaml rename to charts/flyte-demo/templates/local/service.yaml index 2643120bd06..414239849c5 100644 --- a/charts/flyte-sandbox/templates/local/service.yaml +++ b/charts/flyte-demo/templates/local/service.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "flyte-sandbox.localHeadlessService" . }} + name: {{ include "flyte-demo.localHeadlessService" . }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "flyte-sandbox.labels" . | nindent 4 }} + {{- include "flyte-demo.labels" . | nindent 4 }} spec: clusterIP: None ports: diff --git a/charts/flyte-sandbox/templates/proxy/ingress.yaml b/charts/flyte-demo/templates/proxy/ingress.yaml similarity index 72% rename from charts/flyte-sandbox/templates/proxy/ingress.yaml rename to charts/flyte-demo/templates/proxy/ingress.yaml index 918f8211ddb..a7fd29d4f6d 100644 --- a/charts/flyte-sandbox/templates/proxy/ingress.yaml +++ b/charts/flyte-demo/templates/proxy/ingress.yaml @@ -1,16 +1,16 @@ {{- if or ( index .Values "flyte-binary" "enabled" ) .Values.sandbox.dev }} {{- $backendService := "" }} {{- if index .Values "flyte-binary" "enabled" }} -{{- $backendService = include "flyte-binary.service.http.name" . }} +{{- $backendService = printf "%s-http" ( index .Values "flyte-binary" "fullnameOverride" | default "flyte-binary" ) }} {{- else }} -{{- $backendService = include "flyte-sandbox.localHeadlessService" . }} +{{- $backendService = include "flyte-demo.localHeadlessService" . }} {{- end }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "flyte-sandbox.fullname" . }}-api + name: {{ include "flyte-demo.fullname" . }}-api namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-sandbox.labels" . | nindent 4 }} + labels: {{- include "flyte-demo.labels" . | nindent 4 }} spec: rules: - http: @@ -37,9 +37,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "flyte-sandbox.fullname" . }}-console + name: flyte-console namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-sandbox.labels" . | nindent 4 }} + labels: {{- include "flyte-demo.labels" . | nindent 4 }} spec: rules: - http: @@ -48,7 +48,7 @@ spec: pathType: Prefix backend: service: - name: {{ include "flyte-sandbox.fullname" . }}-console + name: flyte-console port: number: 80 {{- end }} @@ -57,9 +57,9 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "flyte-sandbox.fullname" . }}-minio + name: {{ include "flyte-demo.fullname" . }}-minio namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-sandbox.labels" . | nindent 4 }} + labels: {{- include "flyte-demo.labels" . | nindent 4 }} annotations: traefik.ingress.kubernetes.io/router.middlewares: {{ .Release.Namespace }}-strip-minio@kubernetescrd spec: @@ -70,7 +70,7 @@ spec: pathType: Prefix backend: service: - name: {{ .Release.Name }}-minio + name: minio port: number: 9001 --- @@ -79,7 +79,7 @@ kind: Middleware metadata: name: strip-minio namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-sandbox.labels" . | nindent 4 }} + labels: {{- include "flyte-demo.labels" . | nindent 4 }} spec: stripPrefix: prefixes: diff --git a/charts/flyte-sandbox/templates/proxy/traefik-config.yaml b/charts/flyte-demo/templates/proxy/traefik-config.yaml similarity index 83% rename from charts/flyte-sandbox/templates/proxy/traefik-config.yaml rename to charts/flyte-demo/templates/proxy/traefik-config.yaml index 31c6906d39a..35ee5d9328f 100644 --- a/charts/flyte-sandbox/templates/proxy/traefik-config.yaml +++ b/charts/flyte-demo/templates/proxy/traefik-config.yaml @@ -3,7 +3,7 @@ kind: HelmChartConfig metadata: name: traefik namespace: kube-system - labels: {{- include "flyte-sandbox.labels" . | nindent 4 }} + labels: {{- include "flyte-demo.labels" . | nindent 4 }} spec: valuesContent: | service: diff --git a/charts/flyte-sandbox/templates/storage/minio/pv.yaml b/charts/flyte-demo/templates/storage/minio/pv.yaml similarity index 67% rename from charts/flyte-sandbox/templates/storage/minio/pv.yaml rename to charts/flyte-demo/templates/storage/minio/pv.yaml index 309bc72f3af..ed7018b5c48 100644 --- a/charts/flyte-sandbox/templates/storage/minio/pv.yaml +++ b/charts/flyte-demo/templates/storage/minio/pv.yaml @@ -1,10 +1,10 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: {{ include "flyte-sandbox.persistence.minioVolumeName" . }} + name: {{ include "flyte-demo.persistence.minioVolumeName" . }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "flyte-sandbox.labels" . | nindent 4 }} + {{- include "flyte-demo.labels" . | nindent 4 }} spec: storageClassName: manual accessModes: diff --git a/charts/flyte-sandbox/templates/storage/minio/pvc.yaml b/charts/flyte-demo/templates/storage/minio/pvc.yaml similarity index 52% rename from charts/flyte-sandbox/templates/storage/minio/pvc.yaml rename to charts/flyte-demo/templates/storage/minio/pvc.yaml index 150b4f4a60d..23832e9e3b8 100644 --- a/charts/flyte-sandbox/templates/storage/minio/pvc.yaml +++ b/charts/flyte-demo/templates/storage/minio/pvc.yaml @@ -1,10 +1,10 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "flyte-sandbox.persistence.minioVolumeName" . }} + name: {{ include "flyte-demo.persistence.minioVolumeName" . }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "flyte-sandbox.labels" . | nindent 4 }} + {{- include "flyte-demo.labels" . | nindent 4 }} spec: storageClassName: manual accessModes: @@ -12,4 +12,4 @@ spec: resources: requests: storage: 1Gi - volumeName: {{ include "flyte-sandbox.persistence.minioVolumeName" . }} + volumeName: {{ include "flyte-demo.persistence.minioVolumeName" . }} diff --git a/charts/flyte-sandbox/values.yaml b/charts/flyte-demo/values.yaml similarity index 77% rename from charts/flyte-sandbox/values.yaml rename to charts/flyte-demo/values.yaml index 50775a52fdf..4b61cae4362 100644 --- a/charts/flyte-sandbox/values.yaml +++ b/charts/flyte-demo/values.yaml @@ -1,4 +1,5 @@ docker-registry: + fullnameOverride: docker-registry enabled: true image: tag: sandbox @@ -12,11 +13,11 @@ docker-registry: nodePort: 30000 flyte-binary: - nameOverride: flyte-sandbox + fullnameOverride: flyte-binary enabled: true configuration: database: - host: '{{ printf "%s-postgresql" .Release.Name | trunc 63 | trimSuffix "-" }}' + host: 'postgresql' password: postgres storage: metadataContainer: flyte-data @@ -26,7 +27,7 @@ flyte-binary: s3: disableSSL: true v2Signing: true - endpoint: http://{{ printf "%s-minio" .Release.Name | trunc 63 | trimSuffix "-" }}.{{ .Release.Namespace }}:9000 + endpoint: http://minio.{{ .Release.Namespace }}:9000 authType: accesskey accessKey: minio secretKey: miniostorage @@ -51,39 +52,43 @@ flyte-binary: plugins: k8s: default-env-vars: - - FLYTE_AWS_ENDPOINT: http://{{ printf "%s-minio" .Release.Name | trunc 63 | trimSuffix "-" }}.{{ .Release.Namespace }}:9000 + - FLYTE_AWS_ENDPOINT: http://minio.{{ .Release.Namespace }}:9000 - FLYTE_AWS_ACCESS_KEY_ID: minio - FLYTE_AWS_SECRET_ACCESS_KEY: miniostorage - - _U_EP_OVERRIDE: '{{ printf "%s-http" .Release.Name }}.{{ .Release.Namespace }}:8090' + - _U_EP_OVERRIDE: 'flyte-binary-http.{{ .Release.Namespace }}:8090' - _U_INSECURE: "true" - _U_USE_ACTIONS: "1" runs: database: postgres: - host: '{{ printf "%s-postgresql" .Release.Name | trunc 63 | trimSuffix "-" }}.{{ .Release.Namespace }}' + host: 'postgresql.{{ .Release.Namespace }}' port: 5432 dbName: runs user: postgres password: postgres - inlineConfigMap: '{{ include "flyte-sandbox.configuration.inlineConfigMap" . }}' + inlineConfigMap: '{{ include "flyte-demo.configuration.inlineConfigMap" . }}' clusterResourceTemplates: - inlineConfigMap: '{{ include "flyte-sandbox.clusterResourceTemplates.inlineConfigMap" . }}' + inlineConfigMap: '{{ include "flyte-demo.clusterResourceTemplates.inlineConfigMap" . }}' deployment: image: repository: flyte-binary-v2 tag: sandbox pullPolicy: Never + startupProbe: + httpGet: + path: /healthz + port: http + failureThreshold: 30 + periodSeconds: 1 livenessProbe: httpGet: path: /healthz port: http - initialDelaySeconds: 5 readinessProbe: httpGet: path: /readyz port: http - initialDelaySeconds: 5 - periodSeconds: 5 + periodSeconds: 1 waitForDB: image: repository: bitnami/postgresql @@ -105,6 +110,7 @@ flyte-binary: - '*' minio: + fullnameOverride: minio enabled: true image: tag: sandbox @@ -122,7 +128,7 @@ minio: api: 30002 persistence: enabled: true - existingClaim: '{{ include "flyte-sandbox.persistence.minioVolumeName" . }}' + existingClaim: '{{ include "flyte-demo.persistence.minioVolumeName" . }}' volumePermissions: enabled: true image: @@ -130,6 +136,7 @@ minio: pullPolicy: Never postgresql: + fullnameOverride: postgresql enabled: true image: tag: sandbox @@ -145,7 +152,7 @@ postgresql: postgresql: 30001 persistence: enabled: true - existingClaim: '{{ include "flyte-sandbox.persistence.dbVolumeName" . }}' + existingClaim: '{{ include "flyte-demo.persistence.dbVolumeName" . }}' volumePermissions: enabled: true image: diff --git a/docker/sandbox-bundled/.gitignore b/docker/demo-bundled/.gitignore similarity index 100% rename from docker/sandbox-bundled/.gitignore rename to docker/demo-bundled/.gitignore diff --git a/docker/sandbox-bundled/Dockerfile b/docker/demo-bundled/Dockerfile similarity index 93% rename from docker/sandbox-bundled/Dockerfile rename to docker/demo-bundled/Dockerfile index c748af12111..ed1fce8c4ad 100644 --- a/docker/sandbox-bundled/Dockerfile +++ b/docker/demo-bundled/Dockerfile @@ -22,7 +22,7 @@ COPY bootstrap/go.mod bootstrap/go.sum ./ RUN go mod download COPY bootstrap/ ./ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/go/pkg/mod \ - go build -o dist/flyte-sandbox-bootstrap cmd/bootstrap/main.go && \ + go build -o dist/flyte-demo-bootstrap cmd/bootstrap/main.go && \ go build -o dist/embedded-postgres cmd/embedded-postgres/main.go @@ -64,8 +64,8 @@ FROM rancher/k3s:v1.29.0-k3s1 ARG TARGETARCH -ARG FLYTE_SANDBOX_VERSION -ENV FLYTE_SANDBOX_VERSION "${FLYTE_SANDBOX_VERSION}" +ARG FLYTE_DEMO_VERSION +ENV FLYTE_DEMO_VERSION "${FLYTE_DEMO_VERSION}" COPY --from=builder /build/images/ /var/lib/rancher/k3s/agent/images/ COPY images/tar/${TARGETARCH}/ /var/lib/rancher/k3s/agent/images/ @@ -73,7 +73,7 @@ COPY manifests/ /var/lib/rancher/k3s/server/manifests-staging/ COPY bin/ /bin/ # Install bootstrap and embedded postgres -COPY --from=bootstrap /flyteorg/build/dist/flyte-sandbox-bootstrap /bin/ +COPY --from=bootstrap /flyteorg/build/dist/flyte-demo-bootstrap /bin/ COPY --from=bootstrap /flyteorg/build/dist/embedded-postgres /bin/ # Install pre-cached PostgreSQL binaries and glibc libraries @@ -98,4 +98,4 @@ VOLUME /var/lib/flyte/storage ENV SSL_CERT_DIR /var/lib/flyte/config/ca-certificates ENTRYPOINT [ "/bin/k3d-entrypoint.sh" ] -CMD [ "server", "--disable=servicelb" ] +CMD [ "server", "--disable=servicelb", "--disable=metrics-server" ] diff --git a/docker/sandbox-bundled/Makefile b/docker/demo-bundled/Makefile similarity index 76% rename from docker/sandbox-bundled/Makefile rename to docker/demo-bundled/Makefile index 384cf597817..56eac5e0513 100644 --- a/docker/sandbox-bundled/Makefile +++ b/docker/demo-bundled/Makefile @@ -3,7 +3,7 @@ mkdir -p images/tar/$(1) docker buildx build \ --build-arg FLYTECONSOLE_VERSION=$(FLYTECONSOLE_VERSION) \ - --builder flyte-sandbox \ + --builder flyte-demo \ --platform linux/$(1) \ --tag flyte-binary-v2:sandbox \ --output type=docker,dest=images/tar/$(1)/flyte-binary.tar \ @@ -13,8 +13,8 @@ endef .PHONY: create_builder create_builder: - [ -n "$(shell docker buildx ls | awk '/^flyte-sandbox / {print $$1}')" ] || \ - docker buildx create --name flyte-sandbox \ + [ -n "$(shell docker buildx ls | awk '/^flyte-demo / {print $$1}')" ] || \ + docker buildx create --name flyte-demo \ --driver docker-container --driver-opt image=moby/buildkit:master \ --buildkitd-flags '--allow-insecure-entitlement security.insecure' \ --platform linux/arm64,linux/amd64 @@ -35,7 +35,7 @@ dep_build: helm-repos cd $(SANDBOX_CHART_DIR) && helm dependency build .PHONY: dep_update -dep_update: SANDBOX_CHART_DIR := ../../charts/flyte-sandbox +dep_update: SANDBOX_CHART_DIR := ../../charts/flyte-demo dep_update: dep_build cd $(SANDBOX_CHART_DIR)/charts && for f in *.tgz; do tar xzf "$$f"; done @@ -68,8 +68,8 @@ sync-crds: .PHONY: build build: sync-crds flyte console dep_update manifests - docker buildx build --builder flyte-sandbox --allow security.insecure --load \ - --tag flyte-sandbox-v2:latest . + docker buildx build --builder flyte-demo --allow security.insecure --load \ + --tag flyte-demo:latest . # Port map # 6443 - k8s API server @@ -78,30 +78,30 @@ build: sync-crds flyte console dep_update manifests # 30002 - Minio # 30080 - Flyte Proxy .PHONY: start -start: FLYTE_SANDBOX_IMAGE := flyte-sandbox-v2:latest +start: FLYTE_DEMO_IMAGE := flyte-demo:latest start: FLYTE_DEV := False start: - [ -n "$(shell docker volume ls --filter name=^flyte-sandbox$$ --format {{.Name}})" ] || \ - docker volume create flyte-sandbox - @if [ -z "$(shell docker ps --filter name=^flyte-sandbox$$ --format {{.Names}})" ]; then \ + [ -n "$(shell docker volume ls --filter name=^flyte-demo$$ --format {{.Name}})" ] || \ + docker volume create flyte-demo + @if [ -z "$(shell docker ps --filter name=^flyte-demo$$ --format {{.Names}})" ]; then \ rm -f $(PWD)/.kube/kubeconfig; \ - docker run --detach --rm --privileged --name flyte-sandbox \ + docker run --detach --rm --privileged --name flyte-demo \ --add-host "host.docker.internal:host-gateway" \ --env FLYTE_DEV=$(FLYTE_DEV) \ --env K3S_KUBECONFIG_OUTPUT=/.kube/kubeconfig \ --volume $(PWD)/.kube:/.kube \ - --volume flyte-sandbox:/var/lib/flyte/storage \ + --volume flyte-demo:/var/lib/flyte/storage \ --publish "6443":"6443" \ --publish "30000:30000" \ --publish "30001:5432" \ --publish "30002:30002" \ --publish "30080:30080" \ - $(FLYTE_SANDBOX_IMAGE); \ + $(FLYTE_DEMO_IMAGE); \ fi @echo "Waiting for kubeconfig..." @until [ -s $(PWD)/.kube/kubeconfig ]; do sleep 1; done @# On WSL, the bind-mounted kubeconfig may be root-owned, which makes the host-side cp fail with permission denied. - @docker exec flyte-sandbox chown $(shell id -u):$(shell id -g) /.kube/kubeconfig + @docker exec flyte-demo chown $(shell id -u):$(shell id -g) /.kube/kubeconfig @mkdir -p $(HOME)/.kube @if [ -f $(HOME)/.kube/config ]; then \ KUBECONFIG=$(PWD)/.kube/kubeconfig:$(HOME)/.kube/config kubectl config view --flatten > /tmp/kubeconfig-merged && \ @@ -109,16 +109,17 @@ start: else \ cp $(PWD)/.kube/kubeconfig $(HOME)/.kube/config; \ fi + @kubectl config use-context flyte-demo >/dev/null 2>&1 || true @echo "Kubeconfig merged into ~/.kube/config" .PHONY: kubeconfig .SILENT: kubeconfig kubeconfig: - sed -i -e "/server:/ s/: .*/: https:\/\/127.0.0.1:$(shell docker port flyte-sandbox | grep ^6443 | awk '{print $$3}' | awk -F: '{print $$2}')/" .kube/kubeconfig + sed -i -e "/server:/ s/: .*/: https:\/\/127.0.0.1:$(shell docker port flyte-demo | grep ^6443 | awk '{print $$3}' | awk -F: '{print $$2}')/" .kube/kubeconfig echo "export KUBECONFIG=$(PWD)/.kube/kubeconfig" .PHONY: stop stop: - docker stop flyte-sandbox + docker stop --time 5 flyte-demo .venv: python -m venv .venv diff --git a/docker/sandbox-bundled/bin/k3d-entrypoint-cgroupv2.sh b/docker/demo-bundled/bin/k3d-entrypoint-cgroupv2.sh similarity index 100% rename from docker/sandbox-bundled/bin/k3d-entrypoint-cgroupv2.sh rename to docker/demo-bundled/bin/k3d-entrypoint-cgroupv2.sh diff --git a/docker/demo-bundled/bin/k3d-entrypoint-flyte-demo-bootstrap.sh b/docker/demo-bundled/bin/k3d-entrypoint-flyte-demo-bootstrap.sh new file mode 100755 index 00000000000..ad82efe1286 --- /dev/null +++ b/docker/demo-bundled/bin/k3d-entrypoint-flyte-demo-bootstrap.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Fix ownership of PostgreSQL data directory if it exists from a previous run +# (e.g., old bitnami PostgreSQL used uid 1001, embedded-postgres uses uid 999). +if [ -d /var/lib/flyte/storage/db ]; then + chown -R 999:999 /var/lib/flyte/storage/db +fi + +# Start embedded PostgreSQL in the background (must be running before k3s +# deploys the flyte-binary pod, which has a wait-for-db init container). +embedded-postgres & + +# Wait for PostgreSQL to be ready before proceeding +while ! [ -f /tmp/embedded-postgres-ready ]; do + sleep 0.5 +done + +flyte-demo-bootstrap + +# Wait for K3s to write kubeconfig to the staging path, rename the default +# context, add a flyte-demo alias, then copy to the host-mounted output. +STAGING="${K3S_KUBECONFIG_OUTPUT:-/etc/rancher/k3s/k3s.yaml}" +( + while ! [ -s "$STAGING" ]; do sleep 0.5; done + # TODO: Remove flytev2-sandbox after all users have upgraded flyte-sdk. + sed -i 's/: default/: flytev2-sandbox/g' "$STAGING" + KUBECONFIG="$STAGING" kubectl config set-context flyte-demo \ + --cluster=flytev2-sandbox --user=flytev2-sandbox 2>/dev/null || true + if [ -n "${KUBECONFIG_FINAL:-}" ] && [ "$KUBECONFIG_FINAL" != "$STAGING" ]; then + cp "$STAGING" "$KUBECONFIG_FINAL" + fi +) & diff --git a/docker/demo-bundled/bin/k3d-entrypoint.sh b/docker/demo-bundled/bin/k3d-entrypoint.sh new file mode 100755 index 00000000000..3044001b52f --- /dev/null +++ b/docker/demo-bundled/bin/k3d-entrypoint.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +set -o errexit +set -o nounset + +LOGFILE="/var/log/k3d-entrypoints_$(date "+%y%m%d%H%M%S").log" + +touch "$LOGFILE" + +echo "[$(date -Iseconds)] Running k3d entrypoints..." >> "$LOGFILE" + +# Redirect K3S_KUBECONFIG_OUTPUT to a staging path so K3s doesn't write +# directly to the host-mounted path. The bootstrap entrypoint script will +# post-process the staging file (rename context, add aliases) then copy +# to the real output path — so the host only sees the finished version. +if [ -n "${K3S_KUBECONFIG_OUTPUT:-}" ]; then + KUBECONFIG_FINAL="$K3S_KUBECONFIG_OUTPUT" + export KUBECONFIG_FINAL + export K3S_KUBECONFIG_OUTPUT="/tmp/k3s-kubeconfig-staging" +fi + +for entrypoint in /bin/k3d-entrypoint-*.sh ; do + echo "[$(date -Iseconds)] Running $entrypoint" >> "$LOGFILE" + "$entrypoint" >> "$LOGFILE" 2>&1 || exit 1 +done + +echo "[$(date -Iseconds)] Finished k3d entrypoint scripts!" >> "$LOGFILE" + +exec /bin/k3s "$@" diff --git a/docker/sandbox-bundled/bootstrap/Makefile b/docker/demo-bundled/bootstrap/Makefile similarity index 100% rename from docker/sandbox-bundled/bootstrap/Makefile rename to docker/demo-bundled/bootstrap/Makefile diff --git a/docker/sandbox-bundled/bootstrap/cmd/bootstrap/main.go b/docker/demo-bundled/bootstrap/cmd/bootstrap/main.go similarity index 89% rename from docker/sandbox-bundled/bootstrap/cmd/bootstrap/main.go rename to docker/demo-bundled/bootstrap/cmd/bootstrap/main.go index 8fc849157e7..ab516a862e1 100644 --- a/docker/sandbox-bundled/bootstrap/cmd/bootstrap/main.go +++ b/docker/demo-bundled/bootstrap/cmd/bootstrap/main.go @@ -7,15 +7,15 @@ import ( "os" "path/filepath" - "github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform" - "github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config" - "github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/vars" + "github.com/flyteorg/flyte/docker/demo-bundled/bootstrap/internal/transform" + "github.com/flyteorg/flyte/docker/demo-bundled/bootstrap/internal/transform/plugins/config" + "github.com/flyteorg/flyte/docker/demo-bundled/bootstrap/internal/transform/plugins/vars" ) const ( configDirPath = "/var/lib/flyte/config" - configurationConfigMapName = "flyte-sandbox-extra-config" - deploymentName = "flyte-sandbox" + configurationConfigMapName = "flyte-demo-extra-config" + deploymentName = "flyte-binary" devModeEnvVar = "FLYTE_DEV" dockerHost = "host.docker.internal" namespace = "flyte" diff --git a/docker/sandbox-bundled/bootstrap/cmd/bootstrap/main_test.go b/docker/demo-bundled/bootstrap/cmd/bootstrap/main_test.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/cmd/bootstrap/main_test.go rename to docker/demo-bundled/bootstrap/cmd/bootstrap/main_test.go diff --git a/docker/sandbox-bundled/bootstrap/cmd/embedded-postgres/main.go b/docker/demo-bundled/bootstrap/cmd/embedded-postgres/main.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/cmd/embedded-postgres/main.go rename to docker/demo-bundled/bootstrap/cmd/embedded-postgres/main.go diff --git a/docker/sandbox-bundled/bootstrap/cmd/embedded-postgres/main_test.go b/docker/demo-bundled/bootstrap/cmd/embedded-postgres/main_test.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/cmd/embedded-postgres/main_test.go rename to docker/demo-bundled/bootstrap/cmd/embedded-postgres/main_test.go diff --git a/docker/sandbox-bundled/bootstrap/go.mod b/docker/demo-bundled/bootstrap/go.mod similarity index 97% rename from docker/sandbox-bundled/bootstrap/go.mod rename to docker/demo-bundled/bootstrap/go.mod index c7dd82faa1a..58b1a9de8cc 100644 --- a/docker/sandbox-bundled/bootstrap/go.mod +++ b/docker/demo-bundled/bootstrap/go.mod @@ -1,4 +1,4 @@ -module github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap +module github.com/flyteorg/flyte/docker/demo-bundled/bootstrap go 1.24.0 diff --git a/docker/sandbox-bundled/bootstrap/go.sum b/docker/demo-bundled/bootstrap/go.sum similarity index 100% rename from docker/sandbox-bundled/bootstrap/go.sum rename to docker/demo-bundled/bootstrap/go.sum diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/cluster_resource_templates.go b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/cluster_resource_templates.go similarity index 97% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/cluster_resource_templates.go rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/cluster_resource_templates.go index e3da84e2f41..07c4814b7b2 100644 --- a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/cluster_resource_templates.go +++ b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/cluster_resource_templates.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/utils" + "github.com/flyteorg/flyte/docker/demo-bundled/bootstrap/internal/utils" appsv1 "k8s.io/api/apps/v1" apiv1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1" diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/configuration.go b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/configuration.go similarity index 96% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/configuration.go rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/configuration.go index 6df41097110..155310a5e0b 100644 --- a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/configuration.go +++ b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/configuration.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/utils" + "github.com/flyteorg/flyte/docker/demo-bundled/bootstrap/internal/utils" appsv1 "k8s.io/api/apps/v1" apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/loader.go b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/loader.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/loader.go rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/loader.go diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/loader_test.go b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/loader_test.go similarity index 97% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/loader_test.go rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/loader_test.go index d943d4bfc40..659d0e2bd90 100644 --- a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/loader_test.go +++ b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/loader_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/utils" + "github.com/flyteorg/flyte/docker/demo-bundled/bootstrap/internal/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/base.yaml b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/base.yaml similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/base.yaml rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/base.yaml diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/emptydir/.keep b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/emptydir/.keep similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/emptydir/.keep rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/emptydir/.keep diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/cluster-resource-templates/resource.yaml b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/cluster-resource-templates/resource.yaml similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/cluster-resource-templates/resource.yaml rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/cluster-resource-templates/resource.yaml diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/config.yaml b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/config.yaml similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/config.yaml rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/emptyfile/config.yaml diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/cluster-resource-templates/resource.yaml b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/cluster-resource-templates/resource.yaml similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/cluster-resource-templates/resource.yaml rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/cluster-resource-templates/resource.yaml diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/config.yaml b/docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/config.yaml similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/config.yaml rename to docker/demo-bundled/bootstrap/internal/transform/plugins/config/testdata/happy/config.yaml diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/vars/vars.go b/docker/demo-bundled/bootstrap/internal/transform/plugins/vars/vars.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/vars/vars.go rename to docker/demo-bundled/bootstrap/internal/transform/plugins/vars/vars.go diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/plugins/vars/vars_test.go b/docker/demo-bundled/bootstrap/internal/transform/plugins/vars/vars_test.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/plugins/vars/vars_test.go rename to docker/demo-bundled/bootstrap/internal/transform/plugins/vars/vars_test.go diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/transformer.go b/docker/demo-bundled/bootstrap/internal/transform/transformer.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/transformer.go rename to docker/demo-bundled/bootstrap/internal/transform/transformer.go diff --git a/docker/sandbox-bundled/bootstrap/internal/transform/transformer_test.go b/docker/demo-bundled/bootstrap/internal/transform/transformer_test.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/transform/transformer_test.go rename to docker/demo-bundled/bootstrap/internal/transform/transformer_test.go diff --git a/docker/sandbox-bundled/bootstrap/internal/utils/checksum.go b/docker/demo-bundled/bootstrap/internal/utils/checksum.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/utils/checksum.go rename to docker/demo-bundled/bootstrap/internal/utils/checksum.go diff --git a/docker/sandbox-bundled/bootstrap/internal/utils/checksum_test.go b/docker/demo-bundled/bootstrap/internal/utils/checksum_test.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/utils/checksum_test.go rename to docker/demo-bundled/bootstrap/internal/utils/checksum_test.go diff --git a/docker/sandbox-bundled/bootstrap/internal/utils/patch.go b/docker/demo-bundled/bootstrap/internal/utils/patch.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/utils/patch.go rename to docker/demo-bundled/bootstrap/internal/utils/patch.go diff --git a/docker/sandbox-bundled/bootstrap/internal/utils/patch_test.go b/docker/demo-bundled/bootstrap/internal/utils/patch_test.go similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/utils/patch_test.go rename to docker/demo-bundled/bootstrap/internal/utils/patch_test.go diff --git a/docker/sandbox-bundled/bootstrap/internal/utils/testdata/bar b/docker/demo-bundled/bootstrap/internal/utils/testdata/bar similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/utils/testdata/bar rename to docker/demo-bundled/bootstrap/internal/utils/testdata/bar diff --git a/docker/sandbox-bundled/bootstrap/internal/utils/testdata/foo b/docker/demo-bundled/bootstrap/internal/utils/testdata/foo similarity index 100% rename from docker/sandbox-bundled/bootstrap/internal/utils/testdata/foo rename to docker/demo-bundled/bootstrap/internal/utils/testdata/foo diff --git a/docker/sandbox-bundled/images/manifest.txt b/docker/demo-bundled/images/manifest.txt similarity index 88% rename from docker/sandbox-bundled/images/manifest.txt rename to docker/demo-bundled/images/manifest.txt index 633125d0fa0..c8aef262448 100644 --- a/docker/sandbox-bundled/images/manifest.txt +++ b/docker/demo-bundled/images/manifest.txt @@ -4,5 +4,4 @@ docker.io/library/registry:sandbox=registry:2.8.1 docker.io/rancher/local-path-provisioner:v0.0.21 docker.io/rancher/mirrored-coredns-coredns:1.9.1 docker.io/rancher/mirrored-library-busybox:1.34.1 -docker.io/rancher/mirrored-metrics-server:v0.5.2 docker.io/rancher/mirrored-pause:3.6 diff --git a/docker/sandbox-bundled/images/preload b/docker/demo-bundled/images/preload similarity index 100% rename from docker/sandbox-bundled/images/preload rename to docker/demo-bundled/images/preload diff --git a/docker/sandbox-bundled/kustomize/complete/kustomization.yaml b/docker/demo-bundled/kustomize/complete/kustomization.yaml similarity index 82% rename from docker/sandbox-bundled/kustomize/complete/kustomization.yaml rename to docker/demo-bundled/kustomize/complete/kustomization.yaml index 43d653c9935..d431e17d2f6 100644 --- a/docker/sandbox-bundled/kustomize/complete/kustomization.yaml +++ b/docker/demo-bundled/kustomize/complete/kustomization.yaml @@ -1,8 +1,8 @@ helmGlobals: chartHome: ../../../../charts helmCharts: -- name: flyte-sandbox - releaseName: flyte-sandbox +- name: flyte-demo + releaseName: flyte-demo namespace: flyte valuesInline: # Disabled: PostgreSQL runs as an embedded process on the host via @@ -20,9 +20,9 @@ helmCharts: - -ec args: - | - until nc -z flyte-sandbox-postgresql.flyte 5432; do + until nc -z postgresql.flyte 5432; do echo waiting for database - sleep 0.5 + sleep 0.1 done namespace: flyte resources: diff --git a/docker/sandbox-bundled/kustomize/dev/kustomization.yaml b/docker/demo-bundled/kustomize/dev/kustomization.yaml similarity index 91% rename from docker/sandbox-bundled/kustomize/dev/kustomization.yaml rename to docker/demo-bundled/kustomize/dev/kustomization.yaml index f952af3aa07..f539e6ccea8 100644 --- a/docker/sandbox-bundled/kustomize/dev/kustomization.yaml +++ b/docker/demo-bundled/kustomize/dev/kustomization.yaml @@ -1,8 +1,8 @@ helmGlobals: chartHome: ../../../../charts helmCharts: -- name: flyte-sandbox - releaseName: flyte-sandbox +- name: flyte-demo + releaseName: flyte-demo namespace: flyte valuesInline: flyte-binary: diff --git a/docker/sandbox-bundled/kustomize/embedded-postgres-service.yaml b/docker/demo-bundled/kustomize/embedded-postgres-service.yaml similarity index 87% rename from docker/sandbox-bundled/kustomize/embedded-postgres-service.yaml rename to docker/demo-bundled/kustomize/embedded-postgres-service.yaml index 89a9d72b4cb..c6e050b5ebd 100644 --- a/docker/sandbox-bundled/kustomize/embedded-postgres-service.yaml +++ b/docker/demo-bundled/kustomize/embedded-postgres-service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: flyte-sandbox-postgresql + name: postgresql namespace: flyte labels: app.kubernetes.io/name: embedded-postgresql @@ -17,7 +17,7 @@ spec: apiVersion: v1 kind: Endpoints metadata: - name: flyte-sandbox-postgresql + name: postgresql namespace: flyte labels: app.kubernetes.io/name: embedded-postgresql diff --git a/docker/sandbox-bundled/kustomize/minio-patch.yaml b/docker/demo-bundled/kustomize/minio-patch.yaml similarity index 94% rename from docker/sandbox-bundled/kustomize/minio-patch.yaml rename to docker/demo-bundled/kustomize/minio-patch.yaml index 8814c1fc27b..2f8b26f6782 100644 --- a/docker/sandbox-bundled/kustomize/minio-patch.yaml +++ b/docker/demo-bundled/kustomize/minio-patch.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: flyte-sandbox-minio + name: minio namespace: flyte spec: template: diff --git a/docker/sandbox-bundled/kustomize/namespace.yaml b/docker/demo-bundled/kustomize/namespace.yaml similarity index 100% rename from docker/sandbox-bundled/kustomize/namespace.yaml rename to docker/demo-bundled/kustomize/namespace.yaml diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/demo-bundled/manifests/complete.yaml similarity index 83% rename from docker/sandbox-bundled/manifests/complete.yaml rename to docker/demo-bundled/manifests/complete.yaml index 2ac6eb12f5b..2dfb70f852d 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/demo-bundled/manifests/complete.yaml @@ -294,11 +294,11 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-binary helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox + name: flyte-binary namespace: flyte --- apiVersion: v1 @@ -306,24 +306,24 @@ automountServiceAccountToken: true kind: ServiceAccount metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte secrets: -- name: flyte-sandbox-minio +- name: minio --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-binary helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox-cluster-role + name: flyte-binary-cluster-role namespace: flyte rules: - apiGroups: @@ -389,19 +389,54 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-binary helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox-cluster-role-binding + name: flyte-binary-cluster-role-binding namespace: flyte roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: flyte-sandbox-cluster-role + name: flyte-binary-cluster-role subjects: - kind: ServiceAccount - name: flyte-sandbox + name: flyte-binary + namespace: flyte +--- +apiVersion: v1 +data: + config.yml: |- + health: + storagedriver: + enabled: true + interval: 10s + threshold: 3 + http: + addr: :5000 + debug: + addr: :5001 + prometheus: + enabled: false + path: /metrics + headers: + X-Content-Type-Options: + - nosniff + log: + fields: + service: registry + storage: + cache: + blobdescriptor: inmemory + version: 0.1 +kind: ConfigMap +metadata: + labels: + app: docker-registry + chart: docker-registry-2.2.2 + heritage: Helm + release: flyte-demo + name: docker-registry-config namespace: flyte --- apiVersion: v1 @@ -413,8 +448,8 @@ data: webhook: certDir: /var/run/flyte/certs localCert: true - secretName: flyte-sandbox-webhook-secret - serviceName: flyte-sandbox-webhook + secretName: flyte-binary-webhook-secret + serviceName: flyte-binary-webhook servicePort: 443 actions: @@ -463,7 +498,7 @@ data: secret: kubernetes: burst: 200 - clusterName: flyte-sandbox + clusterName: flyte-demo kubeconfig: "" namespace: flyte qps: 100 @@ -498,7 +533,7 @@ data: database: postgres: username: postgres - host: flyte-sandbox-postgresql + host: postgresql port: 5432 dbname: flyte options: "sslmode=disable" @@ -511,24 +546,24 @@ data: region: us-east-1 disable_ssl: true v2_signing: true - endpoint: http://flyte-sandbox-minio.flyte:9000 + endpoint: http://minio.flyte:9000 auth_type: accesskey container: flyte-data 100-inline-config.yaml: | plugins: k8s: default-env-vars: - - FLYTE_AWS_ENDPOINT: http://flyte-sandbox-minio.flyte:9000 + - FLYTE_AWS_ENDPOINT: http://minio.flyte:9000 - FLYTE_AWS_ACCESS_KEY_ID: minio - FLYTE_AWS_SECRET_ACCESS_KEY: miniostorage - - _U_EP_OVERRIDE: 'flyte-sandbox-http.flyte:8090' + - _U_EP_OVERRIDE: flyte-binary-http.flyte:8090 - _U_INSECURE: "true" - _U_USE_ACTIONS: "1" runs: database: postgres: dbName: runs - host: 'flyte-sandbox-postgresql.flyte' + host: postgresql.flyte password: postgres port: 5432 user: postgres @@ -550,69 +585,50 @@ data: kind: ConfigMap metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-binary helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox-config + name: flyte-binary-config namespace: flyte --- apiVersion: v1 -data: - config.yml: |- - health: - storagedriver: - enabled: true - interval: 10s - threshold: 3 - http: - addr: :5000 - debug: - addr: :5001 - prometheus: - enabled: false - path: /metrics - headers: - X-Content-Type-Options: - - nosniff - log: - fields: - service: registry - storage: - cache: - blobdescriptor: inmemory - version: 0.1 kind: ConfigMap metadata: - labels: - app: docker-registry - chart: docker-registry-2.2.2 - heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry-config + name: flyte-demo-extra-cluster-resource-templates namespace: flyte --- apiVersion: v1 kind: ConfigMap metadata: - name: flyte-sandbox-extra-cluster-resource-templates + name: flyte-demo-extra-config namespace: flyte --- apiVersion: v1 -kind: ConfigMap +data: + haSharedSecret: Zmx5dGVzYW5kYm94c2VjcmV0 + proxyPassword: "" + proxyUsername: "" +kind: Secret metadata: - name: flyte-sandbox-extra-config + labels: + app: docker-registry + chart: docker-registry-2.2.2 + heritage: Helm + release: flyte-demo + name: docker-registry-secret namespace: flyte +type: Opaque --- apiVersion: v1 kind: Secret metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-binary helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox-config-secret + name: flyte-binary-config-secret namespace: flyte stringData: 012-database-secrets.yaml: | @@ -628,33 +644,17 @@ stringData: type: Opaque --- apiVersion: v1 -data: - haSharedSecret: Zmx5dGVzYW5kYm94c2VjcmV0 - proxyPassword: "" - proxyUsername: "" -kind: Secret -metadata: - labels: - app: docker-registry - chart: docker-registry-2.2.2 - heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry-secret - namespace: flyte -type: Opaque ---- -apiVersion: v1 data: root-password: bWluaW9zdG9yYWdl root-user: bWluaW8= kind: Secret metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte type: Opaque --- @@ -663,7 +663,7 @@ kind: Endpoints metadata: labels: app.kubernetes.io/name: embedded-postgresql - name: flyte-sandbox-postgresql + name: postgresql namespace: flyte subsets: - addresses: @@ -674,35 +674,13 @@ subsets: --- apiVersion: v1 kind: Service -metadata: - labels: - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox - app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-console - namespace: flyte -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: http - selector: - app.kubernetes.io/component: console - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox ---- -apiVersion: v1 -kind: Service metadata: labels: app: docker-registry chart: docker-registry-2.2.2 heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry + release: flyte-demo + name: docker-registry namespace: flyte spec: ports: @@ -713,18 +691,18 @@ spec: targetPort: 5000 selector: app: docker-registry - release: flyte-sandbox + release: flyte-demo type: NodePort --- apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-binary helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox-http + name: flyte-binary-http namespace: flyte spec: ports: @@ -734,19 +712,62 @@ spec: targetPort: http selector: app.kubernetes.io/component: flyte-binary - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-binary type: ClusterIP --- apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: flyte-binary + helm.sh/chart: flyte-binary-v0.2.0 + name: flyte-binary-webhook + namespace: flyte +spec: + ports: + - name: webhook + port: 443 + protocol: TCP + targetPort: 9443 + selector: + app.kubernetes.io/component: flyte-binary + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-binary +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: flyte-demo + app.kubernetes.io/version: 1.16.1 + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-console + namespace: flyte +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/component: console + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-demo +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte spec: externalTrafficPolicy: Cluster @@ -759,7 +780,7 @@ spec: port: 9001 targetPort: minio-console selector: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/name: minio type: NodePort --- @@ -768,7 +789,7 @@ kind: Service metadata: labels: app.kubernetes.io/name: embedded-postgresql - name: flyte-sandbox-postgresql + name: postgresql namespace: flyte spec: ports: @@ -779,36 +800,15 @@ spec: type: NodePort --- apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox - helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox-webhook - namespace: flyte -spec: - ports: - - name: webhook - port: 443 - protocol: TCP - targetPort: 9443 - selector: - app.kubernetes.io/component: flyte-binary - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox ---- -apiVersion: v1 kind: PersistentVolume metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-minio-storage + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-minio-storage namespace: flyte spec: accessModes: @@ -823,12 +823,12 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-minio-storage + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-minio-storage namespace: flyte spec: accessModes: @@ -837,36 +837,104 @@ spec: requests: storage: 1Gi storageClassName: manual - volumeName: flyte-sandbox-minio-storage + volumeName: flyte-demo-minio-storage +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: docker-registry + chart: docker-registry-2.2.2 + heritage: Helm + release: flyte-demo + name: docker-registry + namespace: flyte +spec: + minReadySeconds: 5 + replicas: 1 + selector: + matchLabels: + app: docker-registry + release: flyte-demo + template: + metadata: + annotations: + checksum/config: 2cb0adc9177b7c3b9677313b445701d8b4406e274b237c51fc71ee46ab96041f + checksum/secret: 45f39b1784cf14be20440fb8059d730c1d00e2d1c34e9329b76f021c0be8cfdd + labels: + app: docker-registry + release: flyte-demo + spec: + containers: + - command: + - /bin/registry + - serve + - /etc/docker/registry/config.yml + env: + - name: REGISTRY_HTTP_SECRET + valueFrom: + secretKeyRef: + key: haSharedSecret + name: docker-registry-secret + - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY + value: /var/lib/registry + image: registry:sandbox + imagePullPolicy: Never + livenessProbe: + httpGet: + path: / + port: 5000 + name: docker-registry + ports: + - containerPort: 5000 + readinessProbe: + httpGet: + path: / + port: 5000 + resources: {} + volumeMounts: + - mountPath: /etc/docker/registry + name: docker-registry-config + - mountPath: /var/lib/registry/ + name: data + securityContext: + fsGroup: 1000 + runAsUser: 1000 + volumes: + - configMap: + name: docker-registry-config + name: docker-registry-config + - emptyDir: {} + name: data --- apiVersion: apps/v1 kind: Deployment metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-binary helm.sh/chart: flyte-binary-v0.2.0 - name: flyte-sandbox + name: flyte-binary namespace: flyte spec: replicas: 1 selector: matchLabels: app.kubernetes.io/component: flyte-binary - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-binary strategy: type: Recreate template: metadata: annotations: - checksum/configuration: 81ae69b3a9ef93e793e7ee11db1e215b1ab6d873c60f9c8bf7895af85a3b2a04 - checksum/configuration-secret: 588da2ac84d45dd5285521c58bc6c9969924887acb9674d75802055c3a97d9bb + checksum/configuration: 2be3813f765fde4d94950399dbaee699bbc2a04700e57e68e14f979d8adab3cc + checksum/configuration-secret: 38cb5aaf45754ef23566c2beaa16a283e9ac7138cc064c2b4583ddf0a2481bab labels: app.kubernetes.io/component: flyte-binary - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-binary spec: containers: - args: @@ -887,7 +955,6 @@ spec: httpGet: path: /healthz port: http - initialDelaySeconds: 5 name: flyte ports: - containerPort: 8090 @@ -898,8 +965,13 @@ spec: httpGet: path: /readyz port: http - initialDelaySeconds: 5 - periodSeconds: 5 + periodSeconds: 1 + startupProbe: + failureThreshold: 30 + httpGet: + path: /healthz + port: http + periodSeconds: 1 volumeMounts: - mountPath: /etc/flyte/config.d name: config @@ -909,9 +981,9 @@ spec: initContainers: - args: - | - until nc -z flyte-sandbox-postgresql.flyte 5432; do + until nc -z postgresql.flyte 5432; do echo waiting for database - sleep 0.5 + sleep 0.1 done command: - sh @@ -919,17 +991,17 @@ spec: image: rancher/mirrored-library-busybox:1.34.1 imagePullPolicy: Never name: wait-for-db - serviceAccountName: flyte-sandbox + serviceAccountName: flyte-binary volumes: - name: config projected: sources: - configMap: - name: flyte-sandbox-config + name: flyte-binary-config - secret: - name: flyte-sandbox-config-secret + name: flyte-binary-config-secret - configMap: - name: flyte-sandbox-extra-config + name: flyte-demo-extra-config - emptyDir: {} name: webhook-certs --- @@ -937,26 +1009,26 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-console + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-console namespace: flyte spec: replicas: 1 selector: matchLabels: app.kubernetes.io/component: console - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-demo template: metadata: labels: app.kubernetes.io/component: console - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-demo spec: containers: - image: ghcr.io/flyteorg/flyte-client-v2:latest @@ -983,93 +1055,25 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: docker-registry - chart: docker-registry-2.2.2 - heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry - namespace: flyte -spec: - minReadySeconds: 5 - replicas: 1 - selector: - matchLabels: - app: docker-registry - release: flyte-sandbox - template: - metadata: - annotations: - checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 829c19e3c86dcb9b7d4c44e6a73463c6a6467d824200e87e2d7999f70dc0f5f9 - labels: - app: docker-registry - release: flyte-sandbox - spec: - containers: - - command: - - /bin/registry - - serve - - /etc/docker/registry/config.yml - env: - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - key: haSharedSecret - name: flyte-sandbox-docker-registry-secret - - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY - value: /var/lib/registry - image: registry:sandbox - imagePullPolicy: Never - livenessProbe: - httpGet: - path: / - port: 5000 - name: docker-registry - ports: - - containerPort: 5000 - readinessProbe: - httpGet: - path: / - port: 5000 - resources: {} - volumeMounts: - - mountPath: /etc/docker/registry - name: flyte-sandbox-docker-registry-config - - mountPath: /var/lib/registry/ - name: data - securityContext: - fsGroup: 1000 - runAsUser: 1000 - volumes: - - configMap: - name: flyte-sandbox-docker-registry-config - name: flyte-sandbox-docker-registry-config - - emptyDir: {} - name: data ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte spec: selector: matchLabels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/name: minio strategy: type: Recreate template: metadata: annotations: - checksum/credentials-secret: ecce809e3af19025d134846a9a81e163dd41df7e26abf2c6657895d9d13607a9 + checksum/credentials-secret: 70a50b2590b643d9455442f95a5505c0dc0931c95f5a5593efed8afd4035aa2a labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 @@ -1080,7 +1084,7 @@ spec: - podAffinityTerm: labelSelector: matchLabels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/name: minio topologyKey: kubernetes.io/hostname weight: 1 @@ -1102,12 +1106,12 @@ spec: valueFrom: secretKeyRef: key: root-user - name: flyte-sandbox-minio + name: minio - name: MINIO_ROOT_PASSWORD valueFrom: secretKeyRef: key: root-password - name: flyte-sandbox-minio + name: minio - name: MINIO_DEFAULT_BUCKETS value: flyte-data - name: MINIO_BROWSER @@ -1176,21 +1180,21 @@ spec: name: data securityContext: fsGroup: 1001 - serviceAccountName: flyte-sandbox-minio + serviceAccountName: minio volumes: - name: data persistentVolumeClaim: - claimName: flyte-sandbox-minio-storage + claimName: flyte-demo-minio-storage --- apiVersion: helm.cattle.io/v1 kind: HelmChartConfig metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 + helm.sh/chart: flyte-demo-0.1.0 name: traefik namespace: kube-system spec: @@ -1210,12 +1214,12 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-api + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-console namespace: flyte spec: rules: @@ -1223,36 +1227,22 @@ spec: paths: - backend: service: - name: flyte-sandbox-http + name: flyte-console port: - number: 8090 - path: /healthz - pathType: Exact - - backend: - service: - name: flyte-sandbox-http - port: - number: 8090 - path: /readyz - pathType: Exact - - backend: - service: - name: flyte-sandbox-http - port: - number: 8090 - path: /flyteidl2. + number: 80 + path: /v2 pathType: Prefix --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-console + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-api namespace: flyte spec: rules: @@ -1260,10 +1250,24 @@ spec: paths: - backend: service: - name: flyte-sandbox-console + name: flyte-binary-http port: - number: 80 - path: /v2 + number: 8090 + path: /healthz + pathType: Exact + - backend: + service: + name: flyte-binary-http + port: + number: 8090 + path: /readyz + pathType: Exact + - backend: + service: + name: flyte-binary-http + port: + number: 8090 + path: /flyteidl2. pathType: Prefix --- apiVersion: networking.k8s.io/v1 @@ -1272,12 +1276,12 @@ metadata: annotations: traefik.ingress.kubernetes.io/router.middlewares: flyte-strip-minio@kubernetescrd labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-minio + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-minio namespace: flyte spec: rules: @@ -1285,7 +1289,7 @@ spec: paths: - backend: service: - name: flyte-sandbox-minio + name: minio port: number: 9001 path: /minio @@ -1295,11 +1299,11 @@ apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 + helm.sh/chart: flyte-demo-0.1.0 name: strip-minio namespace: flyte spec: diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/demo-bundled/manifests/dev.yaml similarity index 86% rename from docker/sandbox-bundled/manifests/dev.yaml rename to docker/demo-bundled/manifests/dev.yaml index 595b22e457a..6adc7d3fd13 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/demo-bundled/manifests/dev.yaml @@ -295,14 +295,14 @@ automountServiceAccountToken: true kind: ServiceAccount metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte secrets: -- name: flyte-sandbox-minio +- name: minio --- apiVersion: v1 data: @@ -335,8 +335,8 @@ metadata: app: docker-registry chart: docker-registry-2.2.2 heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry-config + release: flyte-demo + name: docker-registry-config namespace: flyte --- apiVersion: v1 @@ -350,8 +350,8 @@ metadata: app: docker-registry chart: docker-registry-2.2.2 heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry-secret + release: flyte-demo + name: docker-registry-secret namespace: flyte type: Opaque --- @@ -362,11 +362,11 @@ data: kind: Secret metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte type: Opaque --- @@ -374,12 +374,12 @@ apiVersion: v1 kind: Endpoints metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-local + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-local namespace: flyte subsets: - addresses: @@ -397,7 +397,7 @@ kind: Endpoints metadata: labels: app.kubernetes.io/name: embedded-postgresql - name: flyte-sandbox-postgresql + name: postgresql namespace: flyte subsets: - addresses: @@ -410,56 +410,56 @@ apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox - app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-console + app: docker-registry + chart: docker-registry-2.2.2 + heritage: Helm + release: flyte-demo + name: docker-registry namespace: flyte spec: ports: - - name: http - port: 80 + - name: http-5000 + nodePort: 30000 + port: 5000 protocol: TCP - targetPort: http + targetPort: 5000 selector: - app.kubernetes.io/component: console - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox + app: docker-registry + release: flyte-demo + type: NodePort --- apiVersion: v1 kind: Service metadata: labels: - app: docker-registry - chart: docker-registry-2.2.2 - heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: flyte-demo + app.kubernetes.io/version: 1.16.1 + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-console namespace: flyte spec: ports: - - name: http-5000 - nodePort: 30000 - port: 5000 + - name: http + port: 80 protocol: TCP - targetPort: 5000 + targetPort: http selector: - app: docker-registry - release: flyte-sandbox - type: NodePort + app.kubernetes.io/component: console + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-demo --- apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-local + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-local namespace: flyte spec: clusterIP: None @@ -475,11 +475,11 @@ apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte spec: externalTrafficPolicy: Cluster @@ -492,7 +492,7 @@ spec: port: 9001 targetPort: minio-console selector: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/name: minio type: NodePort --- @@ -501,7 +501,7 @@ kind: Service metadata: labels: app.kubernetes.io/name: embedded-postgresql - name: flyte-sandbox-postgresql + name: postgresql namespace: flyte spec: ports: @@ -515,12 +515,12 @@ apiVersion: v1 kind: PersistentVolume metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-minio-storage + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-minio-storage namespace: flyte spec: accessModes: @@ -535,12 +535,12 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-minio-storage + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-minio-storage namespace: flyte spec: accessModes: @@ -549,53 +549,7 @@ spec: requests: storage: 1Gi storageClassName: manual - volumeName: flyte-sandbox-minio-storage ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox - app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-console - namespace: flyte -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: console - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox - template: - metadata: - labels: - app.kubernetes.io/component: console - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox - spec: - containers: - - image: ghcr.io/flyteorg/flyte-client-v2:latest - imagePullPolicy: Never - livenessProbe: - httpGet: - path: /v2 - port: http - initialDelaySeconds: 5 - periodSeconds: 30 - name: console - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - httpGet: - path: /v2 - port: http - initialDelaySeconds: 5 - periodSeconds: 10 + volumeName: flyte-demo-minio-storage --- apiVersion: apps/v1 kind: Deployment @@ -604,8 +558,8 @@ metadata: app: docker-registry chart: docker-registry-2.2.2 heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry + release: flyte-demo + name: docker-registry namespace: flyte spec: minReadySeconds: 5 @@ -613,15 +567,15 @@ spec: selector: matchLabels: app: docker-registry - release: flyte-sandbox + release: flyte-demo template: metadata: annotations: - checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 829c19e3c86dcb9b7d4c44e6a73463c6a6467d824200e87e2d7999f70dc0f5f9 + checksum/config: 2cb0adc9177b7c3b9677313b445701d8b4406e274b237c51fc71ee46ab96041f + checksum/secret: 45f39b1784cf14be20440fb8059d730c1d00e2d1c34e9329b76f021c0be8cfdd labels: app: docker-registry - release: flyte-sandbox + release: flyte-demo spec: containers: - command: @@ -633,7 +587,7 @@ spec: valueFrom: secretKeyRef: key: haSharedSecret - name: flyte-sandbox-docker-registry-secret + name: docker-registry-secret - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY value: /var/lib/registry image: registry:sandbox @@ -652,7 +606,7 @@ spec: resources: {} volumeMounts: - mountPath: /etc/docker/registry - name: flyte-sandbox-docker-registry-config + name: docker-registry-config - mountPath: /var/lib/registry/ name: data securityContext: @@ -660,8 +614,8 @@ spec: runAsUser: 1000 volumes: - configMap: - name: flyte-sandbox-docker-registry-config - name: flyte-sandbox-docker-registry-config + name: docker-registry-config + name: docker-registry-config - emptyDir: {} name: data --- @@ -669,25 +623,71 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: flyte-demo + app.kubernetes.io/version: 1.16.1 + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-console + namespace: flyte +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: console + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-demo + template: + metadata: + labels: + app.kubernetes.io/component: console + app.kubernetes.io/instance: flyte-demo + app.kubernetes.io/name: flyte-demo + spec: + containers: + - image: ghcr.io/flyteorg/flyte-client-v2:latest + imagePullPolicy: Never + livenessProbe: + httpGet: + path: /v2 + port: http + initialDelaySeconds: 5 + periodSeconds: 30 + name: console + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /v2 + port: http + initialDelaySeconds: 5 + periodSeconds: 10 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 - name: flyte-sandbox-minio + name: minio namespace: flyte spec: selector: matchLabels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/name: minio strategy: type: Recreate template: metadata: annotations: - checksum/credentials-secret: ecce809e3af19025d134846a9a81e163dd41df7e26abf2c6657895d9d13607a9 + checksum/credentials-secret: 70a50b2590b643d9455442f95a5505c0dc0931c95f5a5593efed8afd4035aa2a labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: minio helm.sh/chart: minio-12.6.7 @@ -698,7 +698,7 @@ spec: - podAffinityTerm: labelSelector: matchLabels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/name: minio topologyKey: kubernetes.io/hostname weight: 1 @@ -720,12 +720,12 @@ spec: valueFrom: secretKeyRef: key: root-user - name: flyte-sandbox-minio + name: minio - name: MINIO_ROOT_PASSWORD valueFrom: secretKeyRef: key: root-password - name: flyte-sandbox-minio + name: minio - name: MINIO_DEFAULT_BUCKETS value: flyte-data - name: MINIO_BROWSER @@ -794,21 +794,21 @@ spec: name: data securityContext: fsGroup: 1001 - serviceAccountName: flyte-sandbox-minio + serviceAccountName: minio volumes: - name: data persistentVolumeClaim: - claimName: flyte-sandbox-minio-storage + claimName: flyte-demo-minio-storage --- apiVersion: helm.cattle.io/v1 kind: HelmChartConfig metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 + helm.sh/chart: flyte-demo-0.1.0 name: traefik namespace: kube-system spec: @@ -828,12 +828,12 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-api + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-console namespace: flyte spec: rules: @@ -841,36 +841,22 @@ spec: paths: - backend: service: - name: flyte-sandbox-local + name: flyte-console port: - number: 8090 - path: /healthz - pathType: Exact - - backend: - service: - name: flyte-sandbox-local - port: - number: 8090 - path: /readyz - pathType: Exact - - backend: - service: - name: flyte-sandbox-local - port: - number: 8090 - path: /flyteidl2. + number: 80 + path: /v2 pathType: Prefix --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-console + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-api namespace: flyte spec: rules: @@ -878,10 +864,24 @@ spec: paths: - backend: service: - name: flyte-sandbox-console + name: flyte-demo-local port: - number: 80 - path: /v2 + number: 8090 + path: /healthz + pathType: Exact + - backend: + service: + name: flyte-demo-local + port: + number: 8090 + path: /readyz + pathType: Exact + - backend: + service: + name: flyte-demo-local + port: + number: 8090 + path: /flyteidl2. pathType: Prefix --- apiVersion: networking.k8s.io/v1 @@ -890,12 +890,12 @@ metadata: annotations: traefik.ingress.kubernetes.io/router.middlewares: flyte-strip-minio@kubernetescrd labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 - name: flyte-sandbox-minio + helm.sh/chart: flyte-demo-0.1.0 + name: flyte-demo-minio namespace: flyte spec: rules: @@ -903,7 +903,7 @@ spec: paths: - backend: service: - name: flyte-sandbox-minio + name: minio port: number: 9001 path: /minio @@ -913,11 +913,11 @@ apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: labels: - app.kubernetes.io/instance: flyte-sandbox + app.kubernetes.io/instance: flyte-demo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox + app.kubernetes.io/name: flyte-demo app.kubernetes.io/version: 1.16.1 - helm.sh/chart: flyte-sandbox-0.1.0 + helm.sh/chart: flyte-demo-0.1.0 name: strip-minio namespace: flyte spec: diff --git a/docker/sandbox-bundled/bin/k3d-entrypoint-flyte-sandbox-bootstrap.sh b/docker/sandbox-bundled/bin/k3d-entrypoint-flyte-sandbox-bootstrap.sh deleted file mode 100755 index fa4437c0d79..00000000000 --- a/docker/sandbox-bundled/bin/k3d-entrypoint-flyte-sandbox-bootstrap.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# Fix ownership of PostgreSQL data directory if it exists from a previous run -# (e.g., old bitnami PostgreSQL used uid 1001, embedded-postgres uses uid 999). -if [ -d /var/lib/flyte/storage/db ]; then - chown -R 999:999 /var/lib/flyte/storage/db -fi - -# Start embedded PostgreSQL in the background (must be running before k3s -# deploys the flyte-binary pod, which has a wait-for-db init container). -embedded-postgres & - -# Wait for PostgreSQL to be ready before proceeding -while ! [ -f /tmp/embedded-postgres-ready ]; do - sleep 0.5 -done - -flyte-sandbox-bootstrap - -KUBECONFIG_PATH="${K3S_KUBECONFIG_OUTPUT:-/etc/rancher/k3s/k3s.yaml}" -( - while ! [ -s "$KUBECONFIG_PATH" ]; do sleep 1; done - sed -i 's/: default/: flytev2-sandbox/g' "$KUBECONFIG_PATH" -) & diff --git a/docker/sandbox-bundled/bin/k3d-entrypoint.sh b/docker/sandbox-bundled/bin/k3d-entrypoint.sh deleted file mode 100755 index e2239597f1b..00000000000 --- a/docker/sandbox-bundled/bin/k3d-entrypoint.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -set -o errexit -set -o nounset - -LOGFILE="/var/log/k3d-entrypoints_$(date "+%y%m%d%H%M%S").log" - -touch "$LOGFILE" - -echo "[$(date -Iseconds)] Running k3d entrypoints..." >> "$LOGFILE" - -for entrypoint in /bin/k3d-entrypoint-*.sh ; do - echo "[$(date -Iseconds)] Running $entrypoint" >> "$LOGFILE" - "$entrypoint" >> "$LOGFILE" 2>&1 || exit 1 -done - -echo "[$(date -Iseconds)] Finished k3d entrypoint scripts!" >> "$LOGFILE" - -exec /bin/k3s "$@" diff --git a/manager/config.yaml b/manager/config.yaml index 7bab1fbb36a..9f214778c6f 100644 --- a/manager/config.yaml +++ b/manager/config.yaml @@ -19,7 +19,7 @@ manager: webhook: localCert: true certDir: /tmp/flyte/webhook/certs - serviceName: flyte-sandbox-local + serviceName: flyte-demo-local servicePort: 9443 # Executor configuration @@ -61,10 +61,10 @@ dataproxy: plugins: k8s: default-env-vars: - - FLYTE_AWS_ENDPOINT: "http://flyte-sandbox-minio.flyte.svc.cluster.local:9000" + - FLYTE_AWS_ENDPOINT: "http://minio.flyte.svc.cluster.local:9000" - FLYTE_AWS_ACCESS_KEY_ID: "minio" - FLYTE_AWS_SECRET_ACCESS_KEY: "miniostorage" - - _U_EP_OVERRIDE: "flyte-sandbox-local.flyte.svc.cluster.local:8090" + - _U_EP_OVERRIDE: "flyte-demo-local.flyte.svc.cluster.local:8090" - _U_INSECURE: "true" - _U_USE_ACTIONS: "1" diff --git a/secret/config/config.go b/secret/config/config.go index 065f8a1cb0b..1de3031d8f7 100644 --- a/secret/config/config.go +++ b/secret/config/config.go @@ -15,7 +15,7 @@ var defaultConfig = &Config{ }, Kubernetes: KubernetesConfig{ Namespace: "flyte", - ClusterName: "flyte-sandbox", + ClusterName: "flyte-demo", QPS: 100, Burst: 200, Timeout: "30s",