diff --git a/.github/workflows/helm-charts.yaml b/.github/workflows/helm-charts.yaml index dfa968fc74c..caf1a956ac5 100644 --- a/.github/workflows/helm-charts.yaml +++ b/.github/workflows/helm-charts.yaml @@ -1,6 +1,7 @@ name: Package & Push Flyte Helm Charts on: + pull_request: push: branches: - master @@ -13,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - chart: ["flyte-binary", "flyte-core", "flyte-agent"] + chart: ["flyte-binary", "flyte-core", "flyteagent"] steps: - name: Checkout uses: actions/checkout@v3 @@ -25,7 +26,7 @@ jobs: registry: ghcr.io username: "${{ secrets.FLYTE_BOT_USERNAME }}" password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Publish Helm chart to GHCR + - name: Build helm chart working-directory: charts run: | helm dep update ${{ matrix.chart }} @@ -33,4 +34,13 @@ jobs: --app-version=${{ github.sha }} \ --version=0.0-${{ github.sha }} \ ${{ matrix.chart }} + + if ! ls ${{ matrix.chart }}-* 2>&1 >/dev/null; + then + echo "Chart package not found." + exit 1 + fi + - name: Publish Helm chart to GHCR + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + run: helm push ${{ matrix.chart }}-*.tgz oci://ghcr.io/flyteorg/helm-charts diff --git a/.gitignore b/.gitignore index 5509304e690..08215d1d84a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ __pycache__/ /charts/flyte-deps/charts /charts/flyte/Chart.lock /charts/flyte-binary/Chart.lock -/charts/flyte-agent/Chart.lock +/charts/flyteagent/Chart.lock /charts/flyte-deps/Chart.lock /charts/flyte-core/Chart.lock /docker/sandbox-lite/storage/charts diff --git a/charts/flyte-binary/Chart.yaml b/charts/flyte-binary/Chart.yaml index c482828ebcf..b237b9f2447 100644 --- a/charts/flyte-binary/Chart.yaml +++ b/charts/flyte-binary/Chart.yaml @@ -19,4 +19,4 @@ dependencies: condition: flyteagent.enabled alias: flyteagent version: v0.1.10 # VERSION - repository: file://../flyte-agent # REPOSITORY \ No newline at end of file + repository: file://../flyteagent # REPOSITORY \ No newline at end of file diff --git a/charts/flyte-binary/README.md b/charts/flyte-binary/README.md index 05bc00b6783..c81a0f9e72d 100644 --- a/charts/flyte-binary/README.md +++ b/charts/flyte-binary/README.md @@ -8,7 +8,7 @@ Chart for basic single Flyte executable deployment | Repository | Name | Version | |------------|------|---------| -| file://../flyte-agent | flyteagent(flyteagent) | v0.1.10 | +| file://../flyteagent | flyteagent(flyteagent) | v0.1.10 | ## Values diff --git a/charts/flyte-core/Chart.yaml b/charts/flyte-core/Chart.yaml index a7134d34481..47d0817a6d3 100644 --- a/charts/flyte-core/Chart.yaml +++ b/charts/flyte-core/Chart.yaml @@ -8,4 +8,4 @@ dependencies: condition: flyteagent.enabled alias: flyteagent version: v0.1.10 # VERSION - repository: file://../flyte-agent # REPOSITORY \ No newline at end of file + repository: file://../flyteagent # REPOSITORY \ No newline at end of file diff --git a/charts/flyte-core/README.md b/charts/flyte-core/README.md index e14342ff4b6..0be1360f436 100644 --- a/charts/flyte-core/README.md +++ b/charts/flyte-core/README.md @@ -8,7 +8,7 @@ A Helm chart for Flyte core | Repository | Name | Version | |------------|------|---------| -| file://../flyte-agent | flyteagent(flyteagent) | v0.1.10 | +| file://../flyteagent | flyteagent(flyteagent) | v0.1.10 | ### Flyte INSTALLATION: - [Install helm 3](https://helm.sh/docs/intro/install/) diff --git a/charts/flyte-agent/.helmignore b/charts/flyteagent/.helmignore similarity index 100% rename from charts/flyte-agent/.helmignore rename to charts/flyteagent/.helmignore diff --git a/charts/flyte-agent/Chart.yaml b/charts/flyteagent/Chart.yaml similarity index 100% rename from charts/flyte-agent/Chart.yaml rename to charts/flyteagent/Chart.yaml diff --git a/charts/flyte-agent/README.md b/charts/flyteagent/README.md similarity index 100% rename from charts/flyte-agent/README.md rename to charts/flyteagent/README.md diff --git a/charts/flyte-agent/templates/_helpers.tpl b/charts/flyteagent/templates/_helpers.tpl similarity index 100% rename from charts/flyte-agent/templates/_helpers.tpl rename to charts/flyteagent/templates/_helpers.tpl diff --git a/charts/flyte-agent/templates/agent/deployment.yaml b/charts/flyteagent/templates/agent/deployment.yaml similarity index 100% rename from charts/flyte-agent/templates/agent/deployment.yaml rename to charts/flyteagent/templates/agent/deployment.yaml diff --git a/charts/flyte-agent/templates/agent/secret.yaml b/charts/flyteagent/templates/agent/secret.yaml similarity index 100% rename from charts/flyte-agent/templates/agent/secret.yaml rename to charts/flyteagent/templates/agent/secret.yaml diff --git a/charts/flyte-agent/templates/agent/service.yaml b/charts/flyteagent/templates/agent/service.yaml similarity index 100% rename from charts/flyte-agent/templates/agent/service.yaml rename to charts/flyteagent/templates/agent/service.yaml diff --git a/charts/flyte-agent/templates/agent/serviceaccount.yaml b/charts/flyteagent/templates/agent/serviceaccount.yaml similarity index 100% rename from charts/flyte-agent/templates/agent/serviceaccount.yaml rename to charts/flyteagent/templates/agent/serviceaccount.yaml diff --git a/charts/flyte-agent/values.yaml b/charts/flyteagent/values.yaml similarity index 94% rename from charts/flyte-agent/values.yaml rename to charts/flyteagent/values.yaml index 446ab25f647..c0da011a113 100755 --- a/charts/flyte-agent/values.yaml +++ b/charts/flyteagent/values.yaml @@ -2,9 +2,9 @@ # FLYTE_AGENT SETTINGS # --------------------------------------------------------------------- -# nameOverride String to override flyte-agent.name template +# nameOverride String to override flyteagent.name template nameOverride: "" -# fullnameOverride String to override flyte-agent.fullname template +# fullnameOverride String to override flyteagent.fullname template fullnameOverride: "" # commonLabels Add labels to all the deployed resources commonLabels: {} diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/config.go b/flyteplugins/go/tasks/plugins/webapi/agent/config.go index 09631141770..1045a7cf80a 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/config.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/config.go @@ -40,7 +40,7 @@ var ( }, }, DefaultAgent: Agent{ - Endpoint: "dns:///flyte-agent.flyte.svc.cluster.local:80", + Endpoint: "dns:///flyteagent.flyte.svc.cluster.local:80", Insecure: true, DefaultTimeout: config.Duration{Duration: 10 * time.Second}, }, diff --git a/script/generate_helm.sh b/script/generate_helm.sh index 0ea1c851091..a41e39d8c4f 100755 --- a/script/generate_helm.sh +++ b/script/generate_helm.sh @@ -37,7 +37,7 @@ helm template flyte -n flyte ${DIR}/../charts/flyte-deps/ ${HELM_CAPABILITIES} - helm template flyte -n flyte ${DIR}/../charts/flyte-binary/ ${HELM_CAPABILITIES} --debug > ${DIR}/../deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml # Generate manifest flyte agent -helm template flyte -n flyte ${DIR}/../charts/flyte-agent/ ${HELM_CAPABILITIES} --debug > ${DIR}/../deployment/agent/flyte_agent_helm_generated.yaml +helm template flyte -n flyte ${DIR}/../charts/flyteagent/ ${HELM_CAPABILITIES} --debug > ${DIR}/../deployment/agent/flyte_agent_helm_generated.yaml echo "Generating helm docs"