Files
cozystack/packages/system/capi-providers-bootstrap/Makefile
T
Myasnikov DaniilandClaude Opus 4.8 b5cc2ae120 fix(kubernetes): address review findings on Talos worker bootstrap
- talos-reconcile-job: emit a `---` separator inside the nodeGroups
  range so a tenant with multiple node groups renders valid
  multi-document YAML instead of two Jobs concatenated into one doc
- talos-reconcile + bootstrap-token jobs: add a restricted
  securityContext (drop ALL caps, no privilege escalation, read-only
  root fs) and CPU/memory requests+limits; drop the unused management
  SA token mount on the bootstrap-token job, which only talks to the
  tenant apiserver via the mounted admin kubeconfig
- migration 44: list Helm-managed resources by the
  app.kubernetes.io/managed-by=Helm label, not meta.helm.sh/release-name
  (an annotation, so it never matched as a --selector — the keep
  annotation was silently never applied)
- cluster.yaml: fail fast on a malformed nodeHealthCheck.maxUnhealthy
  rather than silently coercing it to 0 via `| int`
- config: make helm-install-disable-wait parsing genuinely
  case-insensitive (EqualFold + trim) to match its documented contract
- capi-providers bootstrap/cpprovider Makefiles: guard the
  patches/*.diff loop against an empty glob

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-06-23 14:45:53 +05:00

38 lines
1.7 KiB
Makefile

export NAME=capi-providers-bootstrap
export NAMESPACE=cozy-cluster-api
include ../../../hack/package.mk
.PHONY: update
# Upstream Talos bootstrap provider (CABPT) release pinned by tag. Keep
# in lockstep with templates/providers.yaml (BootstrapProvider spec.version)
# and templates/configmaps.yaml (ConfigMap name) — clusterctl matches the
# bundle by tag.
CABPT_UPSTREAM_VERSION = v0.6.12
# Refreshes files/bootstrap-components-talos.yaml + files/components-talos.gz
# from upstream CABPT release artifacts at CABPT_UPSTREAM_VERSION with
# patches/ applied (the cozystack-side rename of the default ServiceAccount
# to cabpt-manager so capi-operator does not rewrite the SA namespace —
# see PR #2610 for the full rationale). Mirrors the symmetric update
# target in packages/system/capi-providers-cpprovider/Makefile.
#
# Run when bumping CABPT_UPSTREAM_VERSION or editing patches/. The
# metadata-talos.yaml file is checked in as-is from upstream and is not
# refreshed here (it changes far less often and a manual curl+diff is
# enough when CABPT cuts a new release series).
update:
@command -v patch >/dev/null || { echo "patch(1) required"; exit 1; }
rm -rf .update-tmp
mkdir .update-tmp
curl -sSL "https://github.com/siderolabs/cluster-api-bootstrap-provider-talos/releases/download/$(CABPT_UPSTREAM_VERSION)/bootstrap-components.yaml" \
-o .update-tmp/bootstrap-components.yaml
for p in patches/*.diff; do \
[ -e "$$p" ] || continue; \
(cd .update-tmp && patch bootstrap-components.yaml < ../$$p) || exit 1; \
done
mv .update-tmp/bootstrap-components.yaml files/bootstrap-components-talos.yaml
gzip -nc files/bootstrap-components-talos.yaml > files/components-talos.gz
rm -rf .update-tmp