Skip to content

fix(kubernetes): block metrics-server install on Talos clusters#594

Merged
hlts2 merged 2 commits into
masterfrom
fix/metrics-server-installation-for-talos
Jun 22, 2026
Merged

fix(kubernetes): block metrics-server install on Talos clusters#594
hlts2 merged 2 commits into
masterfrom
fix/metrics-server-installation-for-talos

Conversation

@hlts2

@hlts2 hlts2 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Fixes #422

Problem

When adding a marketplace app to a Talos cluster, the CLI reports a successful install even though nothing is actually installed:

civo k8s apps add metrics-server -c talosmetrics01
The application was installed in the Kubernetes cluster talosmetrics01

The marketplace metrics-server is only enabled for k3s clusters (https://github.com/civo/kubernetes-marketplace/blob/master/metrics-server/manifest.yaml), so the user has no way to know the install silently did nothing.

Scope

Only metrics-server is blocked on Talos. Other marketplace apps install fine on Talos clusters, so blocking all apps (as explored in #593) would be too broad. On Talos, metrics-server must be installed separately (https://docs.siderolabs.com/kubernetes-guides/monitoring-and-observability/deploy-metrics-server).

Fix

  • checkAppPlan now also returns the index of the resolved app, so validation runs against the canonical app name rather than raw user input. This closes the partial-match bypass (e.g. metrics resolves to metrics-server via strings.Contains).
  • RequestedSplit exits early with a clear message when the resolved app is unsupported on the target cluster type.
  • Added a unsupportedAppsByClusterType table with a TODO to remove it once cluster_type is surfaced through the API/civogo.

Tests

  • Table-driven tests for isAppCompatibleWithClusterType.

Supersedes #593.

The marketplace metrics-server is only enabled for k3s clusters, so
installing it on a Talos cluster silently reports success without
actually installing anything. Validate the resolved canonical app name
after checkAppPlan (which resolves partial matches like "metrics" ->
"metrics-server") and exit early when the app is unsupported on the
target cluster type.

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@hlts2

hlts2 commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Manual verification

Confirmed the behavior against real clusters.

Talos cluster — blocked with a clear error:

❯ ./cli kubernetes applications add metrics-server --cluster hiroto-talos
Error: metrics-server cannot be installed via the marketplace on talos clusters

k3s cluster — installs as before:

❯ ./cli kubernetes applications add metrics-server --cluster hiroto-k3s-1-36
The application was installed in the Kubernetes cluster hiroto-k3s-1-36

Talos cluster — other applications still install fine (no regression):

❯ ./cli kubernetes applications add loki --cluster hiroto-talos
The application was installed in the Kubernetes cluster hiroto-talos

Only metrics-server is blocked on Talos; all other marketplace apps are unaffected.

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@hlts2 hlts2 self-assigned this Jun 22, 2026
@hlts2 hlts2 marked this pull request as ready for review June 22, 2026 05:58
@hlts2 hlts2 requested a review from jokestax June 22, 2026 06:02
Comment thread go.mod
@hlts2 hlts2 merged commit 7af2dee into master Jun 22, 2026
3 checks passed
@hlts2 hlts2 deleted the fix/metrics-server-installation-for-talos branch June 22, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Talos kubernetes-marketplace compatibility - block install attempt for cluster-type talos

2 participants