From b1a20b27d8f58a24c4af66cd4e34087b579ddd60 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 8 Sep 2023 11:09:24 -0700 Subject: [PATCH 1/3] fix ci Signed-off-by: Kevin Su --- .github/workflows/helm-charts.yaml | 14 ++++++++++++-- charts/flyte-agent/Chart.yaml | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-charts.yaml b/.github/workflows/helm-charts.yaml index 2a9cb9b88f..be5e7ff15e 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 @@ -25,11 +26,20 @@ 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 package \ --app-version=${{ github.sha }} \ --version=0.0-${{ github.sha }} \ ${{ matrix.chart }} - helm push ${{ matrix.chart }}-*.tgz oci://ghcr.io/flyteorg/helm-charts + + 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 \ No newline at end of file diff --git a/charts/flyte-agent/Chart.yaml b/charts/flyte-agent/Chart.yaml index 33c2ec4b02..effc58ba3d 100644 --- a/charts/flyte-agent/Chart.yaml +++ b/charts/flyte-agent/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: flyteagent +name: flyte-agent description: A Helm chart for Flyte agent type: application version: v0.1.10 # VERSION From 4753f5b5494ae6924e7b47042fafe7414b1618aa Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 8 Sep 2023 11:17:23 -0700 Subject: [PATCH 2/3] update Signed-off-by: Kevin Su --- .github/workflows/helm-charts.yaml | 2 +- .gitignore | 2 +- charts/flyte-binary/Chart.yaml | 2 +- charts/flyte-binary/README.md | 2 +- charts/flyte-core/Chart.yaml | 2 +- charts/flyte-core/README.md | 2 +- charts/{flyte-agent => flyteagent}/.helmignore | 0 charts/{flyte-agent => flyteagent}/Chart.yaml | 2 +- charts/{flyte-agent => flyteagent}/README.md | 0 charts/{flyte-agent => flyteagent}/templates/_helpers.tpl | 0 .../templates/agent/deployment.yaml | 0 .../{flyte-agent => flyteagent}/templates/agent/secret.yaml | 0 .../{flyte-agent => flyteagent}/templates/agent/service.yaml | 0 .../templates/agent/serviceaccount.yaml | 0 charts/{flyte-agent => flyteagent}/values.yaml | 4 ++-- flyteplugins/go/tasks/plugins/webapi/agent/config.go | 2 +- script/generate_helm.sh | 2 +- 17 files changed, 11 insertions(+), 11 deletions(-) rename charts/{flyte-agent => flyteagent}/.helmignore (100%) rename charts/{flyte-agent => flyteagent}/Chart.yaml (85%) rename charts/{flyte-agent => flyteagent}/README.md (100%) rename charts/{flyte-agent => flyteagent}/templates/_helpers.tpl (100%) rename charts/{flyte-agent => flyteagent}/templates/agent/deployment.yaml (100%) rename charts/{flyte-agent => flyteagent}/templates/agent/secret.yaml (100%) rename charts/{flyte-agent => flyteagent}/templates/agent/service.yaml (100%) rename charts/{flyte-agent => flyteagent}/templates/agent/serviceaccount.yaml (100%) rename charts/{flyte-agent => flyteagent}/values.yaml (94%) diff --git a/.github/workflows/helm-charts.yaml b/.github/workflows/helm-charts.yaml index 8bb67a35f4..7fd19b5711 100644 --- a/.github/workflows/helm-charts.yaml +++ b/.github/workflows/helm-charts.yaml @@ -14,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 diff --git a/.gitignore b/.gitignore index 5509304e69..08215d1d84 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 c482828ebc..b237b9f244 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 05bc00b678..c81a0f9e72 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 a7134d3448..47d0817a6d 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 e14342ff4b..0be1360f43 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 85% rename from charts/flyte-agent/Chart.yaml rename to charts/flyteagent/Chart.yaml index effc58ba3d..33c2ec4b02 100644 --- a/charts/flyte-agent/Chart.yaml +++ b/charts/flyteagent/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: flyte-agent +name: flyteagent description: A Helm chart for Flyte agent type: application version: v0.1.10 # VERSION 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 446ab25f64..c0da011a11 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 58355c5ee5..475355e864 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 0ea1c85109..a41e39d8c4 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" From d6934aa522c8730aa4fa13cef4ddbe3db4be8a1d Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 8 Sep 2023 11:41:53 -0700 Subject: [PATCH 3/3] add newline Signed-off-by: Kevin Su --- .github/workflows/helm-charts.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-charts.yaml b/.github/workflows/helm-charts.yaml index 7fd19b5711..caf1a956ac 100644 --- a/.github/workflows/helm-charts.yaml +++ b/.github/workflows/helm-charts.yaml @@ -43,4 +43,4 @@ jobs: - 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 \ No newline at end of file + helm push ${{ matrix.chart }}-*.tgz oci://ghcr.io/flyteorg/helm-charts