From 37fe0a3c790eb56eec18bee477cd1bb2d4d31130 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:08:47 -0700 Subject: [PATCH] Retag flyteagent image upon release (#5509) * Retag flyteagent image upon release Signed-off-by: Eduardo Apolinario * Run make helm Signed-off-by: Eduardo Apolinario --------- Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- .github/workflows/create_release.yml | 3 +++ charts/flyteagent/README.md | 2 +- charts/flyteagent/values.yaml | 2 +- deployment/agent/flyte_agent_helm_generated.yaml | 2 +- docker/sandbox-bundled/manifests/complete-agent.yaml | 6 +++--- docker/sandbox-bundled/manifests/complete.yaml | 4 ++-- docker/sandbox-bundled/manifests/dev.yaml | 4 ++-- script/prepare_artifacts.sh | 3 +++ script/release.sh | 3 +-- 9 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 152c1cd042..8fc6586901 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -88,6 +88,7 @@ jobs: [ datacatalog, flyteadmin, + flyteagent, flyteconsole, flytecopilot, flytepropeller, @@ -107,6 +108,8 @@ jobs: run: | if [ ${{ matrix.component }} = "flytecopilot" ]; then echo ::set-output name=version::$(yq eval '.configmap.copilot.plugins.k8s.co-pilot.image' charts/flyte-core/values.yaml | cut -d ":" -f 2 ) + elif [ ${{ matrix.component }} = "flyteagent" ]; then + echo ::set-output name=version::$(yq eval '.${{ matrix.component }}.image.tag' charts/flyteagent/values.yaml) else echo ::set-output name=version::$(yq eval '.${{ matrix.component }}.image.tag' charts/flyte-core/values.yaml) fi diff --git a/charts/flyteagent/README.md b/charts/flyteagent/README.md index c9619c8403..43058757c9 100644 --- a/charts/flyteagent/README.md +++ b/charts/flyteagent/README.md @@ -19,7 +19,7 @@ A Helm chart for Flyte agent | extraArgs | object | `{}` | Appends extra command line arguments to the main command | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | -| image.repository | string | `"ghcr.io/flyteorg/flyteagent"` | Docker image for flyteagent deployment | +| image.repository | string | `"cr.flyte.org/flyteorg/flyteagent"` | Docker image for flyteagent deployment | | image.tag | string | `"1.12.1-rc0"` | Docker image tag | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | nodeSelector for flyteagent deployment | diff --git a/charts/flyteagent/values.yaml b/charts/flyteagent/values.yaml index 4d02d59454..d5123c3d2e 100755 --- a/charts/flyteagent/values.yaml +++ b/charts/flyteagent/values.yaml @@ -21,7 +21,7 @@ agentSecret: replicaCount: 1 image: # -- Docker image for flyteagent deployment - repository: ghcr.io/flyteorg/flyteagent + repository: cr.flyte.org/flyteorg/flyteagent # FLYTEAGENT_IMAGE # -- Docker image tag tag: 1.12.1-rc0 # FLYTEAGENT_TAG # -- Docker image pull policy diff --git a/deployment/agent/flyte_agent_helm_generated.yaml b/deployment/agent/flyte_agent_helm_generated.yaml index 565ac70464..49b8f492c2 100644 --- a/deployment/agent/flyte_agent_helm_generated.yaml +++ b/deployment/agent/flyte_agent_helm_generated.yaml @@ -78,7 +78,7 @@ spec: - pyflyte - serve - agent - image: "ghcr.io/flyteorg/flyteagent:1.12.1-rc0" + image: "cr.flyte.org/flyteorg/flyteagent:1.12.1-rc0" imagePullPolicy: "IfNotPresent" name: flyteagent volumeMounts: diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index f261cb2623..d56bc39f38 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -816,7 +816,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: RXVLTERoMzJHdktxQlo4cQ== + haSharedSecret: S1dTb05oQlRYSmZ0MHI5aw== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1412,7 +1412,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 3154841b4ef47e9abff94afa4fb18f019a8ab1bd3bfd067ee69c58a6cfa72850 + checksum/secret: ba31bacfae25dc1d02d3c9cb0c3a633ee568ad397ad170d61542c719c0f36f63 labels: app: docker-registry release: flyte-sandbox @@ -1755,7 +1755,7 @@ spec: value: minio - name: FLYTE_AWS_SECRET_ACCESS_KEY value: miniostorage - image: ghcr.io/flyteorg/flyteagent:1.12.1-rc0 + image: cr.flyte.org/flyteorg/flyteagent:1.12.1-rc0 imagePullPolicy: IfNotPresent name: flyteagent ports: diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index ff5ba90edd..6268d178c3 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -796,7 +796,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: dmJQRFJKUkkxNUM4YlJVQg== + haSharedSecret: b2hFVnVDM3pGdjdxTEdFeQ== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1360,7 +1360,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 08894598b0a7ca264bfe377c29916b437ba3afbfcc12d664e0c28285913fca2c + checksum/secret: cd3db72802e13b4d01900ebce88a78b6ff20abe47153caeed0276b7db0653294 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index 5692b7e353..48d26004ec 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: amQ2V3I1QWxxWE5FR3ptbA== + haSharedSecret: c3I2c3ZwMUVyUU1wUHZSUA== proxyPassword: "" proxyUsername: "" kind: Secret @@ -934,7 +934,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 21b7819320348d53868271005a964a9644a024a2ea50c0936db78e55d1a923e3 + checksum/secret: 91fe7fa5ccabcb8deb88baf1d94d2284ed1f439f4ff2ddbe48457f6081cedd24 labels: app: docker-registry release: flyte-sandbox diff --git a/script/prepare_artifacts.sh b/script/prepare_artifacts.sh index 159ce40d7d..3893da8527 100644 --- a/script/prepare_artifacts.sh +++ b/script/prepare_artifacts.sh @@ -62,3 +62,6 @@ sed -i "s,repository:[^P]*# FLYTE_IMAGE,repository: cr.flyte.org/flyteorg/flyte- sed -i "s,tag:[^P]*# FLYTE_TAG,tag: ${VERSION} # FLYTE_TAG," ./charts/flyte-binary/values.yaml sed -i "s,repository:[^P]*# FLYTECOPILOT_IMAGE,repository: cr.flyte.org/flyteorg/flytecopilot-release # FLYTECOPILOT_IMAGE," ./charts/flyte-binary/values.yaml sed -i "s,tag:[^P]*# FLYTECOPILOT_TAG,tag: ${VERSION} # FLYTECOPILOT_TAG," ./charts/flyte-binary/values.yaml + +sed -i "s,tag:[^P]*# FLYTEAGENT_TAG,tag: ${VERSION} # FLYTEAGENT_TAG," ./charts/flyteagent/values.yaml +sed -i "s,repository:[^P]*# FLYTEAGENT_IMAGE,repository: cr.flyte.org/flyteorg/flyteagent-release # FLYTEAGENT_IMAGE," ./charts/flyteagent/values.yaml diff --git a/script/release.sh b/script/release.sh index 056ee1e253..9816fb6a7c 100755 --- a/script/release.sh +++ b/script/release.sh @@ -2,8 +2,7 @@ set -ex -# NOTE: Flyte and flytekit should be released at the same time. If not, Flyte chart will use a flyteagent image that does not exist. -FLYTEKIT_TAG=$(echo "${VERSION}" | sed 's/^v//') +FLYTEKIT_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/flytekit/releases/latest" | jq -r .tag_name | sed 's/^v//') FLYTECONSOLE_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/flyteconsole/releases/latest" | jq -r .tag_name) # bump latest release of flyte component in helm