mirror of
https://github.com/rancher/k3k.git
synced 2026-08-19 12:26:17 +00:00
Introduce hosted control plane mode for k3k virtual clusters, including API types, controller logic, server endpoint handling, CLI flags, CRD updates, kubeconfig generation, and examples. Co-Authored-By: RuFlo <ruv@ruv.net>
20 lines
675 B
Bash
Executable File
20 lines
675 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eou pipefail
|
|
|
|
|
|
CONTROLLER_TOOLS_VERSION=v0.20.0
|
|
|
|
# This will return non-zero until all of our objects in ./pkg/apis can generate valid crds.
|
|
# allowDangerousTypes is needed for struct that use floats
|
|
go run sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_TOOLS_VERSION} \
|
|
crd:generateEmbeddedObjectMeta=true,allowDangerousTypes=false \
|
|
object paths=./pkg/apis/... \
|
|
output:crd:dir=./charts/k3k/templates/crds
|
|
|
|
# add the 'helm.sh/resource-policy: keep' annotation to the CRDs
|
|
for f in ./charts/k3k/templates/crds/*.yaml; do
|
|
echo "Annotating $f"
|
|
#yq -c -i '.metadata.annotations["helm.sh/resource-policy"] = "keep"' "$f"
|
|
done
|