Skip to content

Conversation

cuisongliu
Copy link
Contributor

This pull request introduces improvements to the release workflow and deployment process, focusing on better handling of image targets, enhanced support for multi-architecture images, and the addition of a dedicated job for building and pushing Sealos images. It also adds a new installation script and refines deployment scripts for more robust configuration handling.

Release workflow enhancements:

  • Added dynamic preparation of image lists for Docker metadata extraction by introducing a new step to build the list based on available repositories, improving flexibility and maintainability in the workflow (.github/workflows/release.yml). [1] [2]
  • Refined the logic for constructing the ALIYUN_REPO environment variable to ensure correct formatting when registry and username secrets are present (.github/workflows/release.yml).

Sealos image support and multi-architecture builds:

  • Added a new release-sealos-images job to the workflow, which builds and pushes cluster images for multiple platforms (amd64 and arm64), and includes improved login steps for various registries (.github/workflows/release.yml).
  • Updated the Kubefile to support multi-architecture builds by using platform-specific registry directories and the TARGETARCH build argument (core/deploy/Kubefile).

Deployment and installation improvements:

  • Added a new installation script with logging and error handling to automate the download and setup of Sealos (.github/scripts/install.sh).
  • Improved the initialization script to robustly fetch the cloudDomain configuration, ensuring ingress resources are created only when the domain is specified (core/deploy/scripts/init.sh).

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Comment on lines 331 to 336
- name: cache images
working-directory: core/deploy
run: |
sudo sealos login -u "${{ github.repository_owner }}" -p "${{ secrets.GITHUB_TOKEN }}" ghcr.io
sed -i "s#${{ env.GHCR_REPO }}:latest#${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}#g" manifests/deploy.yaml.tmpl
sudo sealos registry save --registry-dir=registry_amd64 --arch amd64 .

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Obtain version before rewriting manifest

In the release-sealos-images job the “cache images” step rewrites manifests/deploy.yaml.tmpl using ${{ steps.meta.outputs.version }}, but the meta step is defined later in the job. At runtime this output is empty, so the sed replacement produces image references like ghcr.io/<repo>: and sealos registry save will fail with an invalid reference format. Run the metadata action before this step or reuse the version generated in the previous job before editing the manifest.

Useful? React with 👍 / 👎.

@cuisongliu cuisongliu marked this pull request as draft October 11, 2025 06:49
@cuisongliu cuisongliu force-pushed the fix-cluster-images branch 3 times, most recently from 8f6b625 to 43ce187 Compare October 11, 2025 08:43
@cuisongliu cuisongliu force-pushed the fix-cluster-images branch 5 times, most recently from cf7e774 to 9df5f2c Compare October 11, 2025 10:48
@cuisongliu cuisongliu marked this pull request as ready for review October 11, 2025 12:57
@cuisongliu
Copy link
Contributor Author

@codex

Copy link

To use Codex here, create an environment for this repo.

@cuisongliu
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

GHCR_REPO: ghcr.io/${{ github.repository }}
ALIYUN_REGISTRY: ${{ secrets.ALIYUN_REGISTRY }}
ALIYUN_REPO: ${{ secrets.ALIYUN_REPO != '' && secrets.ALIYUN_REPO || secrets.ALIYUN_USERNAME != '' && format('{0}/{1}/{2}', secrets.ALIYUN_REGISTRY, secrets.ALIYUN_USERNAME, 'aiproxy') || '' }}
ALIYUN_REPO: ${{ secrets.ALIYUN_REPO != '' && secrets.ALIYUN_REPO || (secrets.ALIYUN_REGISTRY != '' && secrets.ALIYUN_USERNAME != '' && format('{0}/{1}/{2}', secrets.ALIYUN_REGISTRY, secrets.ALIYUN_USERNAME, 'aiproxy')) || '' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it as ${{ secrets.ALIYUN_REPO != '' && secrets.ALIYUN_REPO || (secrets.ALIYUN_REGISTRY != '' && secrets.ALIYUN_USERNAME != '') && format('{0}/{1}/{2}', secrets.ALIYUN_REGISTRY, secrets.ALIYUN_USERNAME, 'aiproxy') || '' }} better conforms to the && || syntax.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cuisongliu cuisongliu requested a review from zijiren233 October 15, 2025 11:32
@zijiren233 zijiren233 merged commit 5aa3862 into labring:main Oct 16, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants