Skip to content

feat: ensure deploy-dev and deploy-prod jobs create or update cluster#1332

Merged
botantler[bot] merged 16 commits intomainfrom
copilot/ensure-cluster-create-update-jobs
Apr 11, 2026
Merged

feat: ensure deploy-dev and deploy-prod jobs create or update cluster#1332
botantler[bot] merged 16 commits intomainfrom
copilot/ensure-cluster-create-update-jobs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

Summary

Both deploy-dev (ci.yaml) and deploy-prod (cd.yaml) jobs now ensure a cluster exists before pushing manifests. Each job checks cluster existence via ksail cluster info and runs cluster update if it exists, or cluster create if not.

Changes

  • Added GITHUB_ACTOR and GITHUB_TOKEN env vars to the create/update step (required by the localRegistry.registry field in ksail.dev.yaml and ksail.prod.yaml)- Added "
  • Removed commented-out TODO blocks referencing ksail#3674 and ksail#3675 in both workflows

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Dev and Production GitHub Actions deploy workflows to ensure the target KSail (Omni) cluster is present/updated before publishing and reconciling the Flux OCI workload.

Changes:

  • Added a “Create or update cluster” step in the deploy-dev job (ci.yaml) using ksail cluster create || ksail cluster update.
  • Added a matching “Create or update cluster” step in the deploy-prod job (cd.yaml).
  • Removed previously commented-out TODO blocks referencing ksail issues.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/ci.yaml Adds KSail cluster create/update before dev workload push/reconcile.
.github/workflows/cd.yaml Adds KSail cluster create/update before prod workload push/reconcile.

Comment thread .github/workflows/ci.yaml Outdated
Comment thread .github/workflows/ci.yaml
Comment thread .github/workflows/cd.yaml
Comment thread .github/workflows/cd.yaml
@devantler
Copy link
Copy Markdown
Contributor

It would probably be best to do a precheck to see if the cluster exists, to determine what command to run.

@devantler devantler force-pushed the copilot/ensure-cluster-create-update-jobs branch from 1b29197 to cdd065a Compare April 7, 2026 18:03
@botantler botantler Bot enabled auto-merge April 7, 2026 18:03
…ate steps

Both ksail.dev.yaml and ksail.prod.yaml reference ${GITHUB_ACTOR} and
${GITHUB_TOKEN} in localRegistry.registry. GITHUB_TOKEN is not a default
GitHub Actions env var, so it must be set explicitly for the cluster
create/update step.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 7, 2026 18:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/cd.yaml
Copilot AI review requested due to automatic review settings April 7, 2026 18:12
@devantler devantler force-pushed the copilot/ensure-cluster-create-update-jobs branch from bf147be to b4a5a48 Compare April 7, 2026 18:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/ci.yaml
Comment thread .github/workflows/ci.yaml Outdated
Comment thread .github/workflows/cd.yaml
…eate/update

Use `ksail cluster info` to determine whether the cluster already exists.
If the cluster is found, run `cluster update`; otherwise run `cluster create`.
This avoids the fragile `create || update` pattern that masks unexpected
create failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@devantler devantler force-pushed the copilot/ensure-cluster-create-update-jobs branch from b4a5a48 to 59c8d5c Compare April 7, 2026 18:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/cd.yaml Outdated
Comment thread .github/workflows/ci.yaml Outdated
Comment thread talos-prod/cluster/user-namespaces.yaml
Reference: devantler-tech/ksail#3878

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
devantler and others added 2 commits April 11, 2026 09:50
…esolved)

ksail v6.4.5 implements provider-aware cluster info that queries
Omni API first, then Kube API. This enables the cleaner pattern:
  if cluster info; then update; else create; fi

Also bumps ksail-cluster action from v5.91.6 to v6.4.5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Includes fix for kubeconfig context name mismatch (ksail#3904)
and nil pointer prevention in Helm client (ksail#3911).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 11, 2026 11:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@botantler botantler Bot added this pull request to the merge queue Apr 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 11, 2026
@devantler devantler added this pull request to the merge queue Apr 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 11, 2026
…etch

The KUBE_CONFIG secret becomes stale when the Omni cluster is
recreated. Replace it with a dynamic kubeconfig fetch from the
Omni API via omnictl, which always returns valid credentials.

The kubeconfig step uses continue-on-error because the cluster
may not exist yet (cluster create handles kubeconfig itself).

Workaround for devantler-tech/ksail#3922

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@botantler botantler Bot enabled auto-merge April 11, 2026 12:01
@botantler botantler Bot added this pull request to the merge queue Apr 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 11, 2026
@devantler devantler added this pull request to the merge queue Apr 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 11, 2026
omnictl's --force-context-name flag is silently ignored when no
pre-existing kubeconfig exists (fresh CI runner). Fall back to
kubectl config rename-context to ensure the context name matches
what ksail expects.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 11, 2026 12:32
@botantler botantler Bot enabled auto-merge April 11, 2026 12:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/cd.yaml
Comment thread .github/workflows/cd.yaml
Comment thread .github/workflows/ci.yaml
Verify the downloaded omnictl binary against the release
sha256sum.txt before installing it, mitigating supply-chain
risk.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@botantler
Copy link
Copy Markdown
Contributor

botantler Bot commented Apr 11, 2026

🎉 This PR is included in version 2.33.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants