diff --git a/.gitattributes b/.gitattributes index bf6a786d4..a4feb81b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,7 @@ packages/system/capi-providers-infraprovider/images/cluster-api-provider-kubevir packages/system/cilium/images/cilium-operator/patches/*.diff -whitespace packages/system/seaweedfs/images/seaweedfs/patches/*.diff -whitespace packages/system/kamaji/images/kamaji/patches/*.diff -whitespace +packages/system/capi-operator/charts/** linguist-vendored +packages/system/capi-operator/files/bridge-*.yaml linguist-generated +packages/system/capi-providers-core/files/*-components*.yaml linguist-generated +packages/system/capi-providers-bootstrap/files/*-components*.yaml linguist-generated diff --git a/hack/capi-core-components_test.bats b/hack/capi-core-components_test.bats deleted file mode 100644 index e8c5941a3..000000000 --- a/hack/capi-core-components_test.bats +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bats -# capi-providers-core ships the Cluster API core manifests twice: as -# files/core-components.yaml, which a reviewer reads, and as files/components.gz, -# which the chart mounts into the cluster. Both are edited by hand; this package -# has no `make components`. An edit to the YAML alone reviews cleanly and changes -# nothing in a cluster, which is how the startupProbe from #2946 stayed out of -# the shipped manager. This holds the two files to the same bytes. -# -# The comparison is on the decompressed bytes, so the gzip header plays no part -# in it. `gzip -n` is still the flag to regenerate with: without it the header -# carries a timestamp and every regeneration rewrites the committed blob even -# when the input has not changed. - -load test_helper - -REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)" -FILES="$REPO_ROOT/packages/system/capi-providers-core/files" - -@test "core provider components.gz matches core-components.yaml" { - [ -f "$FILES/core-components.yaml" ] || { echo "missing core-components.yaml" >&2; return 1; } - [ -f "$FILES/components.gz" ] || { echo "missing components.gz" >&2; return 1; } - - local work; work="$(mktemp -d)" - gzip -dc "$FILES/components.gz" > "$work/decompressed.yaml" - if ! cmp -s "$work/decompressed.yaml" "$FILES/core-components.yaml"; then - echo "components.gz does not match core-components.yaml" >&2 - echo "the chart mounts the blob, so the cluster would run what the YAML does not say" >&2 - echo "regenerate: gzip -9 -n -c files/core-components.yaml > files/components.gz" >&2 - diff "$work/decompressed.yaml" "$FILES/core-components.yaml" | head -20 >&2 || true - rm -rf "$work" - return 1 - fi - rm -rf "$work" -} diff --git a/hack/capi-operator_test.bats b/hack/capi-operator_test.bats index cfd2fd8e2..20bd27be3 100644 --- a/hack/capi-operator_test.bats +++ b/hack/capi-operator_test.bats @@ -1,16 +1,20 @@ #!/usr/bin/env bats -# The operator's resync period is what bounds the stale-Ready window after an -# operator restart (kubernetes-sigs/cluster-api-operator#1031): about two -# periods. It reaches the manager only through patches/sync-period.diff, which -# `make update` has to reapply on every re-vendor, and through the value in -# values.yaml. Losing either silently returns the window to about 20 minutes, -# so this checks the argument the rendered Deployment actually carries. +# values.yaml keeps a one-minute resync period until restart recovery on the +# current operator is measured; the v0.19 operator needed it for +# kubernetes-sigs/cluster-api-operator#1031. It reaches the manager only through +# patches/sync-period.diff, which `make update` has to reapply on every +# re-vendor, and through the value in values.yaml. Losing either drops the +# setting silently, so this checks the argument the rendered Deployment carries. load test_helper REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)" OPERATOR="$REPO_ROOT/packages/system/capi-operator" +@test "the operator chart declares its vendored dependencies" { + helm lint "$OPERATOR" +} + @test "the operator manager runs with a one-minute resync period" { local rendered args rendered="$BATS_TEST_TMPDIR/operator.yaml" @@ -23,3 +27,473 @@ OPERATOR="$REPO_ROOT/packages/system/capi-operator" esac printf '%s\n' "$args" | grep -qx -- '--sync-period=1m' || { echo "manager args: $args" >&2; return 1; } } + +check_feature_gate() { + local expected="$1" mode="$2" group provider legacy kind rendered actual failed=0 + local -a flags + for entry in 'core cluster-api core CoreProvider' \ + 'controlPlane kubeadm kubeadm ControlPlaneProvider' \ + 'infrastructure docker docker InfrastructureProvider' \ + 'ipam in-cluster in-cluster IPAMProvider'; do + read -r group provider legacy kind <<< "$entry" + flags=(--set "cluster-api-operator.$group.$provider.version=v1.13.7") + case "$mode" in + global) + flags+=(--set "cluster-api-operator.manager.featureGates.$legacy.ClusterTopology=true") + ;; + provider) + flags+=(--set "cluster-api-operator.$group.$provider.manager.featureGates.ClusterTopology=true") + ;; + false) + flags+=(--set "cluster-api-operator.manager.featureGates.$legacy.ClusterTopology=true" + --set "cluster-api-operator.$group.$provider.manager.featureGates.ClusterTopology=false") + ;; + empty) + flags+=(--set "cluster-api-operator.manager.featureGates.$legacy.ClusterTopology=true" + --set-json "cluster-api-operator.$group.$provider.manager.featureGates={}") + ;; + esac + rendered="$BATS_TEST_TMPDIR/$kind.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api "${flags[@]}" > "$rendered" + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.manager.featureGates.ClusterTopology" "$rendered")" + [ "$actual" = "$expected" ] || { + echo "$kind $mode: expected $expected, got $actual" >&2 + failed=1 + } + done + [ "$failed" -eq 0 ] +} + +@test "legacy global feature gates remain effective for provider kinds" { + check_feature_gate true global +} + +@test "provider feature gates work without a legacy global value" { + check_feature_gate true provider +} + +@test "an explicit false provider gate overrides the global gate" { + check_feature_gate false false +} + +@test "an explicitly empty provider gate map replaces global gates" { + check_feature_gate null empty +} + +check_auto_kubeadm_gate() { + local expected="$1" rendered actual + shift + rendered="$BATS_TEST_TMPDIR/automatic-control-plane.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.infrastructure.docker.version=v1.13.7 \ + --set cluster-api-operator.configSecret.name=provider-config \ + "$@" > "$rendered" + actual="$(yq --no-doc 'select(.kind == "ControlPlaneProvider") | .spec.manager.featureGates.ClusterTopology' "$rendered")" + [ "$actual" = "$expected" ] || { + echo "automatic kubeadm gate: expected $expected, got $actual" >&2 + return 1 + } +} + +@test "automatic kubeadm control plane retains the legacy global gate" { + check_auto_kubeadm_gate true \ + --set cluster-api-operator.manager.featureGates.kubeadm.ClusterTopology=true +} + +@test "automatic kubeadm control plane does not manufacture a feature gate" { + check_auto_kubeadm_gate null +} + +@test "explicit kubeadm false gate supersedes automatic global defaults" { + check_auto_kubeadm_gate false \ + --set cluster-api-operator.manager.featureGates.kubeadm.ClusterTopology=true \ + --set cluster-api-operator.controlPlane.kubeadm.version=v1.13.7 \ + --set cluster-api-operator.controlPlane.kubeadm.manager.featureGates.ClusterTopology=false +} + +@test "explicit kubeadm empty gate map supersedes automatic global defaults" { + check_auto_kubeadm_gate null \ + --set cluster-api-operator.manager.featureGates.kubeadm.ClusterTopology=true \ + --set cluster-api-operator.controlPlane.kubeadm.version=v1.13.7 \ + --set-json 'cluster-api-operator.controlPlane.kubeadm.manager.featureGates={}' +} + +@test "automatic core and bootstrap keep their existing gate-free defaults" { + local rendered actual + rendered="$BATS_TEST_TMPDIR/automatic-defaults.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.infrastructure.docker.version=v1.13.7 \ + --set cluster-api-operator.configSecret.name=provider-config \ + --set cluster-api-operator.manager.featureGates.core.ClusterTopology=true \ + --set cluster-api-operator.manager.featureGates.kubeadm.ClusterTopology=true > "$rendered" + actual="$(yq --no-doc 'select(.kind == "CoreProvider") | .spec.manager.featureGates' "$rendered")" + [ "$actual" = null ] + actual="$(yq --no-doc 'select(.kind == "BootstrapProvider") | .spec.manager.featureGates' "$rendered")" + [ "$actual" = null ] +} + +@test "explicit bootstrap retains its own manager gate" { + local rendered actual + rendered="$BATS_TEST_TMPDIR/bootstrap.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.bootstrap.kubeadm.version=v1.13.7 \ + --set cluster-api-operator.bootstrap.kubeadm.manager.featureGates.ClusterTopology=true > "$rendered" + actual="$(yq --no-doc 'select(.kind == "BootstrapProvider") | .spec.manager.featureGates.ClusterTopology' "$rendered")" + [ "$actual" = true ] +} + +@test "addon retains its supported manager metrics without a legacy gate" { + local rendered actual + rendered="$BATS_TEST_TMPDIR/addon.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.addon.example.version=v1.13.7 \ + --set cluster-api-operator.addon.example.manager.metrics.diagnosticsAddress=:8443 \ + --set cluster-api-operator.manager.featureGates.example.ClusterTopology=true > "$rendered" + actual="$(yq --no-doc 'select(.kind == "AddonProvider") | .spec.manager.metrics.diagnosticsAddress' "$rendered")" + [ "$actual" = ':8443' ] + actual="$(yq --no-doc 'select(.kind == "AddonProvider") | .spec.manager.featureGates' "$rendered")" + [ "$actual" = null ] +} + +check_provider_spec_field() { + local field="$1" group provider kind entry rendered actual expected path failed=0 + local -a flags + for entry in 'core cluster-api CoreProvider' 'bootstrap kubeadm BootstrapProvider' \ + 'controlPlane kubeadm ControlPlaneProvider' 'infrastructure docker InfrastructureProvider' \ + 'ipam in-cluster IPAMProvider' 'addon example AddonProvider'; do + read -r group provider kind <<< "$entry" + flags=(--set "cluster-api-operator.$group.$provider.createNamespace=false") + case "$field" in + fetchConfig) + flags+=(--set-string "cluster-api-operator.$group.$provider.fetchConfig.selector.matchLabels.example=manifests") + path='.spec.fetchConfig.selector.matchLabels.example' + expected=manifests + ;; + manifestPatches) + flags+=(--set-json "cluster-api-operator.$group.$provider.manifestPatches=[\"kind: Deployment\"]") + path='.spec.manifestPatches[0]' + expected='kind: Deployment' + ;; + additionalManifests) + flags+=(--set-json "cluster-api-operator.$group.$provider.additionalManifests={\"name\":\"extra-manifests\",\"manifests\":\"kind: ConfigMap\"}") + path='.spec.additionalManifests.name' + expected=extra-manifests + ;; + absent) + path='.spec' + expected=null + ;; + esac + rendered="$BATS_TEST_TMPDIR/$kind-$field.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api "${flags[@]}" > "$rendered" + actual="$(yq --no-doc "select(.kind == \"$kind\") | $path" "$rendered")" + [ "$actual" = "$expected" ] || { + echo "$kind $field: expected $expected in spec, got $actual" >&2 + failed=1 + } + actual="$(yq --no-doc "select(.kind == \"$kind\") | .metadata.$field" "$rendered")" + [ "$actual" = null ] || { + echo "$kind leaked $field into metadata" >&2 + failed=1 + } + done + [ "$failed" -eq 0 ] +} + +@test "fetch configuration alone belongs to every provider spec" { + check_provider_spec_field fetchConfig +} + +@test "manifest patches alone belong to every provider spec" { + check_provider_spec_field manifestPatches +} + +@test "additional manifests alone belong to every provider spec" { + check_provider_spec_field additionalManifests +} + +@test "provider namespace options alone do not manufacture spec fields" { + check_provider_spec_field absent +} + +@test "legacy global fetch configuration alone stays inside matching provider specs" { + local group provider kind entry rendered actual + for entry in 'infrastructure docker InfrastructureProvider' 'ipam in-cluster IPAMProvider'; do + read -r group provider kind <<< "$entry" + rendered="$BATS_TEST_TMPDIR/$kind-global-fetch.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set "cluster-api-operator.$group.$provider.createNamespace=false" \ + --set-string "cluster-api-operator.fetchConfig.$provider.url=https://example.test/components.yaml" > "$rendered" + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.url" "$rendered")" + [ "$actual" = 'https://example.test/components.yaml' ] + actual="$(yq --no-doc "select(.kind == \"$kind\") | .metadata.fetchConfig" "$rendered")" + [ "$actual" = null ] + done +} + +@test "another provider's global fetch configuration does not create a spec" { + local rendered actual + rendered="$BATS_TEST_TMPDIR/unmatched-fetch.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.infrastructure.docker.createNamespace=false \ + --set-string cluster-api-operator.fetchConfig.other.url=https://example.test/components.yaml > "$rendered" + actual="$(yq --no-doc 'select(.kind == "InfrastructureProvider") | .spec' "$rendered")" + [ "$actual" = null ] +} + +@test "infrastructure patches alone belong to the provider spec" { + local rendered actual + rendered="$BATS_TEST_TMPDIR/infrastructure-patches.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set-string 'cluster-api-operator.infrastructure.docker.patches[0].patch=kind: Deployment' > "$rendered" + actual="$(yq --no-doc 'select(.kind == "InfrastructureProvider") | .spec.patches[0].patch' "$rendered")" + [ "$actual" = 'kind: Deployment' ] + actual="$(yq --no-doc 'select(.kind == "InfrastructureProvider") | .metadata.patches' "$rendered")" + [ "$actual" = null ] +} + +check_fetch_overlap() { + local mode="$1" group provider kind template entry rendered actual expected failed=0 + local -a flags + for entry in 'infrastructure docker InfrastructureProvider infra.yaml' \ + 'ipam in-cluster IPAMProvider ipam.yaml'; do + read -r group provider kind template <<< "$entry" + flags=(--set "cluster-api-operator.$group.$provider.createNamespace=false" + --set-string "cluster-api-operator.fetchConfig.$provider.url=https://legacy.example/components.yaml") + case "$mode" in + override) + flags+=(--set-string "cluster-api-operator.$group.$provider.fetchConfig.url=https://provider.example/components.yaml") + expected=https://provider.example/components.yaml + ;; + empty) + flags+=(--set-json "cluster-api-operator.$group.$provider.fetchConfig={}") + expected=https://legacy.example/components.yaml + ;; + esac + rendered="$BATS_TEST_TMPDIR/$kind-overlap-$mode.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api "${flags[@]}" \ + --show-only "charts/cluster-api-operator/templates/$template" > "$rendered" + [ "$(grep -c '^ fetchConfig:' "$rendered")" -eq 1 ] || { + echo "$kind $mode must emit exactly one fetchConfig key" >&2 + failed=1 + } + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.url" "$rendered")" + [ "$actual" = "$expected" ] || { + echo "$kind $mode expected $expected, got $actual" >&2 + failed=1 + } + done + [ "$failed" -eq 0 ] +} + +@test "nonempty provider fetch configuration overrides global input with one key" { + check_fetch_overlap override +} + +@test "empty provider fetch configuration retains the legacy global fallback" { + check_fetch_overlap empty +} + +check_profiling_flags() { + local rendered + rendered="$BATS_TEST_TMPDIR/profiling.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.profilerAddress=:6061 \ + --set cluster-api-operator.contentionProfiling=true "$@" > "$rendered" + grep -q -- '--profiler-address=localhost:6061' "$rendered" + grep -q -- '--contention-profiling=true' "$rendered" + grep -q '^[[:space:]]*- containerPort: 6061$' "$rendered" +} + +@test "profiling flags remain effective when leader election is disabled" { + check_profiling_flags --set cluster-api-operator.leaderElection.enabled=false +} + +@test "profiling flags remain effective when the optional leader election block is absent" { + check_profiling_flags --set-json cluster-api-operator.leaderElection=null +} + +check_global_fetch_type() { + local mode="$1" group provider kind template entry rendered actual failed=0 + local -a flags + for entry in 'infrastructure docker InfrastructureProvider infra.yaml' \ + 'ipam in-cluster IPAMProvider ipam.yaml'; do + read -r group provider kind template <<< "$entry" + flags=(--set "cluster-api-operator.$group.$provider.createNamespace=false") + case "$mode" in + selector) + flags+=(--set-json "cluster-api-operator.fetchConfig.$provider.selector={\"matchLabels\":{\"example\":\"manifests\"},\"matchExpressions\":[{\"key\":\"release\",\"operator\":\"In\",\"values\":[\"v1\"]}]}") + ;; + empty) + flags+=(--set-json "cluster-api-operator.fetchConfig.$provider.selector={}") + ;; + oci) + flags+=(--set-string "cluster-api-operator.fetchConfig.$provider.oci=oci://registry.example/provider:v1") + ;; + esac + rendered="$BATS_TEST_TMPDIR/$kind-fetch-type-$mode.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api "${flags[@]}" \ + --show-only "charts/cluster-api-operator/templates/$template" > "$rendered" + [ "$(grep -c '^ fetchConfig:' "$rendered")" -eq 1 ] + if [ "$mode" = oci ]; then + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.oci" "$rendered")" + [ "$actual" = 'oci://registry.example/provider:v1' ] + continue + fi + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.selector | tag" "$rendered")" + if [ "$actual" != '!!map' ]; then + echo "$kind $mode selector must be an object, got $actual" >&2 + failed=1 + continue + fi + if [ "$mode" = selector ]; then + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.selector.matchLabels.example" "$rendered")" + [ "$actual" = manifests ] + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.selector.matchExpressions[0].key" "$rendered")" + [ "$actual" = release ] + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.selector.matchExpressions[0].operator" "$rendered")" + [ "$actual" = In ] + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig.selector.matchExpressions[0].values[0]" "$rendered")" + [ "$actual" = v1 ] + fi + done + [ "$failed" -eq 0 ] +} + +@test "global fetch selectors preserve nested label and expression objects" { + check_global_fetch_type selector +} + +@test "empty global fetch selectors remain objects rather than strings" { + check_global_fetch_type empty +} + +@test "global OCI fetch configuration remains a string source" { + check_global_fetch_type oci +} + +check_global_fetch_entry() { + local value="$1" expected="$2" group provider kind template entry rendered actual failed=0 + for entry in 'infrastructure docker InfrastructureProvider infra.yaml' \ + 'ipam in-cluster IPAMProvider ipam.yaml'; do + read -r group provider kind template <<< "$entry" + rendered="$BATS_TEST_TMPDIR/$kind-entry.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set "cluster-api-operator.$group.$provider.version=v1.13.7" \ + --set-json "cluster-api-operator.fetchConfig.$provider=$value" \ + --show-only "charts/cluster-api-operator/templates/$template" > "$rendered" + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.fetchConfig | tag" "$rendered")" + [ "$actual" = "$expected" ] || { + echo "$kind global entry $value: expected $expected, got $actual" >&2 + failed=1 + } + done + [ "$failed" -eq 0 ] +} + +@test "empty global fetch entries preserve default source selection" { + check_global_fetch_entry '{}' '!!null' +} + +@test "null global fetch entries preserve default source selection" { + check_global_fetch_entry null '!!null' +} + +@test "malformed global fetch primitives are not silently replaced by a default source" { + check_global_fetch_entry false '!!bool' + check_global_fetch_entry 0 '!!int' + check_global_fetch_entry '"invalid"' '!!str' + check_global_fetch_entry '[]' '!!seq' +} + +check_provider_scalar_types() { + local mode="$1" metrics="$2" name="$3" namespace="$4" expected="$5" + local group provider kind entry rendered path actual failed=0 + local -a flags + for entry in 'core cluster-api CoreProvider' 'bootstrap kubeadm BootstrapProvider' \ + 'controlPlane kubeadm ControlPlaneProvider' 'infrastructure docker InfrastructureProvider' \ + 'ipam in-cluster IPAMProvider' 'addon example AddonProvider'; do + read -r group provider kind <<< "$entry" + flags=("--set-$mode" "cluster-api-operator.$group.$provider.manager.metrics.diagnosticsAddress=$metrics" + "--set-$mode" "cluster-api-operator.$group.$provider.configSecret.name=$name" + "--set-$mode" "cluster-api-operator.$group.$provider.configSecret.namespace=$namespace") + rendered="$BATS_TEST_TMPDIR/$kind-scalars-$mode.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api "${flags[@]}" > "$rendered" + for path in manager.metrics.diagnosticsAddress configSecret.name configSecret.namespace; do + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.$path | tag" "$rendered")" + [ "$actual" = "$expected" ] || { + echo "$kind $path: expected YAML type $expected, got $actual" >&2 + failed=1 + } + done + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.manager.metrics.diagnosticsAddress" "$rendered")" + [ "$actual" = "$metrics" ] + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.configSecret.name" "$rendered")" + [ "$actual" = "$name" ] + actual="$(yq --no-doc "select(.kind == \"$kind\") | .spec.configSecret.namespace" "$rendered")" + [ "$actual" = "$namespace" ] + done + [ "$failed" -eq 0 ] +} + +@test "provider metric disable values and numeric secret identifiers stay strings" { + check_provider_scalar_types string 0 123 456 '!!str' +} + +@test "provider secret identifiers that resemble YAML keywords stay strings" { + check_provider_scalar_types string 0 true null '!!str' +} + +@test "invalid numeric provider string inputs are not coerced into valid strings" { + check_provider_scalar_types json 123 123 456 '!!int' +} + +@test "invalid boolean provider string inputs are not coerced into valid strings" { + check_provider_scalar_types json true true true '!!bool' +} + +@test "provider config Secrets override global defaults" { + local group provider kind rendered entry + for entry in 'core cluster-api CoreProvider' 'bootstrap kubeadm BootstrapProvider' \ + 'controlPlane kubeadm ControlPlaneProvider' 'infrastructure docker InfrastructureProvider' \ + 'ipam in-cluster IPAMProvider' 'addon example AddonProvider'; do + read -r group provider kind <<< "$entry" + rendered="$BATS_TEST_TMPDIR/$kind-secret-precedence.yaml" + helm template capi-operator "$OPERATOR" \ + --set cluster-api-operator.configSecret.name=global-config \ + --set cluster-api-operator.configSecret.namespace=global-namespace \ + --set "cluster-api-operator.$group.$provider.configSecret.name=provider-config" \ + --set "cluster-api-operator.$group.$provider.configSecret.namespace=provider-namespace" > "$rendered" + [ "$(yq --no-doc "select(.kind == \"$kind\") | .spec.configSecret.name" "$rendered")" = provider-config ] + [ "$(yq --no-doc "select(.kind == \"$kind\") | .spec.configSecret.namespace" "$rendered")" = provider-namespace ] + done +} + +@test "operator profiling preserves an explicit host address" { + local rendered="$BATS_TEST_TMPDIR/profiler-host.yaml" + helm template capi-operator "$OPERATOR" \ + --set cluster-api-operator.profilerAddress=127.0.0.1:6061 > "$rendered" + grep --quiet --fixed-strings -- '--profiler-address=127.0.0.1:6061' "$rendered" +} + +@test "operator ports retain port-only addresses" { + local rendered + rendered="$BATS_TEST_TMPDIR/operator.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.healthAddr=:9440 \ + --set cluster-api-operator.diagnosticsAddress=:8443 > "$rendered" + [ "$(grep -c '^[[:space:]]*port: 9440$' "$rendered")" -eq 2 ] + grep -q '^[[:space:]]*- containerPort: 8443$' "$rendered" +} + +@test "operator ports preserve explicit IPv4 host addresses" { + local rendered + rendered="$BATS_TEST_TMPDIR/operator.yaml" + helm template capi-operator "$OPERATOR" --namespace cozy-cluster-api \ + --set cluster-api-operator.healthAddr=0.0.0.0:9440 \ + --set cluster-api-operator.diagnosticsAddress=0.0.0.0:8443 > "$rendered" + [ "$(grep -c '^[[:space:]]*port: 9440$' "$rendered")" -eq 2 ] + grep -q '^[[:space:]]*- containerPort: 8443$' "$rendered" + grep -q -- '--health-addr=0.0.0.0:9440' "$rendered" + grep -q -- '--diagnostics-address=0.0.0.0:8443' "$rendered" +} diff --git a/hack/capi-provider-components_test.bats b/hack/capi-provider-components_test.bats index 647668a3c..272c219f0 100644 --- a/hack/capi-provider-components_test.bats +++ b/hack/capi-provider-components_test.bats @@ -18,22 +18,22 @@ load test_helper REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)" check_pair() { - local pkg="$1" yaml="$2" + local pkg="$1" yaml="$2" blob="${3:-components.gz}" local dir="$REPO_ROOT/packages/system/$pkg/files" [ -f "$dir/$yaml" ] || { echo "missing $pkg/files/$yaml" >&2; return 1; } - [ -f "$dir/components.gz" ] || { echo "missing $pkg/files/components.gz" >&2; return 1; } + [ -f "$dir/$blob" ] || { echo "missing $pkg/files/$blob" >&2; return 1; } local work; work="$(mktemp -d)" - gzip -dc "$dir/components.gz" > "$work/decompressed.yaml" + gzip -dc "$dir/$blob" > "$work/decompressed.yaml" if ! cmp -s "$work/decompressed.yaml" "$dir/$yaml"; then - echo "$pkg: components.gz does not match $yaml" >&2 + echo "$pkg: $blob does not match $yaml" >&2 echo "the chart mounts the blob, so the cluster would run what the YAML does not say" >&2 - if grep -q '^components:' "$REPO_ROOT/packages/system/$pkg/Makefile" 2>/dev/null; then + if [ "$blob" = components.gz ] && grep -q '^components:' "$REPO_ROOT/packages/system/$pkg/Makefile" 2>/dev/null; then echo "run: make -C packages/system/$pkg components" >&2 else - echo "regenerate: gzip -9 -n -c files/$yaml > files/components.gz" >&2 + echo "regenerate: gzip -9 -n -c files/$yaml > files/$blob" >&2 fi head -40 "$work/decompressed.yaml" > "$work/a" head -40 "$dir/$yaml" > "$work/b" @@ -66,9 +66,10 @@ check_version() { version="$(sed -n "s/^${makefile_var}=//p" "$dir/Makefile")" [ -n "$version" ] || { echo "$pkg: no $makefile_var in Makefile" >&2; return 1; } - local cm_name provider_version - cm_name="$(sed -n 's/^ name: //p' "$dir/templates/configmaps.yaml")" - provider_version="$(sed -n 's/^ version: //p' "$dir/templates/providers.yaml")" + local cm_name provider_version rendered="$BATS_TEST_TMPDIR/$pkg.yaml" + helm template provider "$dir" --kube-version 1.33.0 > "$rendered" + provider_version="$(yq --no-doc 'select(.apiVersion == "operator.cluster.x-k8s.io/v1alpha2") | .spec.version' "$rendered")" + cm_name="$(PROVIDER_VERSION="$provider_version" yq --no-doc 'select(.kind == "ConfigMap" and .metadata.name == strenv(PROVIDER_VERSION)) | .metadata.name' "$rendered")" if [ "$cm_name" != "$provider_version" ]; then echo "$pkg: ConfigMap name '$cm_name' and spec.version '$provider_version' differ" >&2 @@ -100,16 +101,24 @@ check_version() { # vendored file edited by hand, or a sum bumped without the file, both show up # without anyone running the refresh target. check_sums() { - local pkg="$1" makefile_var="$2" yaml="$3" + local pkg="$1" makefile_var="$2" yaml="$3" metadata="${4:-metadata.yaml}" + local metadata_var="${5:-${makefile_var}_SHA256_METADATA}" local dir="$REPO_ROOT/packages/system/$pkg" local sum_components sum_metadata sum_components="$(sed -n "s/^${makefile_var}_SHA256_COMPONENTS=//p" "$dir/Makefile")" - sum_metadata="$(sed -n "s/^${makefile_var}_SHA256_METADATA=//p" "$dir/Makefile")" + sum_metadata="$(sed --quiet "s/^${metadata_var}=//p" "$dir/Makefile")" [ -n "$sum_components" ] && [ -n "$sum_metadata" ] \ || { echo "$pkg: Makefile pins no ${makefile_var}_SHA256_* sums" >&2; return 1; } - if ! printf '%s %s\n%s %s\n' "$sum_components" "$dir/files/$yaml" "$sum_metadata" "$dir/files/metadata.yaml" \ + local components="$dir/files/$yaml" + case "$yaml" in + *.gz) + components="$BATS_TEST_TMPDIR/$makefile_var.yaml" + gzip --decompress --stdout "$dir/files/$yaml" > "$components" || return + ;; + esac + if ! printf '%s %s\n%s %s\n' "$sum_components" "$components" "$sum_metadata" "$dir/files/$metadata" \ | sha256sum -c - >/dev/null 2>&1; then echo "$pkg: a vendored file does not match the sum its Makefile pins" >&2 echo "either the file was edited without a refresh, or the sum moved without the file" >&2 @@ -117,6 +126,46 @@ check_sums() { fi } +# Packages that carry patches/ vendor a file that differs from the release +# asset, so its sum cannot be pinned directly. Reverting the patches recovers +# the asset, and that is checked against the pinned sum instead: a hand edit of +# the vendored file, a patch changed without a refresh, or a sum moved without +# the file all show up here. +check_patched_sums() { + local pkg="$1" makefile_var="$2" yaml="$3" metadata="${4:-metadata.yaml}" + local metadata_var="${5:-${makefile_var}_SHA256_METADATA}" + local dir="$REPO_ROOT/packages/system/$pkg" + + local sum_components sum_metadata + sum_components="$(sed -n "s/^${makefile_var}_SHA256_COMPONENTS=//p" "$dir/Makefile")" + sum_metadata="$(sed --quiet "s/^${metadata_var}=//p" "$dir/Makefile")" + [ -n "$sum_components" ] && [ -n "$sum_metadata" ] \ + || { echo "$pkg: Makefile pins no ${makefile_var}_SHA256_* sums" >&2; return 1; } + + local work; work="$(mktemp -d)" + case "$yaml" in + *.gz) gzip --decompress --stdout "$dir/files/$yaml" > "$work/asset.yaml" || return ;; + *) cp "$dir/files/$yaml" "$work/asset.yaml" ;; + esac + local patches=() i + local patches_dir="${6:-$dir/patches}" + for i in "$patches_dir"/*.diff; do + [ -e "$i" ] && patches+=("$i") + done + for (( i = ${#patches[@]} - 1; i >= 0; i-- )); do + patch -s -f -R "$work/asset.yaml" < "${patches[$i]}" \ + || { echo "$pkg: $(basename "${patches[$i]}") does not revert cleanly from files/$yaml" >&2; rm -rf "$work"; return 1; } + done + + if ! printf '%s %s\n%s %s\n' "$sum_components" "$work/asset.yaml" "$sum_metadata" "$dir/files/$metadata" \ + | sha256sum -c - >/dev/null 2>&1; then + echo "$pkg: files/$yaml without patches/, or files/$metadata, does not match the sum its Makefile pins" >&2 + rm -rf "$work" + return 1 + fi + rm -rf "$work" +} + @test "capmox vendored files match the sums its Makefile pins" { check_sums capi-providers-infraprovider-proxmox CAPMOX infrastructure-components.yaml } @@ -124,3 +173,147 @@ check_sums() { @test "in-cluster IPAM vendored files match the sums its Makefile pins" { check_sums capi-providers-ipam-in-cluster CAIP ipam-components.yaml } + +@test "CAPI core components.gz matches the vendored core-components.yaml" { + check_pair capi-providers-core core-components.yaml +} + +@test "CAPI core vendored files match the sums its Makefile pins" { + check_patched_sums capi-providers-core CAPI core-components.yaml +} + +@test "CAPI core ships the version its Makefile vendored" { + check_version capi-providers-core CAPI_VERSION +} + +# capi-providers-bootstrap ships two providers, kubeadm and Talos, each with its +# own ConfigMap and BootstrapProvider, so the single-provider check above does +# not fit it. This asserts that the ConfigMap and the provider object for one of +# them both carry -. +check_bootstrap_version() { + local makefile_var="$1" suffix="$2" + local dir="${3:-$REPO_ROOT/packages/system/capi-providers-bootstrap}" + + local version + version="$(sed -n "s/^${makefile_var} *= *//p" "$dir/Makefile")" + [ -n "$version" ] || { echo "capi-providers-bootstrap: no $makefile_var in Makefile" >&2; return 1; } + + local want="$version-$suffix" rendered="$BATS_TEST_TMPDIR/$suffix.yaml" provider + case "$suffix" in + bootstrap) provider=kubeadm ;; + bootstrap-talos) provider=talos ;; + *) return 1 ;; + esac + helm template provider "$dir" --kube-version 1.33.0 > "$rendered" + [ "$(WANT="$want" yq --no-doc 'select(.kind == "ConfigMap" and .metadata.name == strenv(WANT)) | .metadata.name' "$rendered")" = "$want" ] \ + || { echo "capi-providers-bootstrap: no ConfigMap named $want" >&2; return 1; } + [ "$(PROVIDER="$provider" yq --no-doc 'select(.kind == "BootstrapProvider" and .metadata.name == strenv(PROVIDER)) | .spec.version' "$rendered")" = "$want" ] \ + || { echo "capi-providers-bootstrap: no BootstrapProvider at version $want" >&2; return 1; } +} + +# A version carries dots, which a pattern match would take for any character. +@test "the bootstrap version check compares the version literally" { + local fx="$BATS_TEST_TMPDIR/bootstrap" + mkdir -p "$fx/templates" + printf 'CAPI_VERSION=v1.13.7\n' > "$fx/Makefile" + printf 'apiVersion: v2\nname: example\nversion: 0.0.0\n' > "$fx/Chart.yaml" + printf 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: v1x13x7-bootstrap\n' > "$fx/templates/configmaps.yaml" + printf 'apiVersion: operator.cluster.x-k8s.io/v1alpha2\nkind: BootstrapProvider\nmetadata:\n name: kubeadm\nspec:\n version: v1x13x7-bootstrap\n' > "$fx/templates/providers.yaml" + run check_bootstrap_version CAPI_VERSION bootstrap "$fx" + [ "$status" -ne 0 ] +} + +@test "kubeadm bootstrap ships the version its Makefile vendored" { + check_bootstrap_version CAPI_VERSION bootstrap +} + +@test "Talos bootstrap ships the version its Makefile vendored" { + check_bootstrap_version CABPT_UPSTREAM_VERSION bootstrap-talos +} + +@test "Talos bootstrap components-talos.gz matches the vendored bootstrap-components-talos.yaml" { + check_pair capi-providers-bootstrap bootstrap-components-talos.yaml components-talos.gz +} + +@test "Talos bootstrap vendored files match the sums its Makefile pins" { + check_patched_sums capi-providers-bootstrap CABPT bootstrap-components-talos.yaml metadata-talos.yaml +} + +@test "Talos bootstrap keeps a dedicated service account and matching bindings" { + local file="$REPO_ROOT/packages/system/capi-providers-bootstrap/files/bootstrap-components-talos.yaml" accounts + [ "$(yq --no-doc 'select(.kind == "Deployment") | .spec.template.spec.serviceAccountName' "$file")" = cabpt-manager ] + [ "$(yq --no-doc 'select(.kind == "ServiceAccount") | .metadata.name' "$file")" = cabpt-manager ] + accounts="$(yq --no-doc 'select(.kind == "RoleBinding" or .kind == "ClusterRoleBinding") | .subjects[] | select(.kind == "ServiceAccount") | .name' "$file")" + [ -n "$accounts" ] + while IFS= read -r account; do + [ "$account" = cabpt-manager ] + done <<< "$accounts" +} + +@test "kubeadm bootstrap components.gz matches the vendored bootstrap-components.yaml" { + check_pair capi-providers-bootstrap bootstrap-components.yaml +} + +@test "kubeadm bootstrap vendored files match the sums its Makefile pins" { + check_sums capi-providers-bootstrap CAPI bootstrap-components.yaml +} + +# The core and the kubeadm bootstrap provider are cut from one Cluster API +# release; running them at different versions is not a combination upstream +# tests. +@test "CAPI core and kubeadm bootstrap vendor the same Cluster API release" { + local core boot + core="$(sed -n 's/^CAPI_VERSION=//p' "$REPO_ROOT/packages/system/capi-providers-core/Makefile")" + boot="$(sed -n 's/^CAPI_VERSION=//p' "$REPO_ROOT/packages/system/capi-providers-bootstrap/Makefile")" + [ -n "$core" ] && [ "$core" = "$boot" ] \ + || { echo "core vendors '$core', kubeadm bootstrap vendors '$boot'" >&2; return 1; } +} + +@test "CAPI charts reject management Kubernetes below the supported minimum" { + local pkg + for pkg in capi-providers-core capi-providers-bootstrap; do + run helm template "$pkg" "$REPO_ROOT/packages/system/$pkg" --kube-version 1.32.9 + [ "$status" -ne 0 ] + [[ "$output" == *"requires kubeVersion"* ]] + done +} + +@test "CAPI charts render on the minimum supported management Kubernetes" { + local pkg + for pkg in capi-providers-core capi-providers-bootstrap; do + run helm template "$pkg" "$REPO_ROOT/packages/system/$pkg" --kube-version 1.33.0 + [ "$status" -eq 0 ] + [[ "$output" == *"kind: ConfigMap"* ]] + done +} + +@test "intermediate core bundle recovers the pinned upstream release" { + check_patched_sums capi-operator CAPI_BRIDGE_CORE bridge-core-components.gz bridge-metadata.yaml CAPI_BRIDGE_SHA256_METADATA "$REPO_ROOT/packages/system/capi-providers-core/patches" +} + +@test "intermediate kubeadm bundle matches the pinned upstream release" { + check_sums capi-operator CAPI_BRIDGE_BOOTSTRAP bridge-bootstrap-components.gz bridge-metadata.yaml CAPI_BRIDGE_SHA256_METADATA +} + +@test "a changed compressed bootstrap bundle fails the pinned checksum" { + local fixture="$BATS_TEST_TMPDIR/fixture" source="$REPO_ROOT/packages/system/capi-operator" + mkdir "$fixture" "$fixture/packages" "$fixture/packages/system" "$fixture/packages/system/capi-operator" "$fixture/packages/system/capi-operator/files" + cp "$source/Makefile" "$fixture/packages/system/capi-operator/Makefile" + cp "$source/files/bridge-metadata.yaml" "$fixture/packages/system/capi-operator/files/bridge-metadata.yaml" + gzip --decompress --stdout "$source/files/bridge-bootstrap-components.gz" > "$BATS_TEST_TMPDIR/modified.yaml" + printf '\n# changed\n' >> "$BATS_TEST_TMPDIR/modified.yaml" + gzip --no-name --stdout "$BATS_TEST_TMPDIR/modified.yaml" > "$fixture/packages/system/capi-operator/files/bridge-bootstrap-components.gz" + REPO_ROOT="$fixture" run check_sums capi-operator CAPI_BRIDGE_BOOTSTRAP bridge-bootstrap-components.gz bridge-metadata.yaml CAPI_BRIDGE_SHA256_METADATA + [ "$status" -ne 0 ] + [[ "$output" == *"does not match the sum"* ]] +} + +@test "both core bundles retain the certificate provisioning startup budget" { + local file probe manifest="$BATS_TEST_TMPDIR/core-components.yaml" + for file in capi-providers-core/files/components.gz capi-operator/files/bridge-core-components.gz; do + gzip --decompress --stdout "$REPO_ROOT/packages/system/$file" > "$manifest" + probe="$(yq --output-format=json --no-doc 'select(.kind == "Deployment" and .metadata.name == "capi-controller-manager") | .spec.template.spec.containers[] | select(.name == "manager") | .startupProbe' "$manifest")" + [ -n "$probe" ] + jq --exit-status '.httpGet.path == "/healthz" and .httpGet.port == "healthz" and .failureThreshold * .periodSeconds >= 300' <<< "$probe" + done +} diff --git a/hack/capi-upgrade-chart_test.bats b/hack/capi-upgrade-chart_test.bats new file mode 100644 index 000000000..2bad9bfe0 --- /dev/null +++ b/hack/capi-upgrade-chart_test.bats @@ -0,0 +1,178 @@ +#!/usr/bin/env bats + +load test_helper + +REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)" +CORE="$REPO_ROOT/packages/system/capi-providers-core" + +setup() { + strict_setup + RENDERED="$BATS_TEST_TMPDIR/core.yaml" + helm template capi-providers-core "$CORE" --namespace test-capi --kube-version 1.33.0 > "$RENDERED" +} + +@test "the intermediate upgrade runs before Helm applies final provider manifests" { + [ "$(yq --no-doc 'select(.kind == "Job") | .metadata.annotations."helm.sh/hook"' "$RENDERED")" = pre-install,pre-upgrade ] + [ "$(yq --no-doc 'select(.kind == "Job") | .spec.backoffLimit' "$RENDERED")" = 0 ] + [ "$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.restartPolicy' "$RENDERED")" = Never ] + [ "$(yq --no-doc 'select(.kind == "CoreProvider") | .metadata.annotations."helm.sh/hook"' "$RENDERED")" = null ] + local provider target + provider="$(yq --no-doc 'select(.kind == "CoreProvider") | .spec.version' "$RENDERED")" + target="$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].env[] | select(.name == "TARGET_VERSION") | .value' "$RENDERED")" + [ "$provider" = "$target-core" ] +} + +@test "the upgrade Job is kept until the next attempt, after a success too" { + [ "$(yq --no-doc 'select(.kind == "Job") | .metadata.annotations."helm.sh/hook-delete-policy"' "$RENDERED")" = before-hook-creation ] + [ "$(yq --no-doc 'select(.kind != "Job" and .metadata.annotations."helm.sh/hook" != null) | .metadata.annotations."helm.sh/hook-delete-policy"' "$RENDERED" | sort --unique)" = before-hook-creation,hook-succeeded ] +} + +@test "the operator retains intermediate bundles independently of migration hooks" { + local name bridge policy rendered="$BATS_TEST_TMPDIR/operator.yaml" + bridge="$(< "$CORE/files/bridge-version")" + [ "$bridge" = "$(< "$REPO_ROOT/packages/system/capi-operator/files/bridge-version")" ] + helm template capi-operator "$REPO_ROOT/packages/system/capi-operator" --namespace test-capi > "$rendered" + for name in "$bridge-core" "$bridge-bootstrap"; do + policy="$(NAME="$name" yq --no-doc 'select(.kind == "ConfigMap" and .metadata.name == strenv(NAME)) | .metadata.annotations."helm.sh/resource-policy"' "$rendered")" + [ "$policy" = keep ] + [ "$(NAME="$name" yq --no-doc 'select(.kind == "ConfigMap" and .metadata.name == strenv(NAME)) | .metadata.annotations."helm.sh/hook"' "$rendered")" = null ] + [ "$(NAME="$name" yq --no-doc 'select(.kind == "ConfigMap" and .metadata.name == strenv(NAME)) | .metadata.annotations."provider.cluster.x-k8s.io/compressed"' "$rendered")" = true ] + done +} + +@test "intermediate bundles carry no label a legacy version-less selector matches" { + local rendered="$BATS_TEST_TMPDIR/operator.yaml" + helm template capi-operator "$REPO_ROOT/packages/system/capi-operator" --namespace test-capi > "$rendered" + yq --output-format=json --no-doc 'select(.kind == "ConfigMap" and .metadata.annotations."helm.sh/resource-policy" == "keep")' "$rendered" | + jq --slurp --exit-status 'length == 2 and all(.[]; .metadata.labels == {"provider.cluster.x-k8s.io/version": .metadata.name})' +} + +@test "the hook image follows the cluster images registry" { + local image mirrored + image="$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].image' "$RENDERED")" + [ "$image" = "$(yq '.upgrade.image' "$CORE/values.yaml")" ] + mirrored="$(helm template capi-providers-core "$CORE" --namespace test-capi --kube-version 1.33.0 --set-string '_cluster.images-registry=registry.example.test' | + yq --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].image')" + [ "$mirrored" = "registry.example.test/$image" ] +} + +@test "the packaged chart ships the cozy-lib subchart its templates include" { + local source="$REPO_ROOT/packages/core/platform/sources/capi-provider-core.yaml" + [ "$(yq '.spec.variants[] | select(.name == "default") | .libraries[] | select(.name == "cozy-lib") | .path' "$source")" = library/cozy-lib ] + [ "$(yq '.spec.variants[] | select(.name == "default") | .components[] | select(.name == "capi-providers-core") | .libraries[] | select(. == "cozy-lib")' "$source")" = cozy-lib ] +} + +@test "the hook has no cluster-wide or secret permissions" { + local roles + roles="$(yq --output-format=json --no-doc 'select(.kind == "Role") | .rules' "$RENDERED")" + [ -n "$roles" ] + jq --exit-status 'length == 3 and all(.[]; + (.verbs - ["get", "patch"] | length == 0) and + (.resourceNames | length > 0) and + (.resources - ["coreproviders", "bootstrapproviders", "deployments"] | length == 0) + )' <<< "$roles" + [ -z "$(yq --no-doc 'select(.kind == "ClusterRole" or .kind == "ClusterRoleBinding") | .kind' "$RENDERED")" ] +} + +@test "the hook mounts its script and uses an explicit in-cluster kubeconfig" { + local script image + script="$(yq --no-doc 'select(.kind == "ConfigMap" and .metadata.name == "capi-providers-core-upgrade") | .data."upgrade-providers.sh"' "$RENDERED")" + [ -n "$script" ] + [ "$script" = "$(< "$CORE/files/upgrade-providers.sh")" ] + [ "$(yq --output-format=json --indent 0 --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].command' "$RENDERED")" = '["bash","/scripts/upgrade-providers.sh"]' ] + [ "$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.volumes[] | select(.name == "scripts") | .configMap.name' "$RENDERED")" = capi-providers-core-upgrade ] + [ "$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].volumeMounts[] | select(.name == "scripts") | .mountPath' "$RENDERED")" = /scripts ] + [ "$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].env[] | select(.name == "KUBE_CONTEXT") | .value' "$RENDERED")" = capi-upgrade ] + image="$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].image' "$RENDERED")" + [[ "$image" =~ @sha256:[0-9a-f]{64}$ ]] +} + +@test "hook RoleBinding namespace remains a string for YAML keyword names" { + local rendered="$BATS_TEST_TMPDIR/keyword-namespace.yaml" + helm template capi-providers-core "$CORE" --namespace true --kube-version 1.33.0 > "$rendered" + [ "$(yq --no-doc 'select(.kind == "RoleBinding") | .subjects[0].namespace | tag' "$rendered")" = '!!str' ] + [ "$(yq --no-doc 'select(.kind == "RoleBinding") | .subjects[0].namespace' "$rendered")" = true ] +} + +@test "the job deadline leaves room beyond the script deadline" { + local outer inner + outer="$(yq --no-doc 'select(.kind == "Job") | .spec.activeDeadlineSeconds' "$RENDERED")" + inner="$(yq --no-doc 'select(.kind == "Job") | .spec.template.spec.containers[0].env[] | select(.name == "CAPI_UPGRADE_TIMEOUT_SECONDS") | .value' "$RENDERED")" + [ "$outer" -gt "$((inner + 10))" ] + [ "$outer" -lt 600 ] +} + +@test "CAPI releases leave headroom for Helm Secret storage" { + local package chart manifest size budget=$((900 * 1024)) + for package in capi-operator capi-providers-core; do + chart="$REPO_ROOT/packages/system/$package" + manifest="$BATS_TEST_TMPDIR/$package-manifest.yaml" + helm template "$package" "$chart" --namespace test-capi --kube-version 1.33.0 > "$manifest" + size="$(python3 -I "$REPO_ROOT/hack/helm-release-size.py" "$chart" < "$manifest")" + if [ "$size" -ge "$budget" ]; then + printf '%s: %s bytes exceeds storage budget %s\n' "$package" "$size" "$budget" >&2 + return 1 + fi + done +} + +@test "every bootstrap variant waits for the core package migration" { + local variants + variants="$(yq --output-format=json '.spec.variants' "$REPO_ROOT/packages/core/platform/sources/capi-provider-bootstrap-kubeadm.yaml")" + [ -n "$variants" ] + jq --exit-status 'length > 0 and all(.[]; .dependsOn | index("cozystack.capi-provider-core") != null)' <<< "$variants" +} + +render_repositories() { + local package + for package in capi-operator capi-providers-core capi-providers-bootstrap; do + helm template "$package" "$REPO_ROOT/packages/system/$package" --namespace test-capi --kube-version 1.33.0 + printf '\n---\n' + done | yq --output-format=json --no-doc '.' | jq --slurp '.' > "$BATS_TEST_TMPDIR/repositories.json" +} + +repository_matches_request() { + jq --exit-status --argjson count "${1:-2}" ' + . as $objects | [.[] | select(.kind == "CoreProvider" or (.kind == "BootstrapProvider" and .metadata.name == "kubeadm"))] | + length == $count and all(.[]; . as $provider | + [$objects[] | select(.kind == "ConfigMap") | select(.metadata.labels as $labels | + $provider.spec.fetchConfig.selector.matchLabels | to_entries | all(.[]; $labels[.key] == .value))] | + length == 1 and ((.[0].metadata.labels["provider.cluster.x-k8s.io/version"] // .[0].metadata.name) == $provider.spec.version)) + ' "$BATS_TEST_TMPDIR/repositories.json" +} + +@test "combined final repositories select one ConfigMap at the requested effective version" { + render_repositories + repository_matches_request +} + +@test "combined bridge repositories select one ConfigMap at the requested effective version" { + render_repositories + local bridge + bridge="$(< "$CORE/files/bridge-version")" + jq --arg bridge "$bridge" 'map(if .kind == "CoreProvider" or (.kind == "BootstrapProvider" and .metadata.name == "kubeadm") then + .spec.version = ($bridge + (if .kind == "CoreProvider" then "-core" else "-bootstrap" end)) | + .spec.fetchConfig.selector.matchLabels = {"provider.cluster.x-k8s.io/version": .spec.version} + else . end)' "$BATS_TEST_TMPDIR/repositories.json" > "$BATS_TEST_TMPDIR/bridge.json" + mv "$BATS_TEST_TMPDIR/bridge.json" "$BATS_TEST_TMPDIR/repositories.json" + repository_matches_request +} + +@test "a unique repository with an unsuffixed native version is rejected" { + render_repositories + jq 'map(select(.kind != "BootstrapProvider") | if (.kind == "CoreProvider") then + .spec.fetchConfig.selector.matchLabels = {"core-components": "cozy", "provider.cluster.x-k8s.io/version": "v1.14.4"} + elif (.kind == "ConfigMap" and .metadata.name == "v1.14.4-core") then + .metadata.labels["provider.cluster.x-k8s.io/version"] = "v1.14.4" + else . end)' "$BATS_TEST_TMPDIR/repositories.json" > "$BATS_TEST_TMPDIR/negative.json" + mv "$BATS_TEST_TMPDIR/negative.json" "$BATS_TEST_TMPDIR/repositories.json" + jq --exit-status '[.[] | select(.kind == "ConfigMap" and .metadata.labels["core-components"] == "cozy" and .metadata.labels["provider.cluster.x-k8s.io/version"] == "v1.14.4")] | length == 1' "$BATS_TEST_TMPDIR/repositories.json" + run repository_matches_request 1 + [ "$status" -ne 0 ] +} + +@test "Helm final restoration changes the bridge version and selector together" { + render_repositories + jq --exit-status '[.[] | select(.kind == "CoreProvider" or (.kind == "BootstrapProvider" and .metadata.name == "kubeadm"))] | + length == 2 and all(.[]; .spec.version == .spec.fetchConfig.selector.matchLabels["provider.cluster.x-k8s.io/version"])' "$BATS_TEST_TMPDIR/repositories.json" +} diff --git a/hack/capi-upgrade_test.bats b/hack/capi-upgrade_test.bats new file mode 100644 index 000000000..9e6c59568 --- /dev/null +++ b/hack/capi-upgrade_test.bats @@ -0,0 +1,400 @@ +#!/usr/bin/env bats + +load test_helper + +REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)" +UPGRADE_SCRIPT="$REPO_ROOT/packages/system/capi-providers-core/files/upgrade-providers.sh" + +setup() { + strict_setup + mkdir "$BATS_TEST_TMPDIR/bin" + cp "$REPO_ROOT/hack/testdata/capi-upgrade/kubectl" "$BATS_TEST_TMPDIR/bin/kubectl" + chmod +x "$BATS_TEST_TMPDIR/bin/kubectl" + export PATH="$BATS_TEST_TMPDIR/bin:$PATH" + export KUBECONFIG=/dev/null KUBE_CONTEXT=fixture NAMESPACE=test-capi + export BRIDGE_VERSION=v1.13.8 TARGET_VERSION=v1.14.4 + export CAPI_UPGRADE_TIMEOUT_SECONDS=60 CAPI_UPGRADE_POLL_SECONDS=0 + export CAPI_TEST_CLOCK_JUMP="${CAPI_TEST_CLOCK_JUMP:-5}" + export BASH_ENV="$REPO_ROOT/hack/testdata/capi-upgrade/clock.bash" + export CAPI_TEST_STATE="$BATS_TEST_TMPDIR/state.json" CAPI_TEST_LOG="$BATS_TEST_TMPDIR/calls.jsonl" + : > "$CAPI_TEST_LOG" + jq --null-input --argjson bridge "$(rendered_configmaps capi-operator templates/upgrade-bundles.yaml)" ' + def provider($name; $suffix): { + metadata: {name: $name, uid: $name, generation: 1}, + spec: {version: ("v1.10.1-" + $suffix), fetchConfig: {selector: {matchLabels: ({($suffix + "-components"): "cozy"} + if $suffix == "bootstrap" then {"bootstrap-provider": "kubeadm"} else {} end)}}}, + status: {installedVersion: ("v1.10.1-" + $suffix), observedGeneration: 1, conditions: [{type: "Ready", status: "True"}]} + }; + def deployment: { + metadata: {generation: 1}, spec: {replicas: 1}, + status: {observedGeneration: 1, replicas: 1, updatedReplicas: 1, readyReplicas: 1, availableReplicas: 1} + }; + { + providers: {"cluster-api": provider("cluster-api"; "core"), kubeadm: provider("kubeadm"; "bootstrap")}, + deployments: {"capi-controller-manager": deployment, "capi-kubeadm-bootstrap-controller-manager": deployment}, + configmaps: ([ + {name: "v1.10.1-core", labels: {"core-components": "cozy"}}, + {name: "v1.10.1-bootstrap", labels: {"bootstrap-components": "cozy", "bootstrap-provider": "kubeadm"}} + ] + $bridge) + }' > "$CAPI_TEST_STATE" +} + +rendered_configmaps() { + helm template "$1" "$REPO_ROOT/packages/system/$1" --namespace test-capi --kube-version 1.33.0 --show-only "$2" | + yq --output-format=json --no-doc 'select(.kind == "ConfigMap") | {"name": .metadata.name, "labels": .metadata.labels}' | + jq --slurp --compact-output '.' +} + +fixture() { + jq "$1" "$CAPI_TEST_STATE" > "$BATS_TEST_TMPDIR/next.json" + mv "$BATS_TEST_TMPDIR/next.json" "$CAPI_TEST_STATE" +} + +accepted_patches() { + jq --slurp --compact-output '[.[] | select(.accepted == true) | {name, version: (.patch[] | select(.path == "/spec/version" and .op == "replace") | .value)}]' "$CAPI_TEST_LOG" +} + +@test "fresh installations do not create or patch providers" { + fixture '.providers = {}' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[]' ] +} + +@test "providers within the supported upgrade window are unchanged" { + fixture '.providers["cluster-api"].spec.version = "v1.13.7-core" | .providers["cluster-api"].status.installedVersion = "v1.13.7-core" | .providers.kubeadm.spec.version = "v1.13.7-bootstrap" | .providers.kubeadm.status.installedVersion = "v1.13.7-bootstrap"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[]' ] +} + +@test "legacy core and kubeadm converge on the intermediate release in order" { + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"},{"name":"kubeadm","version":"v1.13.8-bootstrap"}]' ] + [ "$(jq --raw-output '.providers.kubeadm.status.installedVersion' "$CAPI_TEST_STATE")" = v1.13.8-bootstrap ] +} + +@test "bootstrap waits for the intermediate core deployment rollout" { + fixture '.lagRollout = true' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(jq --raw-output '.deployments["capi-controller-manager"].status.readyReplicas' "$CAPI_TEST_STATE")" = 1 ] + [ "$(jq --raw-output '.deployments["capi-kubeadm-bootstrap-controller-manager"].status.readyReplicas' "$CAPI_TEST_STATE")" = 1 ] +} + +@test "an interrupted transition resumes without downgrading core" { + fixture '.providers["cluster-api"].spec.version = "v1.13.8-core" | .providers["cluster-api"].spec.fetchConfig.selector.matchLabels = {"provider.cluster.x-k8s.io/version": "v1.13.8-core"} | .providers["cluster-api"].status.installedVersion = "v1.13.8-core"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"kubeadm","version":"v1.13.8-bootstrap"}]' ] +} + +@test "a final core upgrade already in progress is not reset to the bridge" { + fixture ".configmaps += $(rendered_configmaps capi-providers-core templates/configmaps.yaml)" + fixture '.providers["cluster-api"].spec.version = "v1.14.4-core" | .providers["cluster-api"].status.installedVersion = "v1.13.8-core" | .pending = {"cluster-api": 2} | .providers["cluster-api"].spec.fetchConfig.selector.matchLabels["provider.cluster.x-k8s.io/version"] = "v1.14.4-core"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"kubeadm","version":"v1.13.8-bootstrap"}]' ] + [ "$(jq --raw-output '.providers["cluster-api"].status.installedVersion' "$CAPI_TEST_STATE")" = v1.14.4-core ] +} + +@test "a core upgrade stalls while another installed provider selects two repositories" { + fixture '.configmaps += [{name: "v1.10.2-bootstrap", labels: {"bootstrap-components": "cozy", "bootstrap-provider": "kubeadm"}}]' + export CAPI_TEST_CLOCK_JUMP=61 + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"cluster-api timed out"* ]] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"}]' ] +} + +@test "the live legacy kubeadm selector matches only its own repository during the core step" { + jq --exit-status '.providers.kubeadm.spec.fetchConfig.selector.matchLabels as $s | + [.configmaps[] | select(.labels as $l | $s | to_entries | all(.[]; $l[.key] == .value))] | map(.name) == ["v1.10.1-bootstrap"]' "$CAPI_TEST_STATE" +} + +@test "an API process cannot outlive the upgrade deadline" { + fixture '.readDelay = 3' + export CAPI_UPGRADE_TIMEOUT_SECONDS=1 + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"timed out"* ]] + [ "$(accepted_patches)" = '[]' ] + [ "$(jq --raw-output '.delayedReadCompleted // false' "$CAPI_TEST_STATE")" = false ] +} + +@test "a rollback of the requested core version resumes the installed bridge" { + fixture '.providers["cluster-api"].status.installedVersion = "v1.13.8-core"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"},{"name":"kubeadm","version":"v1.13.8-bootstrap"}]' ] +} + +@test "a missing kubeadm provider is not installed by the migration" { + fixture 'del(.providers.kubeadm)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"}]' ] +} + +@test "an API read failure aborts before any mutation" { + fixture '.failGet = "cluster-api"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"API unavailable"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a rejected patch aborts rather than reporting an upgraded provider" { + fixture '.failPatch = "cluster-api"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"patch refused"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "replacing a provider between read and patch fails the UID precondition" { + fixture '.replaceUIDOnPatch = "cluster-api"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"JSON patch test failed"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a competing requested version is not overwritten by the migration" { + fixture '.replaceVersionOnPatch = "cluster-api"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"JSON patch test failed"* ]] + [ "$(accepted_patches)" = '[]' ] + [ "$(jq --raw-output '.providers["cluster-api"].spec.version' "$CAPI_TEST_STATE")" = v1.12.4-core ] +} + +@test "a newer installed minor cannot be downgraded by the chart" { + fixture '.providers["cluster-api"].spec.version = "v1.15.0-core" | .providers["cluster-api"].status.installedVersion = "v1.15.0-core"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"downgrades are not supported"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a newer installed patch cannot be downgraded by the chart" { + fixture '.providers["cluster-api"].spec.version = "v1.14.5-core" | .providers["cluster-api"].status.installedVersion = "v1.14.5-core"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"downgrades are not supported"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "malformed installed versions fail before either provider is changed" { + fixture '.providers.kubeadm.status.installedVersion = "invalid"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"invalid installed version"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "providers that never finished installing take the fresh installation path" { + fixture 'del(.providers[].status.installedVersion)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a kubeadm installation completing during the core upgrade is staged to the bridge" { + fixture '.bootstrapAfterCore = .providers.kubeadm | del(.providers.kubeadm.status.installedVersion)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"},{"name":"kubeadm","version":"v1.13.8-bootstrap"}]' ] + [ "$(jq --raw-output '.providers.kubeadm.status.installedVersion' "$CAPI_TEST_STATE")" = v1.13.8-bootstrap ] +} + +@test "an unfinished kubeadm installation at an old requested version is staged to the bridge" { + fixture 'del(.providers.kubeadm.status.installedVersion)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"},{"name":"kubeadm","version":"v1.13.8-bootstrap"}]' ] + [ "$(jq --raw-output '.providers.kubeadm.status.installedVersion' "$CAPI_TEST_STATE")" = v1.13.8-bootstrap ] +} + +@test "an unfinished kubeadm target request does not wait for the final bootstrap chart" { + fixture 'del(.providers.kubeadm.status.installedVersion) | .providers.kubeadm.spec.version = "v1.14.4-bootstrap" | .providers.kubeadm.spec.fetchConfig.selector.matchLabels = {"provider.cluster.x-k8s.io/version": "v1.14.4-bootstrap"}' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"}]' ] + jq --exit-status '.providers.kubeadm | .spec.version == "v1.14.4-bootstrap" and (.status | has("installedVersion") | not)' "$CAPI_TEST_STATE" +} + +@test "an unfinished kubeadm request within the upgrade window is left to the final manifests" { + fixture 'del(.providers.kubeadm.status.installedVersion) | .providers.kubeadm.spec.version = "v1.13.7-bootstrap"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"}]' ] + jq --exit-status '.providers.kubeadm | .spec.version == "v1.13.7-bootstrap" and (.status | has("installedVersion") | not)' "$CAPI_TEST_STATE" +} + +@test "an unfinished kubeadm installation with a malformed request is rejected" { + fixture 'del(.providers.kubeadm.status.installedVersion) | .providers.kubeadm.spec.version = "invalid"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"invalid requested version: invalid"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "an unfinished kubeadm installation with no requested version is rejected" { + fixture 'del(.providers.kubeadm.status.installedVersion, .providers.kubeadm.spec.version)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"invalid requested version:"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a kubeadm replacement during the core upgrade is not adopted" { + fixture '.bootstrapAfterCore = (.providers.kubeadm | .metadata.uid = "replacement") | del(.providers.kubeadm.status.installedVersion)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"kubeadm was replaced during the upgrade"* ]] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"}]' ] +} + +@test "a kubeadm version installed during the core upgrade is revalidated" { + fixture '.bootstrapAfterCore = (.providers.kubeadm | .status.installedVersion = "v1.14.5-bootstrap") | del(.providers.kubeadm.status.installedVersion)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"bootstrap provider downgrades are not supported"* ]] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"}]' ] +} + +@test "an installed kubeadm without an installed core provider is refused" { + fixture 'del(.providers["cluster-api"].status.installedVersion)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"kubeadm is installed without an installed core provider"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a malformed requested version is reported as the requested one" { + fixture '.providers["cluster-api"].spec.version = "invalid"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"invalid requested version: invalid"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a malformed target release is not reported as an installed version" { + export TARGET_VERSION=invalid + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"invalid target version: invalid"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "versions outside the intermediate upgrade window are rejected" { + fixture '.providers["cluster-api"].status.installedVersion = "v1.9.0-core" | .providers["cluster-api"].spec.version = "v1.9.0-core"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"outside the intermediate upgrade window"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a different requested upgrade is not overwritten" { + fixture '.providers["cluster-api"].spec.version = "v1.12.4-core"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"another upgrade is in progress"* ]] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a stalled intermediate rollout reaches a hard deadline" { + fixture '.stalled = true' + export CAPI_TEST_CLOCK_JUMP=61 + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"timed out"* ]] + [ "$(accepted_patches)" = '[{"name":"cluster-api","version":"v1.13.8-core"}]' ] +} + +@test "bridge selection changes version and repository selector in one guarded patch" { + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + jq --slurp --exit-status 'all(.[] | select(.accepted); . as $call | + any(.patch[]; .op == "test" and .path == "/metadata/uid") and + any(.patch[]; .op == "test" and .path == "/spec/version") and + any(.patch[]; .op == "test" and .path == "/spec/fetchConfig") and + any(.patch[]; .path == "/spec/fetchConfig" and .op == "replace" and + .value.selector.matchLabels == {"provider.cluster.x-k8s.io/version": + (if $call.name == "cluster-api" then "v1.13.8-core" else "v1.13.8-bootstrap" end)}))' "$CAPI_TEST_LOG" +} + +@test "already selected bridges repair stale selectors inside the supported window" { + fixture '.providers |= with_entries(.value.spec.version = ("v1.13.8-" + (if .key == "cluster-api" then "core" else "bootstrap" end)) | .value.status.installedVersion = .value.spec.version)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + jq --exit-status 'all(.providers[]; .spec.fetchConfig.selector.matchLabels == {"provider.cluster.x-k8s.io/version": .spec.version})' "$CAPI_TEST_STATE" +} + +@test "a bridge selector that keeps legacy labels is narrowed to the version label" { + fixture '.providers |= with_entries(.value.spec.version = ("v1.13.8-" + (if .key == "cluster-api" then "core" else "bootstrap" end)) | .value.status.installedVersion = .value.spec.version | .value.spec.fetchConfig.selector.matchLabels["provider.cluster.x-k8s.io/version"] = .value.spec.version)' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + jq --exit-status 'all(.providers[]; .spec.fetchConfig.selector.matchLabels == {"provider.cluster.x-k8s.io/version": .spec.version})' "$CAPI_TEST_STATE" +} + +@test "a bridge selector with extra expressions is narrowed to the version label" { + fixture '.providers |= with_entries(.value.spec.version = ("v1.13.8-" + (if .key == "cluster-api" then "core" else "bootstrap" end)) | .value.status.installedVersion = .value.spec.version | .value.spec.fetchConfig.selector = {matchLabels: {"provider.cluster.x-k8s.io/version": .value.spec.version}, matchExpressions: [{key: "core-components", operator: "Exists"}]})' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + jq --exit-status 'all(.providers[]; .spec.fetchConfig.selector == {matchLabels: {"provider.cluster.x-k8s.io/version": .spec.version}})' "$CAPI_TEST_STATE" +} + +@test "already selected bridges repair missing fetchConfig without changing other spec fields" { + fixture '.providers |= with_entries(.value.spec.version = ("v1.13.8-" + (if .key == "cluster-api" then "core" else "bootstrap" end)) | .value.status.installedVersion = .value.spec.version | .value.spec.deployment = {replicas: 2} | del(.value.spec.fetchConfig))' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + jq --exit-status 'all(.providers[]; .spec.deployment.replicas == 2 and .spec.fetchConfig.selector.matchLabels == {"provider.cluster.x-k8s.io/version": .spec.version})' "$CAPI_TEST_STATE" + jq --slurp --exit-status 'all(.[] | select(.accepted); any(.patch[]; .op == "test" and .path == "/spec") and any(.patch[]; .op == "add" and .path == "/spec/fetchConfig"))' "$CAPI_TEST_LOG" +} + +@test "a matching bridge selector is an idempotent no-op" { + fixture '.providers |= with_entries(.value.spec.version = ("v1.13.8-" + (if .key == "cluster-api" then "core" else "bootstrap" end)) | .value.status.installedVersion = .value.spec.version | .value.spec.fetchConfig.selector.matchLabels = {"provider.cluster.x-k8s.io/version": .value.spec.version})' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(accepted_patches)" = '[]' ] +} + +@test "a concurrent fetchConfig replacement rejects the whole version transition" { + fixture '.replaceFetchConfigOnPatch = "cluster-api"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"JSON patch test failed"* ]] + [ "$(accepted_patches)" = '[]' ] + jq --exit-status '.providers["cluster-api"].spec | .version == "v1.10.1-core" and .fetchConfig.selector.matchLabels == {competing: "repository"}' "$CAPI_TEST_STATE" +} + +@test "a concurrent fetchConfig creation rejects a stale add" { + fixture 'del(.providers["cluster-api"].spec.fetchConfig) | .replaceFetchConfigOnPatch = "cluster-api"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -ne 0 ] + [[ "$output" == *"JSON patch test failed"* ]] + [ "$(accepted_patches)" = '[]' ] + jq --exit-status '.providers["cluster-api"].spec | .version == "v1.10.1-core" and .fetchConfig.selector.matchLabels == {competing: "repository"}' "$CAPI_TEST_STATE" +} + +@test "a status-only concurrent update does not conflict with bridge selection" { + fixture '.statusOnlyOnPatch = "cluster-api"' + run bash "$UPGRADE_SCRIPT" + [ "$status" -eq 0 ] + [ "$(jq --raw-output '.providers["cluster-api"].metadata.resourceVersion' "$CAPI_TEST_STATE")" = 2 ] +} + +@test "the fake applies JSON Patch atomically when a later precondition fails" { + run kubectl --context fixture --namespace test-capi --request-timeout=10s patch coreproviders.operator.cluster.x-k8s.io cluster-api --type=json --patch '[{"op":"replace","path":"/spec/version","value":"v1.13.8-core"},{"op":"test","path":"/metadata/uid","value":"wrong"}]' + [ "$status" -ne 0 ] + [ "$(jq --raw-output '.providers["cluster-api"].spec.version' "$CAPI_TEST_STATE")" = v1.10.1-core ] +} + +@test "the fake does not repair a stale selector or synthesize readiness" { + fixture '.pending = {"cluster-api": 0} | .providers["cluster-api"].spec.version = "v1.13.8-core" | .providers["cluster-api"].status.conditions = [{type: "Ready", status: "False"}]' + run kubectl --context fixture --namespace test-capi --request-timeout=10s get coreproviders.operator.cluster.x-k8s.io cluster-api --output json + [ "$status" -eq 0 ] + jq --exit-status '.providers["cluster-api"] | .status.installedVersion == "v1.10.1-core" and .status.conditions[0].status == "False" and (.spec.fetchConfig.selector.matchLabels | has("provider.cluster.x-k8s.io/version") | not)' "$CAPI_TEST_STATE" +} diff --git a/hack/e2e-chainsaw/_lib/run-kubernetes.sh b/hack/e2e-chainsaw/_lib/run-kubernetes.sh index 9aaf9f1f6..bf4ee7af2 100644 --- a/hack/e2e-chainsaw/_lib/run-kubernetes.sh +++ b/hack/e2e-chainsaw/_lib/run-kubernetes.sh @@ -6407,7 +6407,10 @@ EOF fi # Wait for all machine deployment replicas to be ready (timeout after 10 minutes) - kubectl wait machinedeployment kubernetes-${test_name}-md0 -n tenant-test --timeout=10m --for=jsonpath='{.status.v1beta2.readyReplicas}'=2 + # Named at v1beta1: status.v1beta2.readyReplicas exists only there, and a bare + # resource name follows whichever version the cluster prefers, which is + # v1beta2 from Cluster API v1.11. v1beta1 is served until v1.16. + kubectl wait machinedeployments.v1beta1.cluster.x-k8s.io kubernetes-${test_name}-md0 -n tenant-test --timeout=10m --for=jsonpath='{.status.v1beta2.readyReplicas}'=2 for component in cilium coredns csi vsnap-crd; do kubectl wait hr "kubernetes-${test_name}-${component}" -n tenant-test --timeout=5m --for=condition=ready diff --git a/hack/testdata/capi-upgrade/clock.bash b/hack/testdata/capi-upgrade/clock.bash new file mode 100644 index 000000000..3fa9061d5 --- /dev/null +++ b/hack/testdata/capi-upgrade/clock.bash @@ -0,0 +1,7 @@ +sleep() { + if [[ -n "${CAPI_TEST_CLOCK_JUMP:-}" ]]; then + SECONDS=$((SECONDS + CAPI_TEST_CLOCK_JUMP)) + else + command sleep "$@" + fi +} diff --git a/hack/testdata/capi-upgrade/kubectl b/hack/testdata/capi-upgrade/kubectl new file mode 100644 index 000000000..d1b217849 --- /dev/null +++ b/hack/testdata/capi-upgrade/kubectl @@ -0,0 +1,154 @@ +#!/usr/bin/env python3 +import copy +import json +import os +import sys +import time +from pathlib import Path + +state_path = Path(os.environ["CAPI_TEST_STATE"]) +log_path = Path(os.environ["CAPI_TEST_LOG"]) +state = json.loads(state_path.read_text()) +args = sys.argv[1:] +expected = ["--context", "fixture", "--namespace", "test-capi", "--request-timeout=10s"] +if args[:len(expected)] != expected: + sys.exit("unexpected kubectl context or namespace") +args = args[len(expected):] +verb, resource, name = args[:3] +resources = { + "coreproviders.operator.cluster.x-k8s.io": "providers", + "bootstrapproviders.operator.cluster.x-k8s.io": "providers", + "deployments.apps": "deployments", +} +if resource not in resources or name not in ( + "cluster-api", "kubeadm", "capi-controller-manager", "capi-kubeadm-bootstrap-controller-manager" +): + sys.exit("unexpected resource") +entry = {"verb": verb, "resource": resource, "name": name} + + +def selected(selector): + return [cm for cm in state.get("configmaps", []) if all(cm["labels"].get(k) == v for k, v in selector.items())] + + +def repository_ready(name, obj): + own = selected(obj["spec"].get("fetchConfig", {}).get("selector", {}).get("matchLabels", {})) + if len(own) != 1 or own[0]["labels"].get("provider.cluster.x-k8s.io/version", own[0]["name"]) != obj["spec"]["version"]: + return False + # A version change makes cluster-api-operator resolve the repository of every + # other installed provider, refusing a selector that matches more than one ConfigMap. + return obj["status"].get("installedVersion") == obj["spec"]["version"] or all( + len(selected(other["spec"].get("fetchConfig", {}).get("selector", {}).get("matchLabels", {}))) == 1 + for other_name, other in state["providers"].items() + if other_name != name and other["status"].get("installedVersion") + ) + + +def save(): + state_path.write_text(json.dumps(state)) + + +def log(): + with log_path.open("a") as stream: + stream.write(json.dumps(entry) + "\n") + + +if verb == "get": + log() + time.sleep(state.get("readDelay", 0)) + if state.get("readDelay"): + state["delayedReadCompleted"] = True + save() + if state.get("failGet") == name: + sys.exit("API unavailable") + obj = state[resources[resource]].get(name) + if obj is None: + if "--ignore-not-found" not in args: + sys.exit("NotFound") + sys.exit(0) + if resource != "deployments.apps" and name in state.get("pending", {}): + pending = state["pending"][name] + if pending > 0: + state["pending"][name] -= 1 + elif not state.get("stalled") and repository_ready(name, obj): + obj["status"]["installedVersion"] = obj["spec"]["version"] + obj["status"]["observedGeneration"] = obj["metadata"]["generation"] + obj["status"]["conditions"] = [{"type": "Ready", "status": "True"}] + deployment_name = "capi-controller-manager" if name == "cluster-api" else "capi-kubeadm-bootstrap-controller-manager" + deployment = state["deployments"][deployment_name] + deployment["metadata"]["generation"] += 1 + deployment["status"]["observedGeneration"] = deployment["metadata"]["generation"] + deployment["status"]["updatedReplicas"] = 1 + deployment["status"]["replicas"] = 1 + deployment["status"]["readyReplicas"] = 0 if state.get("lagRollout") else 1 + deployment["status"]["availableReplicas"] = deployment["status"]["readyReplicas"] + if state.get("lagRollout"): + state.setdefault("rolloutReads", {})[deployment_name] = 1 + del state["pending"][name] + if resource == "deployments.apps" and name in state.get("rolloutReads", {}): + if state["rolloutReads"][name] > 0: + state["rolloutReads"][name] -= 1 + else: + obj["status"]["readyReplicas"] = 1 + obj["status"]["availableReplicas"] = 1 + del state["rolloutReads"][name] + if name == "capi-controller-manager" and "bootstrapAfterCore" in state and obj["status"]["readyReplicas"] == 1: + state["providers"]["kubeadm"] = state.pop("bootstrapAfterCore") + save() + print(json.dumps(obj)) +elif verb == "patch": + if resource == "deployments.apps" or "--type=json" not in args: + sys.exit("unexpected write") + patch = json.loads(args[args.index("--patch") + 1]) + entry["patch"] = patch + if state.get("failPatch") == name: + log() + sys.exit("patch refused") + obj = state["providers"][name] + if state.get("replaceUIDOnPatch") == name: + obj["metadata"]["uid"] = "replacement" + save() + if state.get("replaceVersionOnPatch") == name: + obj["spec"]["version"] = "v1.12.4-core" + save() + if state.get("replaceFetchConfigOnPatch") == name: + obj["spec"]["fetchConfig"] = {"selector": {"matchLabels": {"competing": "repository"}}} + save() + if state.get("statusOnlyOnPatch") == name: + obj["metadata"]["resourceVersion"] = "2" + obj["status"]["conditions"] = [{"type": "Ready", "status": "False"}] + save() + candidate = copy.deepcopy(obj) + for operation in patch: + keys = [key.replace("~1", "/").replace("~0", "~") for key in operation["path"].strip("/").split("/")] + parent = candidate + for key in keys[:-1]: + parent = parent[key] + key = keys[-1] + if operation["op"] == "test": + if key not in parent or parent[key] != operation["value"]: + log() + sys.exit("JSON patch test failed") + elif operation["op"] in ("replace", "add") and operation["path"] in ("/spec/version", "/spec/fetchConfig"): + if operation["op"] == "replace" and key not in parent: + sys.exit("JSON patch replace target missing") + if name == "kubeadm": + core = state["providers"]["cluster-api"] + deployment = state["deployments"]["capi-controller-manager"] + if core["status"]["installedVersion"] == "v1.10.1-core" or deployment["status"]["readyReplicas"] != 1: + log() + sys.exit("bootstrap upgrade started before core was ready") + parent[key] = operation["value"] + else: + sys.exit("unexpected patch operation") + obj = candidate + state["providers"][name] = obj + obj["metadata"]["generation"] += 1 + obj["status"]["conditions"] = [{"type": "Ready", "status": "False"}] + state.setdefault("pending", {})[name] = 1 + entry["accepted"] = True + save() + log() + print(json.dumps(obj)) +else: + sys.exit("unexpected kubectl operation") diff --git a/packages/apps/kubernetes/templates/cluster-autoscaler/deployment.yaml b/packages/apps/kubernetes/templates/cluster-autoscaler/deployment.yaml index 81cc78619..f2cb85c66 100644 --- a/packages/apps/kubernetes/templates/cluster-autoscaler/deployment.yaml +++ b/packages/apps/kubernetes/templates/cluster-autoscaler/deployment.yaml @@ -46,6 +46,15 @@ spec: requests: cpu: 125m memory: 128Mi + {{- /* Without CAPI_VERSION the autoscaler reads the newest Cluster API + version the management cluster serves, which is v1beta2 from + Cluster API v1.11. The 1.32 build lacks the fixes for reading + v1beta2 (kubernetes/autoscaler#8410 for scale from zero, #9458 + for infrastructure references), so it stays on v1beta1, served + until Cluster API v1.16, until the image moves past them. */}} + env: + - name: CAPI_VERSION + value: v1beta1 command: - /cluster-autoscaler args: diff --git a/packages/apps/kubernetes/tests/cluster_autoscaler_args_test.yaml b/packages/apps/kubernetes/tests/cluster_autoscaler_args_test.yaml index 44c8ff80f..5edd40b24 100644 --- a/packages/apps/kubernetes/tests/cluster_autoscaler_args_test.yaml +++ b/packages/apps/kubernetes/tests/cluster_autoscaler_args_test.yaml @@ -36,3 +36,14 @@ tests: - notContains: path: spec.template.spec.containers[0].args content: --force-delete-unregistered-nodes=true + + - it: pins the Cluster API version the autoscaler reads to v1beta1 + documentSelector: + path: kind + value: Deployment + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: CAPI_VERSION + value: v1beta1 diff --git a/packages/core/platform/sources/capi-provider-bootstrap-kubeadm.yaml b/packages/core/platform/sources/capi-provider-bootstrap-kubeadm.yaml index 90cea1075..579b85938 100644 --- a/packages/core/platform/sources/capi-provider-bootstrap-kubeadm.yaml +++ b/packages/core/platform/sources/capi-provider-bootstrap-kubeadm.yaml @@ -14,6 +14,7 @@ spec: dependsOn: - cozystack.networking - cozystack.capi-operator + - cozystack.capi-provider-core components: - name: capi-providers-bootstrap path: system/capi-providers-bootstrap @@ -25,6 +26,7 @@ spec: dependsOn: - cozystack.networking - cozystack.capi-operator + - cozystack.capi-provider-core components: - name: capi-providers-bootstrap path: system/capi-providers-bootstrap diff --git a/packages/core/platform/sources/capi-provider-core.yaml b/packages/core/platform/sources/capi-provider-core.yaml index 91af66170..2c3957045 100644 --- a/packages/core/platform/sources/capi-provider-core.yaml +++ b/packages/core/platform/sources/capi-provider-core.yaml @@ -14,9 +14,13 @@ spec: dependsOn: - cozystack.networking - cozystack.capi-operator + libraries: + - name: cozy-lib + path: library/cozy-lib components: - name: capi-providers-core path: system/capi-providers-core + libraries: ["cozy-lib"] install: privileged: true namespace: cozy-cluster-api diff --git a/packages/system/capi-operator/.helmignore b/packages/system/capi-operator/.helmignore index d5c178e81..34619b54a 100644 --- a/packages/system/capi-operator/.helmignore +++ b/packages/system/capi-operator/.helmignore @@ -1,3 +1,5 @@ images hack .gitkeep +files/*-components.yaml +patches/ diff --git a/packages/system/capi-operator/Chart.yaml b/packages/system/capi-operator/Chart.yaml index 459e461f5..41f9414f5 100644 --- a/packages/system/capi-operator/Chart.yaml +++ b/packages/system/capi-operator/Chart.yaml @@ -1,3 +1,7 @@ apiVersion: v2 name: cozy-capi-operator version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process +dependencies: + - name: cluster-api-operator + version: "*" + repository: "file://charts/cluster-api-operator" diff --git a/packages/system/capi-operator/Makefile b/packages/system/capi-operator/Makefile index e90c8fe88..609884090 100644 --- a/packages/system/capi-operator/Makefile +++ b/packages/system/capi-operator/Makefile @@ -3,7 +3,13 @@ export NAMESPACE=cozy-cluster-api export REPO_NAME=capi-operator export REPO_URL=https://kubernetes-sigs.github.io/cluster-api-operator export CHART_NAME=cluster-api-operator -export CHART_VERSION=^0.19 +export CHART_VERSION=0.30.0 + +CAPI_BRIDGE_VERSION=v1.13.8 +CAPI_BRIDGE_URL=https://github.com/kubernetes-sigs/cluster-api/releases/download/$(CAPI_BRIDGE_VERSION) +CAPI_BRIDGE_CORE_SHA256_COMPONENTS=f28647b6c20956d56fd8a678bf477821036bea71f1a1318d9cacdc413c779957 +CAPI_BRIDGE_BOOTSTRAP_SHA256_COMPONENTS=775ebb39516fcf17eccaa6f2d157fa763f90d7349f274520c5320cb693d88726 +CAPI_BRIDGE_SHA256_METADATA=20ffd682bfc50ab5193aa14ba55222ba390f9204ccf6a0dd2d52c4a3c4fb004f include ../../../hack/package.mk @@ -12,3 +18,26 @@ update: clean capi-operator-update # The upstream chart has no value for --sync-period; values.yaml explains # why we set it. patch -p1 < patches/sync-period.diff + patch -p1 < patches/legacy-feature-gates.diff + patch -p1 < patches/provider-spec-guards.diff + patch -p1 < patches/fetch-config-precedence.diff + patch -p1 < patches/profiling-independent.diff + patch -p1 < patches/fetch-config-types.diff + patch -p1 < patches/provider-string-types.diff + +.PHONY: bridge-components +bridge-components: + rm -rf .bridge-tmp + mkdir .bridge-tmp + curl --fail --location --output .bridge-tmp/core-components.yaml $(CAPI_BRIDGE_URL)/core-components.yaml + curl --fail --location --output .bridge-tmp/bootstrap-components.yaml $(CAPI_BRIDGE_URL)/bootstrap-components.yaml + curl --fail --location --output .bridge-tmp/metadata.yaml $(CAPI_BRIDGE_URL)/metadata.yaml + printf '%s .bridge-tmp/core-components.yaml\n%s .bridge-tmp/bootstrap-components.yaml\n%s .bridge-tmp/metadata.yaml\n' $(CAPI_BRIDGE_CORE_SHA256_COMPONENTS) $(CAPI_BRIDGE_BOOTSTRAP_SHA256_COMPONENTS) $(CAPI_BRIDGE_SHA256_METADATA) | sha256sum --check - + patch --batch .bridge-tmp/core-components.yaml < ../capi-providers-core/patches/0001-add-startup-probe.diff + mv .bridge-tmp/metadata.yaml files/bridge-metadata.yaml + gzip --best --no-name --stdout .bridge-tmp/core-components.yaml > files/bridge-core-components.gz + gzip --best --no-name --stdout .bridge-tmp/bootstrap-components.yaml > files/bridge-bootstrap-components.gz + rm .bridge-tmp/core-components.yaml .bridge-tmp/bootstrap-components.yaml + printf '%s\n' $(CAPI_BRIDGE_VERSION) | tee files/bridge-version ../capi-providers-core/files/bridge-version >/dev/null + if [ -f .bridge-tmp/core-components.yaml.orig ]; then rm .bridge-tmp/core-components.yaml.orig; fi + rmdir .bridge-tmp diff --git a/packages/system/capi-operator/charts/cluster-api-operator/Chart.yaml b/packages/system/capi-operator/charts/cluster-api-operator/Chart.yaml index 323a35948..7af29c9b4 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/Chart.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -appVersion: 0.19.0 +appVersion: 0.30.0 description: Cluster API Operator name: cluster-api-operator type: application -version: 0.19.0 +version: 0.30.0 diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/_helpers.tpl b/packages/system/capi-operator/charts/cluster-api-operator/templates/_helpers.tpl index a4c8b733d..bcd2c9ab2 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/_helpers.tpl +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/_helpers.tpl @@ -22,3 +22,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- end -}} {{- end -}} {{- end -}} + +{{- define "capi-operator.configSecret" -}} +{{- $ := .ROOT -}} +{{- $arg := .ARGUMENT -}} +configSecret: + name: {{ default (($.Values).configSecret).name (($arg).configSecret).name | toYaml }} + {{- if (default (($.Values).configSecret).namespace (($arg).configSecret).namespace) }} + namespace: {{ default (($.Values).configSecret).namespace (($arg).configSecret).namespace | toYaml }} + {{- end }} +{{- end -}} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/addon.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/addon.yaml index 6a3414966..0870b3cae 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/addon.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/addon.yaml @@ -3,6 +3,7 @@ {{- $addonNamespace := default ( printf "%s-%s" $name "addon-system" ) (get $addon "namespace") }} {{- $addonName := $name }} {{- $addonVersion := get $addon "version" }} +{{- if ne $addon.createNamespace false }} --- apiVersion: v1 kind: Namespace @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $addonNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: AddonProvider @@ -26,12 +28,30 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $addonVersion $.Values.secretName }} +{{- if or $addonVersion $.Values.secretName $.Values.secretNamespace $.Values.configSecret.name $addon.manager $addon.deployment (($addon).configSecret).name $addon.fetchConfig $addon.manifestPatches $addon.additionalManifests }} spec: {{- end}} +{{- if $addon.deployment }} + deployment: {{ toYaml $addon.deployment | nindent 4 }} +{{- end }} +{{- if $addon.manager }} + manager: + {{- if $addon.manager.metrics }} + metrics: + {{- if $addon.manager.metrics.insecureDiagnostics }} + insecureDiagnostics: {{ $addon.manager.metrics.insecureDiagnostics }} + {{- end }} + {{- if $addon.manager.metrics.diagnosticsAddress }} + diagnosticsAddress: {{ $addon.manager.metrics.diagnosticsAddress | toYaml }} + {{- end }} + {{- end }} +{{- end }} {{- if $addonVersion }} version: {{ $addonVersion }} {{- end }} +{{- if (default (($addon).configSecret).name (($.Values).configSecret).name) }} +{{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $addon) | nindent 2 }} +{{- end }} {{- if $.Values.secretName }} secretName: {{ $.Values.secretName }} {{- end }} @@ -41,6 +61,9 @@ spec: {{- if $addon.manifestPatches }} manifestPatches: {{ toYaml $addon.manifestPatches | nindent 4 }} {{- end }} +{{- if $addon.fetchConfig }} + fetchConfig: {{ toYaml $addon.fetchConfig | nindent 4 }} +{{- end }} {{- if $addon.additionalManifests }} additionalManifests: name: {{ $addon.additionalManifests.name }} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/bootstrap.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/bootstrap.yaml index 78dad47ee..f9e3cf7d2 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/bootstrap.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/bootstrap.yaml @@ -3,6 +3,7 @@ {{- $bootstrapNamespace := default ( printf "%s-%s" $name "bootstrap-system" ) (get $bootstrap "namespace") }} {{- $bootstrapName := $name }} {{- $bootstrapVersion := get $bootstrap "version" }} +{{- if ne $bootstrap.createNamespace false }} --- apiVersion: v1 kind: Namespace @@ -14,6 +15,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $bootstrapNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider @@ -26,22 +28,42 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $bootstrapVersion $.Values.configSecret.name }} +{{- if or $bootstrapVersion $.Values.configSecret.name $bootstrap.manager $bootstrap.deployment (($bootstrap).configSecret).name $bootstrap.fetchConfig $bootstrap.manifestPatches $bootstrap.additionalManifests }} spec: {{- end}} +{{- if $bootstrap.deployment }} + deployment: {{ toYaml $bootstrap.deployment | nindent 4 }} +{{- end }} +{{- if $bootstrap.manager }} + manager: + {{- if $bootstrap.manager.featureGates }} + featureGates: + {{- range $key, $value := $bootstrap.manager.featureGates }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + {{- if $bootstrap.manager.metrics }} + metrics: + {{- if $bootstrap.manager.metrics.insecureDiagnostics }} + insecureDiagnostics: {{ $bootstrap.manager.metrics.insecureDiagnostics }} + {{- end }} + {{- if $bootstrap.manager.metrics.diagnosticsAddress }} + diagnosticsAddress: {{ $bootstrap.manager.metrics.diagnosticsAddress | toYaml }} + {{- end }} + {{- end }} +{{- end }} {{- if $bootstrapVersion }} version: {{ $bootstrapVersion }} {{- end }} -{{- if $.Values.configSecret.name }} - configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} - {{- end }} +{{- if (default (($bootstrap).configSecret).name (($.Values).configSecret).name) }} +{{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $bootstrap) | nindent 2 }} {{- end }} {{- if $bootstrap.manifestPatches }} manifestPatches: {{ toYaml $bootstrap.manifestPatches | nindent 4 }} {{- end }} +{{- if $bootstrap.fetchConfig }} + fetchConfig: {{ toYaml $bootstrap.fetchConfig | nindent 4 }} +{{- end }} {{- if $bootstrap.additionalManifests }} additionalManifests: name: {{ $bootstrap.additionalManifests.name }} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/control-plane.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/control-plane.yaml index 8a020afdf..861775c72 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/control-plane.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/control-plane.yaml @@ -1,8 +1,10 @@ # Control plane provider {{- range $name, $controlPlane := $.Values.controlPlane }} +{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $controlPlane "key" $name) }} {{- $controlPlaneNamespace := default ( printf "%s-%s" $name "control-plane-system" ) (get $controlPlane "namespace") }} {{- $controlPlaneName := $name }} {{- $controlPlaneVersion := get $controlPlane "version" }} +{{- if ne $controlPlane.createNamespace false }} --- apiVersion: v1 kind: Namespace @@ -14,6 +16,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $controlPlaneNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider @@ -26,35 +29,42 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $controlPlaneVersion $.Values.configSecret.name $.Values.manager }} +{{- if or $controlPlaneVersion $.Values.configSecret.name $controlPlane.manager $controlPlane.deployment (($controlPlane).configSecret).name $controlPlane.fetchConfig $controlPlane.manifestPatches $controlPlane.additionalManifests }} spec: {{- end}} {{- if $controlPlaneVersion }} version: {{ $controlPlaneVersion }} {{- end }} -{{- if $.Values.manager }} -{{- if hasKey $.Values.manager.featureGates $controlPlaneName }} +{{- if $controlPlane.deployment }} + deployment: {{ toYaml $controlPlane.deployment | nindent 4 }} +{{- end }} +{{- if $controlPlane.manager }} manager: -{{- range $key, $value := $.Values.manager.featureGates }} - {{- if eq $key $controlPlaneName }} + {{- if $controlPlane.manager.featureGates }} featureGates: - {{- range $k, $v := $value }} - {{ $k }}: {{ $v }} + {{- range $key, $value := $controlPlane.manager.featureGates }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + {{- if $controlPlane.manager.metrics }} + metrics: + {{- if $controlPlane.manager.metrics.insecureDiagnostics }} + insecureDiagnostics: {{ $controlPlane.manager.metrics.insecureDiagnostics }} + {{- end }} + {{- if $controlPlane.manager.metrics.diagnosticsAddress }} + diagnosticsAddress: {{ $controlPlane.manager.metrics.diagnosticsAddress | toYaml }} {{- end }} {{- end }} {{- end }} -{{- end }} -{{- end }} -{{- if $.Values.configSecret.name }} - configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} - {{- end }} +{{- if (default (($controlPlane).configSecret).name (($.Values).configSecret).name) }} +{{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $controlPlane) | nindent 2 }} {{- end }} {{- if $controlPlane.manifestPatches }} manifestPatches: {{ toYaml $controlPlane.manifestPatches | nindent 4 }} {{- end }} +{{- if $controlPlane.fetchConfig }} + fetchConfig: {{ toYaml $controlPlane.fetchConfig | nindent 4 }} +{{- end }} {{- if $controlPlane.additionalManifests }} additionalManifests: name: {{ $controlPlane.additionalManifests.name }} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/core.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/core.yaml index 648e1b601..b3b6e0443 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/core.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/core.yaml @@ -1,8 +1,10 @@ # Core provider {{- range $name, $core := $.Values.core }} +{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $core "key" "core") }} {{- $coreNamespace := default "capi-system" (get $core "namespace") }} {{- $coreName := $name }} {{- $coreVersion := get $core "version" }} +{{- if ne $core.createNamespace false }} --- apiVersion: v1 kind: Namespace @@ -14,6 +16,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $coreNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider @@ -26,31 +29,42 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $coreVersion $.Values.configSecret.name $.Values.manager }} +{{- if or $coreVersion $.Values.configSecret.name $core.manager $core.deployment (($core).configSecret).name $core.fetchConfig $core.manifestPatches $core.additionalManifests }} spec: {{- end}} {{- if $coreVersion }} version: {{ $coreVersion }} {{- end }} -{{- if $.Values.manager }} -{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.core }} +{{- if $core.deployment }} + deployment: {{ toYaml $core.deployment | nindent 4 }} +{{- end }} +{{- if $core.manager }} manager: + {{- if $core.manager.featureGates }} featureGates: - {{- range $key, $value := $.Values.manager.featureGates.core }} + {{- range $key, $value := $core.manager.featureGates }} {{ $key }}: {{ $value }} {{- end }} -{{- end }} -{{- end }} -{{- if $.Values.configSecret.name }} - configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} + {{- end }} + {{- if $core.manager.metrics }} + metrics: + {{- if $core.manager.metrics.insecureDiagnostics }} + insecureDiagnostics: {{ $core.manager.metrics.insecureDiagnostics }} {{- end }} + {{- if $core.manager.metrics.diagnosticsAddress }} + diagnosticsAddress: {{ $core.manager.metrics.diagnosticsAddress | toYaml }} + {{- end }} + {{- end }} +{{- end }} +{{- if (default (($core).configSecret).name (($.Values).configSecret).name) }} +{{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $core) | nindent 2 }} {{- end }} {{- if $core.manifestPatches }} manifestPatches: {{ toYaml $core.manifestPatches | nindent 4 }} {{- end }} +{{- if $core.fetchConfig }} + fetchConfig: {{ toYaml $core.fetchConfig | nindent 4 }} +{{- end }} {{- if $core.additionalManifests }} additionalManifests: name: {{ $core.additionalManifests.name }} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/deployment.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/deployment.yaml index 1d51dce18..1ac13305d 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/deployment.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/deployment.yaml @@ -74,6 +74,9 @@ spec: {{- if .Values.watchConfigSecret }} - --watch-configsecret {{- end }} + {{- if .Values.watchConfigMap }} + - --watch-configmap + {{- end }} {{- with .Values.leaderElection }} - --leader-elect={{ .enabled }} {{- if .leaseDuration }} @@ -86,6 +89,12 @@ spec: - --leader-elect-retry-period={{ .retryPeriod }} {{- end }} {{- end }} + {{- if $.Values.profilerAddress }} + - --profiler-address={{ if hasPrefix ":" ($.Values.profilerAddress | toString) }}localhost{{ end }}{{ $.Values.profilerAddress }} + {{- end }} + {{- if $.Values.contentionProfiling }} + - --contention-profiling={{ $.Values.contentionProfiling }} + {{- end }} {{- with .Values.syncPeriod }} - --sync-period={{ . }} {{- end }} @@ -97,18 +106,21 @@ spec: imagePullPolicy: {{ .Values.image.manager.pullPolicy }} name: manager ports: + {{- if $.Values.profilerAddress }} + {{- $profilerPort := $.Values.profilerAddress | toString | splitList ":" | last | int }} + - containerPort: {{ $profilerPort }} + name: profiler + protocol: TCP + {{- end }} - containerPort: 9443 name: webhook-server protocol: TCP - {{- if $.Values.diagnosticsAddress }} - {{- $diagnosticsPort := $.Values.diagnosticsAddress }} - {{- if contains ":" $diagnosticsPort -}} - {{ $diagnosticsPort = ( split ":" $.Values.diagnosticsAddress)._1 | int }} - {{- end }} - - containerPort: {{ $diagnosticsPort | int }} - name: metrics + {{- if .Values.diagnosticsAddress }} + {{- $diagnosticsPort := .Values.diagnosticsAddress | toString | splitList ":" | last | int }} + - containerPort: {{ $diagnosticsPort }} + name: diagnostics protocol: TCP - {{- end }} + {{- end }} {{- with .Values.resources.manager }} resources: {{- toYaml . | nindent 12 }} @@ -126,15 +138,15 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} terminationMessagePolicy: FallbackToLogsOnError - {{- $healthAddr := $.Values.healthAddr }} - {{- if contains ":" $healthAddr -}} - {{ $healthAddr = ( split ":" $.Values.healthAddr)._1 | int }} + {{- $healthPort := 9440 }} + {{- if .Values.healthAddr }} + {{- $healthPort = .Values.healthAddr | toString | splitList ":" | last | int }} {{- end }} livenessProbe: failureThreshold: 3 httpGet: path: /healthz - port: {{ $healthAddr | default 9440 }} + port: {{ $healthPort }} scheme: HTTP initialDelaySeconds: 15 periodSeconds: 20 @@ -144,7 +156,7 @@ spec: failureThreshold: 3 httpGet: path: /readyz - port: {{ $healthAddr | default 9440 }} + port: {{ $healthPort }} scheme: HTTP initialDelaySeconds: 5 periodSeconds: 10 diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/infra-conditions.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/infra-conditions.yaml index d2c2c2170..648d1e4c1 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/infra-conditions.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/infra-conditions.yaml @@ -61,14 +61,11 @@ metadata: "argocd.argoproj.io/sync-wave": "2" {{- with .Values.configSecret }} spec: -{{- if $.Values.manager }} -{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.kubeadm }} +{{- $controlPlane := dict }} +{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $controlPlane "key" "kubeadm") }} +{{- with $controlPlane.manager }} manager: - featureGates: - {{- range $key, $value := $.Values.manager.featureGates.kubeadm }} - {{ $key }}: {{ $value }} - {{- end }} -{{- end }} + {{- toYaml . | nindent 4 }} {{- end }} configSecret: name: {{ .name }} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/infra.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/infra.yaml index 835607d4d..ce589f209 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/infra.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/infra.yaml @@ -1,8 +1,10 @@ # Infrastructure providers {{- range $name, $infra := $.Values.infrastructure }} +{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $infra "key" $name) }} {{- $infrastructureNamespace := default ( printf "%s-%s" $name "infrastructure-system" ) (get $infra "namespace") }} {{- $infrastructureName := $name }} {{- $infrastructureVersion := get $infra "version" }} +{{- if ne $infra.createNamespace false }} --- apiVersion: v1 kind: Namespace @@ -14,6 +16,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $infrastructureNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider @@ -26,41 +29,44 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} +{{- if or $infrastructureVersion $.Values.configSecret.name $infra.manager $infra.deployment $.Values.additionalDeployments (($infra).configSecret).name $infra.fetchConfig $infra.patches $infra.manifestPatches $infra.additionalManifests (and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName)) }} spec: {{- end }} {{- if $infrastructureVersion }} version: {{ $infrastructureVersion }} {{- end }} -{{- if $.Values.manager }} -{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $infrastructureName) }} +{{- if $infra.deployment }} + deployment: {{ toYaml $infra.deployment | nindent 4 }} +{{- end }} +{{- if $infra.manager }} manager: -{{- range $key, $value := $.Values.manager.featureGates }} - {{- if eq $key $infrastructureName }} + {{- if $infra.manager.featureGates }} featureGates: - {{- range $k, $v := $value }} - {{ $k }}: {{ $v }} + {{- range $key, $value := $infra.manager.featureGates }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + {{- if $infra.manager.metrics }} + metrics: + {{- if $infra.manager.metrics.insecureDiagnostics }} + insecureDiagnostics: {{ $infra.manager.metrics.insecureDiagnostics }} + {{- end }} + {{- if $infra.manager.metrics.diagnosticsAddress }} + diagnosticsAddress: {{ $infra.manager.metrics.diagnosticsAddress | toYaml }} {{- end }} {{- end }} {{- end }} -{{- end }} -{{- end }} -{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName) }} +{{- if and (not $infra.fetchConfig) (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName) }} {{- range $key, $value := $.Values.fetchConfig }} {{- if eq $key $infrastructureName }} - fetchConfig: - {{- range $k, $v := $value }} - {{ $k }}: {{ $v }} - {{- end }} +{{- if not (or (kindIs "invalid" $value) (and (kindIs "map" $value) (empty $value))) }} + fetchConfig: {{- toYaml $value | nindent 4 }} +{{- end }} {{- end }} {{- end }} {{- end }} -{{- if $.Values.configSecret.name }} - configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} - {{- end }} +{{- if (default (($infra).configSecret).name (($.Values).configSecret).name) }} +{{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $infra) | nindent 2 }} {{- end }} {{- if $.Values.additionalDeployments }} additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }} @@ -68,6 +74,12 @@ spec: {{- if $infra.manifestPatches }} manifestPatches: {{- toYaml $infra.manifestPatches | nindent 4 }} {{- end }} {{/* if $infra.manifestPatches */}} +{{- if $infra.patches }} + patches: {{ toYaml $infra.patches | nindent 4 }} +{{- end }} {{/* if $infra.patches */}} +{{- if $infra.fetchConfig }} + fetchConfig: {{ toYaml $infra.fetchConfig | nindent 4 }} +{{- end }} {{- if $infra.additionalManifests }} additionalManifests: name: {{ $infra.additionalManifests.name }} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/ipam.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/ipam.yaml index 4a33c42fb..9936ccc36 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/ipam.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/ipam.yaml @@ -1,8 +1,10 @@ # IPAM providers {{- range $name, $ipam := $.Values.ipam }} +{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $ipam "key" $name) }} {{- $ipamNamespace := default ( printf "%s-%s" $name "ipam-system" ) (get $ipam "namespace") }} {{- $ipamName := $name }} {{- $ipamVersion := get $ipam "version" }} +{{- if ne $ipam.createNamespace false }} --- apiVersion: v1 kind: Namespace @@ -14,6 +16,7 @@ metadata: {{- end }} "argocd.argoproj.io/sync-wave": "1" name: {{ $ipamNamespace }} +{{- end }} --- apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: IPAMProvider @@ -26,35 +29,51 @@ metadata: "helm.sh/hook-weight": "2" {{- end }} "argocd.argoproj.io/sync-wave": "2" -{{- if or $ipamVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} +{{- if or $ipamVersion $.Values.configSecret.name $ipam.manager $ipam.deployment $.Values.additionalDeployments (($ipam).configSecret).name $ipam.fetchConfig $ipam.manifestPatches $ipam.additionalManifests (and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $ipamName)) }} spec: {{- end }} {{- if $ipamVersion }} version: {{ $ipamVersion }} {{- end }} -{{- if $.Values.manager }} -{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $ipamName) }} +{{- if $ipam.deployment }} + deployment: {{ toYaml $ipam.deployment | nindent 4 }} +{{- end }} +{{- if $ipam.manager }} manager: -{{- range $key, $value := $.Values.manager.featureGates }} - {{- if eq $key $ipamName }} + {{- if $ipam.manager.featureGates }} featureGates: - {{- range $k, $v := $value }} - {{ $k }}: {{ $v }} + {{- range $key, $value := $ipam.manager.featureGates }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + {{- if $ipam.manager.metrics }} + metrics: + {{- if $ipam.manager.metrics.insecureDiagnostics }} + insecureDiagnostics: {{ $ipam.manager.metrics.insecureDiagnostics }} + {{- end }} + {{- if $ipam.manager.metrics.diagnosticsAddress }} + diagnosticsAddress: {{ $ipam.manager.metrics.diagnosticsAddress | toYaml }} {{- end }} {{- end }} {{- end }} +{{- if and (not $ipam.fetchConfig) (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $ipamName) }} +{{- range $key, $value := $.Values.fetchConfig }} + {{- if eq $key $ipamName }} +{{- if not (or (kindIs "invalid" $value) (and (kindIs "map" $value) (empty $value))) }} + fetchConfig: {{- toYaml $value | nindent 4 }} +{{- end }} + {{- end }} {{- end }} {{- end }} -{{- if $.Values.configSecret.name }} - configSecret: - name: {{ $.Values.configSecret.name }} - {{- if $.Values.configSecret.namespace }} - namespace: {{ $.Values.configSecret.namespace }} - {{- end }} +{{- if (default (($ipam).configSecret).name (($.Values).configSecret).name) }} +{{- include "capi-operator.configSecret" (dict "ROOT" $ "ARGUMENT" $ipam) | nindent 2 }} {{- end }} {{- if $ipam.manifestPatches }} manifestPatches: {{ toYaml $ipam.manifestPatches | nindent 4 }} {{- end }} +{{- if $ipam.fetchConfig }} + fetchConfig: {{ toYaml $ipam.fetchConfig | nindent 4 }} +{{- end }} {{- if $.Values.additionalDeployments }} additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }} {{- end }} diff --git a/packages/system/capi-operator/charts/cluster-api-operator/templates/operator-components.yaml b/packages/system/capi-operator/charts/cluster-api-operator/templates/operator-components.yaml index 0ee82bfc2..d57ca8c9f 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/templates/operator-components.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/templates/operator-components.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/capi-operator-serving-cert' - controller-gen.kubebuilder.io/version: v0.16.1 + controller-gen.kubebuilder.io/version: v0.21.0 helm.sh/resource-policy: keep labels: clusterctl.cluster.x-k8s.io/core: capi-operator @@ -360,7 +360,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -375,7 +374,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -543,7 +541,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -558,7 +555,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -652,8 +648,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched @@ -724,7 +720,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -739,7 +734,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -907,7 +901,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -922,7 +915,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1037,8 +1029,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -1097,6 +1090,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -1168,7 +1198,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -1281,9 +1311,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -1447,14 +1478,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -1831,7 +1874,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1846,7 +1888,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2013,7 +2054,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2028,7 +2068,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2122,8 +2161,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm @@ -2193,7 +2232,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2208,7 +2246,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2375,7 +2412,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2390,7 +2426,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2505,8 +2540,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -2564,6 +2600,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -2632,7 +2705,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -2743,9 +2816,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -2984,14 +3058,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -3043,65 +3129,114 @@ spec: provider manifests. Patches are applied in the order they are specified. The `kind` field must match the target object, and if `apiVersion` is specified it will only be applied to matching objects. - This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396 + This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396. + This will be deprecated in future releases in favor of `patches`. items: type: string type: array + patches: + description: |- + Patches are applied to the rendered provider manifests to customize the + provider manifests. Patches support both strategic merge patch and RFC6902 JSON patches. + Both `patches` and `manifestPatches` cannot be set at the same time. + items: + description: Patch defines a generic patch to be applied to provider + manifests. + properties: + patch: + description: Patch is content of the patch to be applied. It + should be an inline yaml blob-string. + type: string + target: + description: Target defines the target object to which the patch + should be applied. + properties: + group: + description: Group is the API Group of the target object. + type: string + kind: + description: Kind is the kind of the target object. + type: string + labelSelector: + description: |- + LabelSelector is a string that follows the label selection expression + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api + type: string + name: + description: Name is the name of the target object. + type: string + namespace: + description: Namespace is the namespace of the target object. + type: string + version: + description: Version is the API version of the target object. + type: string + type: object + type: object + type: array version: description: Version indicates the provider version. type: string type: object + x-kubernetes-validations: + - message: Cannot set both 'patches' and 'manifestPatches' + rule: '!(has(self.manifestPatches) && has(self.patches))' status: description: AddonProviderStatus defines the observed state of AddonProvider. properties: conditions: description: Conditions define the current service state of the provider. items: - description: Condition defines an observation of a Cluster API resource - operational state. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 + This may be an empty string. + maxLength: 32768 type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer reason: description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime + - message + - reason - status - type type: object @@ -3132,7 +3267,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/capi-operator-serving-cert' - controller-gen.kubebuilder.io/version: v0.16.1 + controller-gen.kubebuilder.io/version: v0.21.0 helm.sh/resource-policy: keep labels: clusterctl.cluster.x-k8s.io/core: capi-operator @@ -3159,1643 +3294,6 @@ spec: singular: bootstrapprovider scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .status.installedVersion - name: InstalledVersion - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - deprecated: true - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - BootstrapProvider is the Schema for the bootstrapproviders API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: BootstrapProviderSpec defines the desired state of BootstrapProvider. - properties: - additionalManifests: - description: |- - AdditionalManifests is reference to configmap that contains additional manifests that will be applied - together with the provider components. The key for storing these manifests has to be `manifests`. - The manifests are applied only once when a certain release is installed/upgraded. If namespace is not specified, the - namespace of the provider will be used. There is no validation of the yaml content inside the configmap. - properties: - name: - description: Name defines the name of the configmap. - type: string - namespace: - description: Namespace defines the namespace of the configmap. - type: string - required: - - name - type: object - deployment: - description: Deployment defines the properties that can be enabled - on the deployment for the provider. - properties: - affinity: - description: If specified, the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for - the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with - the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the - corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, etc. - as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - containers: - description: List of containers specified in the Deployment - items: - description: |- - ContainerSpec defines the properties available to override for each - container in a provider deployment such as Image and Args to the container’s - entrypoint. - properties: - args: - additionalProperties: - type: string - description: |- - Args represents extra provider specific flags that are not encoded as fields in this API. - Explicit controller manager properties defined in the `Provider.ManagerSpec` - will have higher precedence than those defined in `ContainerSpec.Args`. - For example, `ManagerSpec.SyncPeriod` will be used instead of the - container arg `--sync-period` if both are defined. - The same holds for `ManagerSpec.FeatureGates` and `--feature-gates`. - type: object - command: - description: Command allows override container's entrypoint - array. - items: - type: string - type: array - env: - description: List of environment variables to set in the - container. - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Container Image Name - properties: - name: - description: Name allows to specify a name for the image. - type: string - repository: - description: Repository sets the container registry - to pull images from. - type: string - tag: - description: Tag allows to specify a tag for the image. - type: string - type: object - name: - description: Name of the container. Cannot be updated. - type: string - resources: - description: Compute resources required by this container. - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - required: - - name - type: object - type: array - imagePullSecrets: - description: List of image pull secrets specified in the Deployment - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - nodeSelector: - additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - type: object - replicas: - description: Number of desired pods. This is a pointer to distinguish - between explicit zero and not specified. Defaults to 1. - minimum: 0 - type: integer - serviceAccountName: - description: If specified, the pod's service account - type: string - tolerations: - description: If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - type: object - fetchConfig: - description: |- - FetchConfig determines how the operator will fetch the components and metadata for the provider. - If nil, the operator will try to fetch components according to default - embedded fetch configuration for the given kind and `ObjectMeta.Name`. - For example, the infrastructure name `aws` will fetch artifacts from - https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases. - properties: - selector: - description: |- - Selector to be used for fetching provider’s components and metadata from - ConfigMaps stored inside the cluster. Each ConfigMap is expected to contain - components and metadata for a specific version only. - Note: the name of the ConfigMap should be set to the version or to override this - add a label like the following: provider.cluster.x-k8s.io/version=v1.4.3 - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - url: - description: |- - URL to be used for fetching the provider’s components and metadata from a remote Github repository. - For example, https://github.com/{owner}/{repository}/releases - You must set `providerSpec.Version` field for operator to pick up - desired version of the release from GitHub. - type: string - type: object - manager: - description: Manager defines the properties that can be enabled on - the controller manager for the provider. - properties: - cacheNamespace: - description: |- - CacheNamespace if specified restricts the manager's cache to watch objects in - the desired namespace Defaults to all namespaces - - Note: If a namespace is specified, controllers can still Watch for a - cluster-scoped resource (e.g Node). For namespaced resources the cache - will only hold objects from the desired namespace. - type: string - controller: - description: |- - Controller contains global configuration options for controllers - registered within this manager. - properties: - cacheSyncTimeout: - description: |- - CacheSyncTimeout refers to the time limit set to wait for syncing caches. - Defaults to 2 minutes if not set. - format: int64 - type: integer - groupKindConcurrency: - additionalProperties: - type: integer - description: |- - GroupKindConcurrency is a map from a Kind to the number of concurrent reconciliation - allowed for that controller. - - When a controller is registered within this manager using the builder utilities, - users have to specify the type the controller reconciles in the For(...) call. - If the object's kind passed matches one of the keys in this map, the concurrency - for that controller is set to the number specified. - - The key is expected to be consistent in form with GroupKind.String(), - e.g. ReplicaSet in apps group (regardless of version) would be `ReplicaSet.apps`. - type: object - recoverPanic: - description: RecoverPanic indicates if panics should be recovered. - type: boolean - type: object - featureGates: - additionalProperties: - type: boolean - description: |- - FeatureGates define provider specific feature flags that will be passed - in as container args to the provider's controller manager. - Controller Manager flag is --feature-gates. - type: object - gracefulShutDown: - description: |- - GracefulShutdownTimeout is the duration given to runnable to stop before the manager actually returns on stop. - To disable graceful shutdown, set to time.Duration(0) - To use graceful shutdown without timeout, set to a negative duration, e.G. time.Duration(-1) - The graceful shutdown is skipped for safety reasons in case the leader election lease is lost. - type: string - health: - description: Health contains the controller health configuration - properties: - healthProbeBindAddress: - description: |- - HealthProbeBindAddress is the TCP address that the controller should bind to - for serving health probes - It can be set to "0" or "" to disable serving the health probe. - type: string - livenessEndpointName: - description: LivenessEndpointName, defaults to "healthz" - type: string - readinessEndpointName: - description: ReadinessEndpointName, defaults to "readyz" - type: string - type: object - leaderElection: - description: |- - LeaderElection is the LeaderElection config to be used when configuring - the manager.Manager leader election - properties: - leaderElect: - description: |- - leaderElect enables a leader election client to gain leadership - before executing the main loop. Enable this when running replicated - components for high availability. - type: boolean - leaseDuration: - description: |- - leaseDuration is the duration that non-leader candidates will wait - after observing a leadership renewal until attempting to acquire - leadership of a led but unrenewed leader slot. This is effectively the - maximum duration that a leader can be stopped before it is replaced - by another candidate. This is only applicable if leader election is - enabled. - type: string - renewDeadline: - description: |- - renewDeadline is the interval between attempts by the acting master to - renew a leadership slot before it stops leading. This must be less - than or equal to the lease duration. This is only applicable if leader - election is enabled. - type: string - resourceLock: - description: |- - resourceLock indicates the resource object type that will be used to lock - during leader election cycles. - type: string - resourceName: - description: |- - resourceName indicates the name of resource object that will be used to lock - during leader election cycles. - type: string - resourceNamespace: - description: |- - resourceName indicates the namespace of resource object that will be used to lock - during leader election cycles. - type: string - retryPeriod: - description: |- - retryPeriod is the duration the clients should wait between attempting - acquisition and renewal of a leadership. This is only applicable if - leader election is enabled. - type: string - required: - - leaderElect - - leaseDuration - - renewDeadline - - resourceLock - - resourceName - - resourceNamespace - - retryPeriod - type: object - maxConcurrentReconciles: - description: |- - MaxConcurrentReconciles is the maximum number of concurrent Reconciles - which can be run. - minimum: 1 - type: integer - metrics: - description: Metrics contains thw controller metrics configuration - properties: - bindAddress: - description: |- - BindAddress is the TCP address that the controller should bind to - for serving prometheus metrics. - It can be set to "0" to disable the metrics serving. - type: string - type: object - profilerAddress: - description: |- - ProfilerAddress defines the bind address to expose the pprof profiler (e.g. localhost:6060). - Default empty, meaning the profiler is disabled. - Controller Manager flag is --profiler-address. - type: string - syncPeriod: - description: |- - SyncPeriod determines the minimum frequency at which watched resources are - reconciled. A lower period will correct entropy more quickly, but reduce - responsiveness to change if there are many watched resources. Change this - value only if you know what you are doing. Defaults to 10 hours if unset. - there will a 10 percent jitter between the SyncPeriod of all controllers - so that all controllers will not send list requests simultaneously. - type: string - verbosity: - default: 1 - description: |- - Verbosity set the logs verbosity. Defaults to 1. - Controller Manager flag is --verbosity. - minimum: 0 - type: integer - webhook: - description: Webhook contains the controllers webhook configuration - properties: - certDir: - description: |- - CertDir is the directory that contains the server key and certificate. - if not set, webhook server would look up the server key and certificate in - {TempDir}/k8s-webhook-server/serving-certs. The server key and certificate - must be named tls.key and tls.crt, respectively. - type: string - host: - description: |- - Host is the hostname that the webhook server binds to. - It is used to set webhook.Server.Host. - type: string - port: - description: |- - Port is the port that the webhook server serves at. - It is used to set webhook.Server.Port. - type: integer - type: object - type: object - secretName: - description: |- - SecretName is the name of the Secret providing the configuration - variables for the current provider instance, like e.g. credentials. - Such configurations will be used when creating or upgrading provider components. - The contents of the secret will be treated as immutable. If changes need - to be made, a new object can be created and the name should be updated. - The contents should be in the form of key:value. This secret must be in - the same namespace as the provider. - type: string - secretNamespace: - description: |- - SecretNamespace is the namespace of the Secret providing the configuration variables. If not specified, - the namespace of the provider will be used. - type: string - version: - description: Version indicates the provider version. - type: string - type: object - status: - description: BootstrapProviderStatus defines the observed state of BootstrapProvider. - properties: - conditions: - description: Conditions define the current service state of the provider. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 - minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 - type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - contract: - description: |- - Contract will contain the core provider contract that the provider is - abiding by, like e.g. v1alpha4. - type: string - installedVersion: - description: InstalledVersion is the version of the provider that - is installed. - type: string - observedGeneration: - description: ObservedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - jsonPath: .status.installedVersion name: InstalledVersion @@ -5126,7 +3624,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5141,7 +3638,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5309,7 +3805,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5324,7 +3819,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5418,8 +3912,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched @@ -5490,7 +3984,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5505,7 +3998,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5673,7 +4165,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5688,7 +4179,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -5803,8 +4293,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -5863,6 +4354,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -5934,7 +4462,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -6047,9 +4575,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -6213,14 +4742,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -6597,7 +5138,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -6612,7 +5152,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -6779,7 +5318,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -6794,7 +5332,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -6888,8 +5425,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm @@ -6959,7 +5496,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -6974,7 +5510,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -7141,7 +5676,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -7156,7 +5690,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -7271,8 +5804,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -7330,6 +5864,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -7398,7 +5969,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -7509,9 +6080,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -7750,14 +6322,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -7809,65 +6393,114 @@ spec: provider manifests. Patches are applied in the order they are specified. The `kind` field must match the target object, and if `apiVersion` is specified it will only be applied to matching objects. - This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396 + This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396. + This will be deprecated in future releases in favor of `patches`. items: type: string type: array + patches: + description: |- + Patches are applied to the rendered provider manifests to customize the + provider manifests. Patches support both strategic merge patch and RFC6902 JSON patches. + Both `patches` and `manifestPatches` cannot be set at the same time. + items: + description: Patch defines a generic patch to be applied to provider + manifests. + properties: + patch: + description: Patch is content of the patch to be applied. It + should be an inline yaml blob-string. + type: string + target: + description: Target defines the target object to which the patch + should be applied. + properties: + group: + description: Group is the API Group of the target object. + type: string + kind: + description: Kind is the kind of the target object. + type: string + labelSelector: + description: |- + LabelSelector is a string that follows the label selection expression + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api + type: string + name: + description: Name is the name of the target object. + type: string + namespace: + description: Namespace is the namespace of the target object. + type: string + version: + description: Version is the API version of the target object. + type: string + type: object + type: object + type: array version: description: Version indicates the provider version. type: string type: object + x-kubernetes-validations: + - message: Cannot set both 'patches' and 'manifestPatches' + rule: '!(has(self.manifestPatches) && has(self.patches))' status: description: BootstrapProviderStatus defines the observed state of BootstrapProvider. properties: conditions: description: Conditions define the current service state of the provider. items: - description: Condition defines an observation of a Cluster API resource - operational state. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 + This may be an empty string. + maxLength: 32768 type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer reason: description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime + - message + - reason - status - type type: object @@ -7898,7 +6531,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/capi-operator-serving-cert' - controller-gen.kubebuilder.io/version: v0.16.1 + controller-gen.kubebuilder.io/version: v0.21.0 helm.sh/resource-policy: keep labels: clusterctl.cluster.x-k8s.io/core: capi-operator @@ -7925,1644 +6558,6 @@ spec: singular: controlplaneprovider scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .status.installedVersion - name: InstalledVersion - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - deprecated: true - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - ControlPlaneProvider is the Schema for the controlplaneproviders API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: ControlPlaneProviderSpec defines the desired state of ControlPlaneProvider. - properties: - additionalManifests: - description: |- - AdditionalManifests is reference to configmap that contains additional manifests that will be applied - together with the provider components. The key for storing these manifests has to be `manifests`. - The manifests are applied only once when a certain release is installed/upgraded. If namespace is not specified, the - namespace of the provider will be used. There is no validation of the yaml content inside the configmap. - properties: - name: - description: Name defines the name of the configmap. - type: string - namespace: - description: Namespace defines the namespace of the configmap. - type: string - required: - - name - type: object - deployment: - description: Deployment defines the properties that can be enabled - on the deployment for the provider. - properties: - affinity: - description: If specified, the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for - the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with - the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the - corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, etc. - as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - containers: - description: List of containers specified in the Deployment - items: - description: |- - ContainerSpec defines the properties available to override for each - container in a provider deployment such as Image and Args to the container’s - entrypoint. - properties: - args: - additionalProperties: - type: string - description: |- - Args represents extra provider specific flags that are not encoded as fields in this API. - Explicit controller manager properties defined in the `Provider.ManagerSpec` - will have higher precedence than those defined in `ContainerSpec.Args`. - For example, `ManagerSpec.SyncPeriod` will be used instead of the - container arg `--sync-period` if both are defined. - The same holds for `ManagerSpec.FeatureGates` and `--feature-gates`. - type: object - command: - description: Command allows override container's entrypoint - array. - items: - type: string - type: array - env: - description: List of environment variables to set in the - container. - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Container Image Name - properties: - name: - description: Name allows to specify a name for the image. - type: string - repository: - description: Repository sets the container registry - to pull images from. - type: string - tag: - description: Tag allows to specify a tag for the image. - type: string - type: object - name: - description: Name of the container. Cannot be updated. - type: string - resources: - description: Compute resources required by this container. - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - required: - - name - type: object - type: array - imagePullSecrets: - description: List of image pull secrets specified in the Deployment - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - nodeSelector: - additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - type: object - replicas: - description: Number of desired pods. This is a pointer to distinguish - between explicit zero and not specified. Defaults to 1. - minimum: 0 - type: integer - serviceAccountName: - description: If specified, the pod's service account - type: string - tolerations: - description: If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - type: object - fetchConfig: - description: |- - FetchConfig determines how the operator will fetch the components and metadata for the provider. - If nil, the operator will try to fetch components according to default - embedded fetch configuration for the given kind and `ObjectMeta.Name`. - For example, the infrastructure name `aws` will fetch artifacts from - https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases. - properties: - selector: - description: |- - Selector to be used for fetching provider’s components and metadata from - ConfigMaps stored inside the cluster. Each ConfigMap is expected to contain - components and metadata for a specific version only. - Note: the name of the ConfigMap should be set to the version or to override this - add a label like the following: provider.cluster.x-k8s.io/version=v1.4.3 - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - url: - description: |- - URL to be used for fetching the provider’s components and metadata from a remote Github repository. - For example, https://github.com/{owner}/{repository}/releases - You must set `providerSpec.Version` field for operator to pick up - desired version of the release from GitHub. - type: string - type: object - manager: - description: Manager defines the properties that can be enabled on - the controller manager for the provider. - properties: - cacheNamespace: - description: |- - CacheNamespace if specified restricts the manager's cache to watch objects in - the desired namespace Defaults to all namespaces - - Note: If a namespace is specified, controllers can still Watch for a - cluster-scoped resource (e.g Node). For namespaced resources the cache - will only hold objects from the desired namespace. - type: string - controller: - description: |- - Controller contains global configuration options for controllers - registered within this manager. - properties: - cacheSyncTimeout: - description: |- - CacheSyncTimeout refers to the time limit set to wait for syncing caches. - Defaults to 2 minutes if not set. - format: int64 - type: integer - groupKindConcurrency: - additionalProperties: - type: integer - description: |- - GroupKindConcurrency is a map from a Kind to the number of concurrent reconciliation - allowed for that controller. - - When a controller is registered within this manager using the builder utilities, - users have to specify the type the controller reconciles in the For(...) call. - If the object's kind passed matches one of the keys in this map, the concurrency - for that controller is set to the number specified. - - The key is expected to be consistent in form with GroupKind.String(), - e.g. ReplicaSet in apps group (regardless of version) would be `ReplicaSet.apps`. - type: object - recoverPanic: - description: RecoverPanic indicates if panics should be recovered. - type: boolean - type: object - featureGates: - additionalProperties: - type: boolean - description: |- - FeatureGates define provider specific feature flags that will be passed - in as container args to the provider's controller manager. - Controller Manager flag is --feature-gates. - type: object - gracefulShutDown: - description: |- - GracefulShutdownTimeout is the duration given to runnable to stop before the manager actually returns on stop. - To disable graceful shutdown, set to time.Duration(0) - To use graceful shutdown without timeout, set to a negative duration, e.G. time.Duration(-1) - The graceful shutdown is skipped for safety reasons in case the leader election lease is lost. - type: string - health: - description: Health contains the controller health configuration - properties: - healthProbeBindAddress: - description: |- - HealthProbeBindAddress is the TCP address that the controller should bind to - for serving health probes - It can be set to "0" or "" to disable serving the health probe. - type: string - livenessEndpointName: - description: LivenessEndpointName, defaults to "healthz" - type: string - readinessEndpointName: - description: ReadinessEndpointName, defaults to "readyz" - type: string - type: object - leaderElection: - description: |- - LeaderElection is the LeaderElection config to be used when configuring - the manager.Manager leader election - properties: - leaderElect: - description: |- - leaderElect enables a leader election client to gain leadership - before executing the main loop. Enable this when running replicated - components for high availability. - type: boolean - leaseDuration: - description: |- - leaseDuration is the duration that non-leader candidates will wait - after observing a leadership renewal until attempting to acquire - leadership of a led but unrenewed leader slot. This is effectively the - maximum duration that a leader can be stopped before it is replaced - by another candidate. This is only applicable if leader election is - enabled. - type: string - renewDeadline: - description: |- - renewDeadline is the interval between attempts by the acting master to - renew a leadership slot before it stops leading. This must be less - than or equal to the lease duration. This is only applicable if leader - election is enabled. - type: string - resourceLock: - description: |- - resourceLock indicates the resource object type that will be used to lock - during leader election cycles. - type: string - resourceName: - description: |- - resourceName indicates the name of resource object that will be used to lock - during leader election cycles. - type: string - resourceNamespace: - description: |- - resourceName indicates the namespace of resource object that will be used to lock - during leader election cycles. - type: string - retryPeriod: - description: |- - retryPeriod is the duration the clients should wait between attempting - acquisition and renewal of a leadership. This is only applicable if - leader election is enabled. - type: string - required: - - leaderElect - - leaseDuration - - renewDeadline - - resourceLock - - resourceName - - resourceNamespace - - retryPeriod - type: object - maxConcurrentReconciles: - description: |- - MaxConcurrentReconciles is the maximum number of concurrent Reconciles - which can be run. - minimum: 1 - type: integer - metrics: - description: Metrics contains thw controller metrics configuration - properties: - bindAddress: - description: |- - BindAddress is the TCP address that the controller should bind to - for serving prometheus metrics. - It can be set to "0" to disable the metrics serving. - type: string - type: object - profilerAddress: - description: |- - ProfilerAddress defines the bind address to expose the pprof profiler (e.g. localhost:6060). - Default empty, meaning the profiler is disabled. - Controller Manager flag is --profiler-address. - type: string - syncPeriod: - description: |- - SyncPeriod determines the minimum frequency at which watched resources are - reconciled. A lower period will correct entropy more quickly, but reduce - responsiveness to change if there are many watched resources. Change this - value only if you know what you are doing. Defaults to 10 hours if unset. - there will a 10 percent jitter between the SyncPeriod of all controllers - so that all controllers will not send list requests simultaneously. - type: string - verbosity: - default: 1 - description: |- - Verbosity set the logs verbosity. Defaults to 1. - Controller Manager flag is --verbosity. - minimum: 0 - type: integer - webhook: - description: Webhook contains the controllers webhook configuration - properties: - certDir: - description: |- - CertDir is the directory that contains the server key and certificate. - if not set, webhook server would look up the server key and certificate in - {TempDir}/k8s-webhook-server/serving-certs. The server key and certificate - must be named tls.key and tls.crt, respectively. - type: string - host: - description: |- - Host is the hostname that the webhook server binds to. - It is used to set webhook.Server.Host. - type: string - port: - description: |- - Port is the port that the webhook server serves at. - It is used to set webhook.Server.Port. - type: integer - type: object - type: object - secretName: - description: |- - SecretName is the name of the Secret providing the configuration - variables for the current provider instance, like e.g. credentials. - Such configurations will be used when creating or upgrading provider components. - The contents of the secret will be treated as immutable. If changes need - to be made, a new object can be created and the name should be updated. - The contents should be in the form of key:value. This secret must be in - the same namespace as the provider. - type: string - secretNamespace: - description: |- - SecretNamespace is the namespace of the Secret providing the configuration variables. If not specified, - the namespace of the provider will be used. - type: string - version: - description: Version indicates the provider version. - type: string - type: object - status: - description: ControlPlaneProviderStatus defines the observed state of - ControlPlaneProvider. - properties: - conditions: - description: Conditions define the current service state of the provider. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 - minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 - type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - contract: - description: |- - Contract will contain the core provider contract that the provider is - abiding by, like e.g. v1alpha4. - type: string - installedVersion: - description: InstalledVersion is the version of the provider that - is installed. - type: string - observedGeneration: - description: ObservedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - jsonPath: .status.installedVersion name: InstalledVersion @@ -9894,7 +6889,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -9909,7 +6903,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -10077,7 +7070,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -10092,7 +7084,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -10186,8 +7177,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched @@ -10258,7 +7249,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -10273,7 +7263,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -10441,7 +7430,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -10456,7 +7444,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -10571,8 +7558,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -10631,6 +7619,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -10702,7 +7727,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -10815,9 +7840,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -10981,14 +8007,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -11365,7 +8403,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -11380,7 +8417,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -11547,7 +8583,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -11562,7 +8597,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -11656,8 +8690,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm @@ -11727,7 +8761,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -11742,7 +8775,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -11909,7 +8941,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -11924,7 +8955,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -12039,8 +9069,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -12098,6 +9129,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -12166,7 +9234,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -12277,9 +9345,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -12518,14 +9587,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -12577,14 +9658,58 @@ spec: provider manifests. Patches are applied in the order they are specified. The `kind` field must match the target object, and if `apiVersion` is specified it will only be applied to matching objects. - This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396 + This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396. + This will be deprecated in future releases in favor of `patches`. items: type: string type: array + patches: + description: |- + Patches are applied to the rendered provider manifests to customize the + provider manifests. Patches support both strategic merge patch and RFC6902 JSON patches. + Both `patches` and `manifestPatches` cannot be set at the same time. + items: + description: Patch defines a generic patch to be applied to provider + manifests. + properties: + patch: + description: Patch is content of the patch to be applied. It + should be an inline yaml blob-string. + type: string + target: + description: Target defines the target object to which the patch + should be applied. + properties: + group: + description: Group is the API Group of the target object. + type: string + kind: + description: Kind is the kind of the target object. + type: string + labelSelector: + description: |- + LabelSelector is a string that follows the label selection expression + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api + type: string + name: + description: Name is the name of the target object. + type: string + namespace: + description: Namespace is the namespace of the target object. + type: string + version: + description: Version is the API version of the target object. + type: string + type: object + type: object + type: array version: description: Version indicates the provider version. type: string type: object + x-kubernetes-validations: + - message: Cannot set both 'patches' and 'manifestPatches' + rule: '!(has(self.manifestPatches) && has(self.patches))' status: description: ControlPlaneProviderStatus defines the observed state of ControlPlaneProvider. @@ -12592,51 +9717,56 @@ spec: conditions: description: Conditions define the current service state of the provider. items: - description: Condition defines an observation of a Cluster API resource - operational state. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 + This may be an empty string. + maxLength: 32768 type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer reason: description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime + - message + - reason - status - type type: object @@ -12667,7 +9797,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/capi-operator-serving-cert' - controller-gen.kubebuilder.io/version: v0.16.1 + controller-gen.kubebuilder.io/version: v0.21.0 helm.sh/resource-policy: keep labels: clusterctl.cluster.x-k8s.io/core: capi-operator @@ -12694,1643 +9824,6 @@ spec: singular: coreprovider scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .status.installedVersion - name: InstalledVersion - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - deprecated: true - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - CoreProvider is the Schema for the coreproviders API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: CoreProviderSpec defines the desired state of CoreProvider. - properties: - additionalManifests: - description: |- - AdditionalManifests is reference to configmap that contains additional manifests that will be applied - together with the provider components. The key for storing these manifests has to be `manifests`. - The manifests are applied only once when a certain release is installed/upgraded. If namespace is not specified, the - namespace of the provider will be used. There is no validation of the yaml content inside the configmap. - properties: - name: - description: Name defines the name of the configmap. - type: string - namespace: - description: Namespace defines the namespace of the configmap. - type: string - required: - - name - type: object - deployment: - description: Deployment defines the properties that can be enabled - on the deployment for the provider. - properties: - affinity: - description: If specified, the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for - the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with - the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the - corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, etc. - as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - containers: - description: List of containers specified in the Deployment - items: - description: |- - ContainerSpec defines the properties available to override for each - container in a provider deployment such as Image and Args to the container’s - entrypoint. - properties: - args: - additionalProperties: - type: string - description: |- - Args represents extra provider specific flags that are not encoded as fields in this API. - Explicit controller manager properties defined in the `Provider.ManagerSpec` - will have higher precedence than those defined in `ContainerSpec.Args`. - For example, `ManagerSpec.SyncPeriod` will be used instead of the - container arg `--sync-period` if both are defined. - The same holds for `ManagerSpec.FeatureGates` and `--feature-gates`. - type: object - command: - description: Command allows override container's entrypoint - array. - items: - type: string - type: array - env: - description: List of environment variables to set in the - container. - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Container Image Name - properties: - name: - description: Name allows to specify a name for the image. - type: string - repository: - description: Repository sets the container registry - to pull images from. - type: string - tag: - description: Tag allows to specify a tag for the image. - type: string - type: object - name: - description: Name of the container. Cannot be updated. - type: string - resources: - description: Compute resources required by this container. - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - required: - - name - type: object - type: array - imagePullSecrets: - description: List of image pull secrets specified in the Deployment - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - nodeSelector: - additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - type: object - replicas: - description: Number of desired pods. This is a pointer to distinguish - between explicit zero and not specified. Defaults to 1. - minimum: 0 - type: integer - serviceAccountName: - description: If specified, the pod's service account - type: string - tolerations: - description: If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - type: object - fetchConfig: - description: |- - FetchConfig determines how the operator will fetch the components and metadata for the provider. - If nil, the operator will try to fetch components according to default - embedded fetch configuration for the given kind and `ObjectMeta.Name`. - For example, the infrastructure name `aws` will fetch artifacts from - https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases. - properties: - selector: - description: |- - Selector to be used for fetching provider’s components and metadata from - ConfigMaps stored inside the cluster. Each ConfigMap is expected to contain - components and metadata for a specific version only. - Note: the name of the ConfigMap should be set to the version or to override this - add a label like the following: provider.cluster.x-k8s.io/version=v1.4.3 - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - url: - description: |- - URL to be used for fetching the provider’s components and metadata from a remote Github repository. - For example, https://github.com/{owner}/{repository}/releases - You must set `providerSpec.Version` field for operator to pick up - desired version of the release from GitHub. - type: string - type: object - manager: - description: Manager defines the properties that can be enabled on - the controller manager for the provider. - properties: - cacheNamespace: - description: |- - CacheNamespace if specified restricts the manager's cache to watch objects in - the desired namespace Defaults to all namespaces - - Note: If a namespace is specified, controllers can still Watch for a - cluster-scoped resource (e.g Node). For namespaced resources the cache - will only hold objects from the desired namespace. - type: string - controller: - description: |- - Controller contains global configuration options for controllers - registered within this manager. - properties: - cacheSyncTimeout: - description: |- - CacheSyncTimeout refers to the time limit set to wait for syncing caches. - Defaults to 2 minutes if not set. - format: int64 - type: integer - groupKindConcurrency: - additionalProperties: - type: integer - description: |- - GroupKindConcurrency is a map from a Kind to the number of concurrent reconciliation - allowed for that controller. - - When a controller is registered within this manager using the builder utilities, - users have to specify the type the controller reconciles in the For(...) call. - If the object's kind passed matches one of the keys in this map, the concurrency - for that controller is set to the number specified. - - The key is expected to be consistent in form with GroupKind.String(), - e.g. ReplicaSet in apps group (regardless of version) would be `ReplicaSet.apps`. - type: object - recoverPanic: - description: RecoverPanic indicates if panics should be recovered. - type: boolean - type: object - featureGates: - additionalProperties: - type: boolean - description: |- - FeatureGates define provider specific feature flags that will be passed - in as container args to the provider's controller manager. - Controller Manager flag is --feature-gates. - type: object - gracefulShutDown: - description: |- - GracefulShutdownTimeout is the duration given to runnable to stop before the manager actually returns on stop. - To disable graceful shutdown, set to time.Duration(0) - To use graceful shutdown without timeout, set to a negative duration, e.G. time.Duration(-1) - The graceful shutdown is skipped for safety reasons in case the leader election lease is lost. - type: string - health: - description: Health contains the controller health configuration - properties: - healthProbeBindAddress: - description: |- - HealthProbeBindAddress is the TCP address that the controller should bind to - for serving health probes - It can be set to "0" or "" to disable serving the health probe. - type: string - livenessEndpointName: - description: LivenessEndpointName, defaults to "healthz" - type: string - readinessEndpointName: - description: ReadinessEndpointName, defaults to "readyz" - type: string - type: object - leaderElection: - description: |- - LeaderElection is the LeaderElection config to be used when configuring - the manager.Manager leader election - properties: - leaderElect: - description: |- - leaderElect enables a leader election client to gain leadership - before executing the main loop. Enable this when running replicated - components for high availability. - type: boolean - leaseDuration: - description: |- - leaseDuration is the duration that non-leader candidates will wait - after observing a leadership renewal until attempting to acquire - leadership of a led but unrenewed leader slot. This is effectively the - maximum duration that a leader can be stopped before it is replaced - by another candidate. This is only applicable if leader election is - enabled. - type: string - renewDeadline: - description: |- - renewDeadline is the interval between attempts by the acting master to - renew a leadership slot before it stops leading. This must be less - than or equal to the lease duration. This is only applicable if leader - election is enabled. - type: string - resourceLock: - description: |- - resourceLock indicates the resource object type that will be used to lock - during leader election cycles. - type: string - resourceName: - description: |- - resourceName indicates the name of resource object that will be used to lock - during leader election cycles. - type: string - resourceNamespace: - description: |- - resourceName indicates the namespace of resource object that will be used to lock - during leader election cycles. - type: string - retryPeriod: - description: |- - retryPeriod is the duration the clients should wait between attempting - acquisition and renewal of a leadership. This is only applicable if - leader election is enabled. - type: string - required: - - leaderElect - - leaseDuration - - renewDeadline - - resourceLock - - resourceName - - resourceNamespace - - retryPeriod - type: object - maxConcurrentReconciles: - description: |- - MaxConcurrentReconciles is the maximum number of concurrent Reconciles - which can be run. - minimum: 1 - type: integer - metrics: - description: Metrics contains thw controller metrics configuration - properties: - bindAddress: - description: |- - BindAddress is the TCP address that the controller should bind to - for serving prometheus metrics. - It can be set to "0" to disable the metrics serving. - type: string - type: object - profilerAddress: - description: |- - ProfilerAddress defines the bind address to expose the pprof profiler (e.g. localhost:6060). - Default empty, meaning the profiler is disabled. - Controller Manager flag is --profiler-address. - type: string - syncPeriod: - description: |- - SyncPeriod determines the minimum frequency at which watched resources are - reconciled. A lower period will correct entropy more quickly, but reduce - responsiveness to change if there are many watched resources. Change this - value only if you know what you are doing. Defaults to 10 hours if unset. - there will a 10 percent jitter between the SyncPeriod of all controllers - so that all controllers will not send list requests simultaneously. - type: string - verbosity: - default: 1 - description: |- - Verbosity set the logs verbosity. Defaults to 1. - Controller Manager flag is --verbosity. - minimum: 0 - type: integer - webhook: - description: Webhook contains the controllers webhook configuration - properties: - certDir: - description: |- - CertDir is the directory that contains the server key and certificate. - if not set, webhook server would look up the server key and certificate in - {TempDir}/k8s-webhook-server/serving-certs. The server key and certificate - must be named tls.key and tls.crt, respectively. - type: string - host: - description: |- - Host is the hostname that the webhook server binds to. - It is used to set webhook.Server.Host. - type: string - port: - description: |- - Port is the port that the webhook server serves at. - It is used to set webhook.Server.Port. - type: integer - type: object - type: object - secretName: - description: |- - SecretName is the name of the Secret providing the configuration - variables for the current provider instance, like e.g. credentials. - Such configurations will be used when creating or upgrading provider components. - The contents of the secret will be treated as immutable. If changes need - to be made, a new object can be created and the name should be updated. - The contents should be in the form of key:value. This secret must be in - the same namespace as the provider. - type: string - secretNamespace: - description: |- - SecretNamespace is the namespace of the Secret providing the configuration variables. If not specified, - the namespace of the provider will be used. - type: string - version: - description: Version indicates the provider version. - type: string - type: object - status: - description: CoreProviderStatus defines the observed state of CoreProvider. - properties: - conditions: - description: Conditions define the current service state of the provider. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 - minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 - type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - contract: - description: |- - Contract will contain the core provider contract that the provider is - abiding by, like e.g. v1alpha4. - type: string - installedVersion: - description: InstalledVersion is the version of the provider that - is installed. - type: string - observedGeneration: - description: ObservedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - jsonPath: .status.installedVersion name: InstalledVersion @@ -14661,7 +10154,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -14676,7 +10168,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -14844,7 +10335,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -14859,7 +10349,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -14953,8 +10442,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched @@ -15025,7 +10514,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -15040,7 +10528,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -15208,7 +10695,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -15223,7 +10709,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -15338,8 +10823,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -15398,6 +10884,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -15469,7 +10992,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -15582,9 +11105,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -15748,14 +11272,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -16132,7 +11668,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16147,7 +11682,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16314,7 +11848,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16329,7 +11862,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16423,8 +11955,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm @@ -16494,7 +12026,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16509,7 +12040,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16676,7 +12206,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16691,7 +12220,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -16806,8 +12334,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -16865,6 +12394,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -16933,7 +12499,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -17044,9 +12610,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -17285,14 +12852,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -17344,65 +12923,114 @@ spec: provider manifests. Patches are applied in the order they are specified. The `kind` field must match the target object, and if `apiVersion` is specified it will only be applied to matching objects. - This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396 + This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396. + This will be deprecated in future releases in favor of `patches`. items: type: string type: array + patches: + description: |- + Patches are applied to the rendered provider manifests to customize the + provider manifests. Patches support both strategic merge patch and RFC6902 JSON patches. + Both `patches` and `manifestPatches` cannot be set at the same time. + items: + description: Patch defines a generic patch to be applied to provider + manifests. + properties: + patch: + description: Patch is content of the patch to be applied. It + should be an inline yaml blob-string. + type: string + target: + description: Target defines the target object to which the patch + should be applied. + properties: + group: + description: Group is the API Group of the target object. + type: string + kind: + description: Kind is the kind of the target object. + type: string + labelSelector: + description: |- + LabelSelector is a string that follows the label selection expression + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api + type: string + name: + description: Name is the name of the target object. + type: string + namespace: + description: Namespace is the namespace of the target object. + type: string + version: + description: Version is the API version of the target object. + type: string + type: object + type: object + type: array version: description: Version indicates the provider version. type: string type: object + x-kubernetes-validations: + - message: Cannot set both 'patches' and 'manifestPatches' + rule: '!(has(self.manifestPatches) && has(self.patches))' status: description: CoreProviderStatus defines the observed state of CoreProvider. properties: conditions: description: Conditions define the current service state of the provider. items: - description: Condition defines an observation of a Cluster API resource - operational state. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 + This may be an empty string. + maxLength: 32768 type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer reason: description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime + - message + - reason - status - type type: object @@ -17433,7 +13061,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/capi-operator-serving-cert' - controller-gen.kubebuilder.io/version: v0.16.1 + controller-gen.kubebuilder.io/version: v0.21.0 helm.sh/resource-policy: keep labels: clusterctl.cluster.x-k8s.io/core: capi-operator @@ -17460,1644 +13088,6 @@ spec: singular: infrastructureprovider scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .status.installedVersion - name: InstalledVersion - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - deprecated: true - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - InfrastructureProvider is the Schema for the infrastructureproviders API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: InfrastructureProviderSpec defines the desired state of InfrastructureProvider. - properties: - additionalManifests: - description: |- - AdditionalManifests is reference to configmap that contains additional manifests that will be applied - together with the provider components. The key for storing these manifests has to be `manifests`. - The manifests are applied only once when a certain release is installed/upgraded. If namespace is not specified, the - namespace of the provider will be used. There is no validation of the yaml content inside the configmap. - properties: - name: - description: Name defines the name of the configmap. - type: string - namespace: - description: Namespace defines the namespace of the configmap. - type: string - required: - - name - type: object - deployment: - description: Deployment defines the properties that can be enabled - on the deployment for the provider. - properties: - affinity: - description: If specified, the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for - the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with - the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the - corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, etc. - as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - containers: - description: List of containers specified in the Deployment - items: - description: |- - ContainerSpec defines the properties available to override for each - container in a provider deployment such as Image and Args to the container’s - entrypoint. - properties: - args: - additionalProperties: - type: string - description: |- - Args represents extra provider specific flags that are not encoded as fields in this API. - Explicit controller manager properties defined in the `Provider.ManagerSpec` - will have higher precedence than those defined in `ContainerSpec.Args`. - For example, `ManagerSpec.SyncPeriod` will be used instead of the - container arg `--sync-period` if both are defined. - The same holds for `ManagerSpec.FeatureGates` and `--feature-gates`. - type: object - command: - description: Command allows override container's entrypoint - array. - items: - type: string - type: array - env: - description: List of environment variables to set in the - container. - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Container Image Name - properties: - name: - description: Name allows to specify a name for the image. - type: string - repository: - description: Repository sets the container registry - to pull images from. - type: string - tag: - description: Tag allows to specify a tag for the image. - type: string - type: object - name: - description: Name of the container. Cannot be updated. - type: string - resources: - description: Compute resources required by this container. - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - required: - - name - type: object - type: array - imagePullSecrets: - description: List of image pull secrets specified in the Deployment - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - nodeSelector: - additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - type: object - replicas: - description: Number of desired pods. This is a pointer to distinguish - between explicit zero and not specified. Defaults to 1. - minimum: 0 - type: integer - serviceAccountName: - description: If specified, the pod's service account - type: string - tolerations: - description: If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - type: object - fetchConfig: - description: |- - FetchConfig determines how the operator will fetch the components and metadata for the provider. - If nil, the operator will try to fetch components according to default - embedded fetch configuration for the given kind and `ObjectMeta.Name`. - For example, the infrastructure name `aws` will fetch artifacts from - https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases. - properties: - selector: - description: |- - Selector to be used for fetching provider’s components and metadata from - ConfigMaps stored inside the cluster. Each ConfigMap is expected to contain - components and metadata for a specific version only. - Note: the name of the ConfigMap should be set to the version or to override this - add a label like the following: provider.cluster.x-k8s.io/version=v1.4.3 - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - url: - description: |- - URL to be used for fetching the provider’s components and metadata from a remote Github repository. - For example, https://github.com/{owner}/{repository}/releases - You must set `providerSpec.Version` field for operator to pick up - desired version of the release from GitHub. - type: string - type: object - manager: - description: Manager defines the properties that can be enabled on - the controller manager for the provider. - properties: - cacheNamespace: - description: |- - CacheNamespace if specified restricts the manager's cache to watch objects in - the desired namespace Defaults to all namespaces - - Note: If a namespace is specified, controllers can still Watch for a - cluster-scoped resource (e.g Node). For namespaced resources the cache - will only hold objects from the desired namespace. - type: string - controller: - description: |- - Controller contains global configuration options for controllers - registered within this manager. - properties: - cacheSyncTimeout: - description: |- - CacheSyncTimeout refers to the time limit set to wait for syncing caches. - Defaults to 2 minutes if not set. - format: int64 - type: integer - groupKindConcurrency: - additionalProperties: - type: integer - description: |- - GroupKindConcurrency is a map from a Kind to the number of concurrent reconciliation - allowed for that controller. - - When a controller is registered within this manager using the builder utilities, - users have to specify the type the controller reconciles in the For(...) call. - If the object's kind passed matches one of the keys in this map, the concurrency - for that controller is set to the number specified. - - The key is expected to be consistent in form with GroupKind.String(), - e.g. ReplicaSet in apps group (regardless of version) would be `ReplicaSet.apps`. - type: object - recoverPanic: - description: RecoverPanic indicates if panics should be recovered. - type: boolean - type: object - featureGates: - additionalProperties: - type: boolean - description: |- - FeatureGates define provider specific feature flags that will be passed - in as container args to the provider's controller manager. - Controller Manager flag is --feature-gates. - type: object - gracefulShutDown: - description: |- - GracefulShutdownTimeout is the duration given to runnable to stop before the manager actually returns on stop. - To disable graceful shutdown, set to time.Duration(0) - To use graceful shutdown without timeout, set to a negative duration, e.G. time.Duration(-1) - The graceful shutdown is skipped for safety reasons in case the leader election lease is lost. - type: string - health: - description: Health contains the controller health configuration - properties: - healthProbeBindAddress: - description: |- - HealthProbeBindAddress is the TCP address that the controller should bind to - for serving health probes - It can be set to "0" or "" to disable serving the health probe. - type: string - livenessEndpointName: - description: LivenessEndpointName, defaults to "healthz" - type: string - readinessEndpointName: - description: ReadinessEndpointName, defaults to "readyz" - type: string - type: object - leaderElection: - description: |- - LeaderElection is the LeaderElection config to be used when configuring - the manager.Manager leader election - properties: - leaderElect: - description: |- - leaderElect enables a leader election client to gain leadership - before executing the main loop. Enable this when running replicated - components for high availability. - type: boolean - leaseDuration: - description: |- - leaseDuration is the duration that non-leader candidates will wait - after observing a leadership renewal until attempting to acquire - leadership of a led but unrenewed leader slot. This is effectively the - maximum duration that a leader can be stopped before it is replaced - by another candidate. This is only applicable if leader election is - enabled. - type: string - renewDeadline: - description: |- - renewDeadline is the interval between attempts by the acting master to - renew a leadership slot before it stops leading. This must be less - than or equal to the lease duration. This is only applicable if leader - election is enabled. - type: string - resourceLock: - description: |- - resourceLock indicates the resource object type that will be used to lock - during leader election cycles. - type: string - resourceName: - description: |- - resourceName indicates the name of resource object that will be used to lock - during leader election cycles. - type: string - resourceNamespace: - description: |- - resourceName indicates the namespace of resource object that will be used to lock - during leader election cycles. - type: string - retryPeriod: - description: |- - retryPeriod is the duration the clients should wait between attempting - acquisition and renewal of a leadership. This is only applicable if - leader election is enabled. - type: string - required: - - leaderElect - - leaseDuration - - renewDeadline - - resourceLock - - resourceName - - resourceNamespace - - retryPeriod - type: object - maxConcurrentReconciles: - description: |- - MaxConcurrentReconciles is the maximum number of concurrent Reconciles - which can be run. - minimum: 1 - type: integer - metrics: - description: Metrics contains thw controller metrics configuration - properties: - bindAddress: - description: |- - BindAddress is the TCP address that the controller should bind to - for serving prometheus metrics. - It can be set to "0" to disable the metrics serving. - type: string - type: object - profilerAddress: - description: |- - ProfilerAddress defines the bind address to expose the pprof profiler (e.g. localhost:6060). - Default empty, meaning the profiler is disabled. - Controller Manager flag is --profiler-address. - type: string - syncPeriod: - description: |- - SyncPeriod determines the minimum frequency at which watched resources are - reconciled. A lower period will correct entropy more quickly, but reduce - responsiveness to change if there are many watched resources. Change this - value only if you know what you are doing. Defaults to 10 hours if unset. - there will a 10 percent jitter between the SyncPeriod of all controllers - so that all controllers will not send list requests simultaneously. - type: string - verbosity: - default: 1 - description: |- - Verbosity set the logs verbosity. Defaults to 1. - Controller Manager flag is --verbosity. - minimum: 0 - type: integer - webhook: - description: Webhook contains the controllers webhook configuration - properties: - certDir: - description: |- - CertDir is the directory that contains the server key and certificate. - if not set, webhook server would look up the server key and certificate in - {TempDir}/k8s-webhook-server/serving-certs. The server key and certificate - must be named tls.key and tls.crt, respectively. - type: string - host: - description: |- - Host is the hostname that the webhook server binds to. - It is used to set webhook.Server.Host. - type: string - port: - description: |- - Port is the port that the webhook server serves at. - It is used to set webhook.Server.Port. - type: integer - type: object - type: object - secretName: - description: |- - SecretName is the name of the Secret providing the configuration - variables for the current provider instance, like e.g. credentials. - Such configurations will be used when creating or upgrading provider components. - The contents of the secret will be treated as immutable. If changes need - to be made, a new object can be created and the name should be updated. - The contents should be in the form of key:value. This secret must be in - the same namespace as the provider. - type: string - secretNamespace: - description: |- - SecretNamespace is the namespace of the Secret providing the configuration variables. If not specified, - the namespace of the provider will be used. - type: string - version: - description: Version indicates the provider version. - type: string - type: object - status: - description: InfrastructureProviderStatus defines the observed state of - InfrastructureProvider. - properties: - conditions: - description: Conditions define the current service state of the provider. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 - minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 - type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - contract: - description: |- - Contract will contain the core provider contract that the provider is - abiding by, like e.g. v1alpha4. - type: string - installedVersion: - description: InstalledVersion is the version of the provider that - is installed. - type: string - observedGeneration: - description: ObservedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - jsonPath: .status.installedVersion name: InstalledVersion @@ -19429,7 +13419,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -19444,7 +13433,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -19612,7 +13600,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -19627,7 +13614,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -19721,8 +13707,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched @@ -19793,7 +13779,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -19808,7 +13793,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -19976,7 +13960,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -19991,7 +13974,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -20106,8 +14088,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -20166,6 +14149,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -20237,7 +14257,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -20350,9 +14370,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -20516,14 +14537,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -20900,7 +14933,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -20915,7 +14947,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -21082,7 +15113,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -21097,7 +15127,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -21191,8 +15220,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm @@ -21262,7 +15291,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -21277,7 +15305,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -21444,7 +15471,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -21459,7 +15485,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -21574,8 +15599,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -21633,6 +15659,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -21701,7 +15764,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -21812,9 +15875,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -22053,14 +16117,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -22112,14 +16188,58 @@ spec: provider manifests. Patches are applied in the order they are specified. The `kind` field must match the target object, and if `apiVersion` is specified it will only be applied to matching objects. - This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396 + This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396. + This will be deprecated in future releases in favor of `patches`. items: type: string type: array + patches: + description: |- + Patches are applied to the rendered provider manifests to customize the + provider manifests. Patches support both strategic merge patch and RFC6902 JSON patches. + Both `patches` and `manifestPatches` cannot be set at the same time. + items: + description: Patch defines a generic patch to be applied to provider + manifests. + properties: + patch: + description: Patch is content of the patch to be applied. It + should be an inline yaml blob-string. + type: string + target: + description: Target defines the target object to which the patch + should be applied. + properties: + group: + description: Group is the API Group of the target object. + type: string + kind: + description: Kind is the kind of the target object. + type: string + labelSelector: + description: |- + LabelSelector is a string that follows the label selection expression + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api + type: string + name: + description: Name is the name of the target object. + type: string + namespace: + description: Namespace is the namespace of the target object. + type: string + version: + description: Version is the API version of the target object. + type: string + type: object + type: object + type: array version: description: Version indicates the provider version. type: string type: object + x-kubernetes-validations: + - message: Cannot set both 'patches' and 'manifestPatches' + rule: '!(has(self.manifestPatches) && has(self.patches))' status: description: InfrastructureProviderStatus defines the observed state of InfrastructureProvider. @@ -22127,51 +16247,56 @@ spec: conditions: description: Conditions define the current service state of the provider. items: - description: Condition defines an observation of a Cluster API resource - operational state. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 + This may be an empty string. + maxLength: 32768 type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer reason: description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime + - message + - reason - status - type type: object @@ -22202,7 +16327,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/capi-operator-serving-cert' - controller-gen.kubebuilder.io/version: v0.16.1 + controller-gen.kubebuilder.io/version: v0.21.0 helm.sh/resource-policy: keep labels: clusterctl.cluster.x-k8s.io/core: capi-operator @@ -22559,7 +16684,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -22574,7 +16698,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -22742,7 +16865,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -22757,7 +16879,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -22851,8 +16972,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched @@ -22923,7 +17044,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -22938,7 +17058,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -23106,7 +17225,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -23121,7 +17239,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -23236,8 +17353,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -23296,6 +17414,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -23367,7 +17522,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -23480,9 +17635,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -23646,14 +17802,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -24030,7 +18198,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24045,7 +18212,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24212,7 +18378,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24227,7 +18392,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24321,8 +18485,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm @@ -24392,7 +18556,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24407,7 +18570,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24574,7 +18736,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24589,7 +18750,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -24704,8 +18864,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -24763,6 +18924,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -24831,7 +19029,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -24942,9 +19140,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -25183,14 +19382,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -25242,65 +19453,114 @@ spec: provider manifests. Patches are applied in the order they are specified. The `kind` field must match the target object, and if `apiVersion` is specified it will only be applied to matching objects. - This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396 + This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396. + This will be deprecated in future releases in favor of `patches`. items: type: string type: array + patches: + description: |- + Patches are applied to the rendered provider manifests to customize the + provider manifests. Patches support both strategic merge patch and RFC6902 JSON patches. + Both `patches` and `manifestPatches` cannot be set at the same time. + items: + description: Patch defines a generic patch to be applied to provider + manifests. + properties: + patch: + description: Patch is content of the patch to be applied. It + should be an inline yaml blob-string. + type: string + target: + description: Target defines the target object to which the patch + should be applied. + properties: + group: + description: Group is the API Group of the target object. + type: string + kind: + description: Kind is the kind of the target object. + type: string + labelSelector: + description: |- + LabelSelector is a string that follows the label selection expression + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api + type: string + name: + description: Name is the name of the target object. + type: string + namespace: + description: Namespace is the namespace of the target object. + type: string + version: + description: Version is the API version of the target object. + type: string + type: object + type: object + type: array version: description: Version indicates the provider version. type: string type: object + x-kubernetes-validations: + - message: Cannot set both 'patches' and 'manifestPatches' + rule: '!(has(self.manifestPatches) && has(self.patches))' status: description: IPAMProviderStatus defines the observed state of IPAMProvider. properties: conditions: description: Conditions define the current service state of the provider. items: - description: Condition defines an observation of a Cluster API resource - operational state. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 + This may be an empty string. + maxLength: 32768 type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer reason: description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime + - message + - reason - status - type type: object @@ -25331,7 +19591,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/capi-operator-serving-cert' - controller-gen.kubebuilder.io/version: v0.16.1 + controller-gen.kubebuilder.io/version: v0.21.0 helm.sh/resource-policy: keep labels: clusterctl.cluster.x-k8s.io/core: capi-operator @@ -25690,7 +19950,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -25705,7 +19964,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -25873,7 +20131,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -25888,7 +20145,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -25982,8 +20238,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched @@ -26054,7 +20310,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -26069,7 +20324,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -26237,7 +20491,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -26252,7 +20505,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -26367,8 +20619,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -26427,6 +20680,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -26498,7 +20788,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -26611,9 +20901,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -26777,14 +21068,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -27161,7 +21464,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27176,7 +21478,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27343,7 +21644,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27358,7 +21658,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27452,8 +21751,8 @@ spec: most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm @@ -27523,7 +21822,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27538,7 +21836,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27705,7 +22002,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27720,7 +22016,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -27835,8 +22130,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -27894,6 +22190,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -27962,7 +22295,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -28073,9 +22406,10 @@ spec: operator: description: |- Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). type: string tolerationSeconds: description: |- @@ -28314,14 +22648,26 @@ spec: minimum: 1 type: integer metrics: - description: Metrics contains thw controller metrics configuration + description: Metrics contains the controller metrics configuration properties: bindAddress: description: |- BindAddress is the TCP address that the controller should bind to for serving prometheus metrics. It can be set to "0" to disable the metrics serving. + NOTE: This field is deprecated, please use DiagnosticsAddress field type: string + diagnosticsAddress: + description: |- + DiagnosticsAddress is the TCP address that the controller should bind to + for serving prometheus metric. + It can be set to "0" to disable the metrics serving. + type: string + insecureDiagnostics: + description: |- + InsecureDiagnostics indicates if insecure metrics serving should be enabled. + If false, or not set, the diagnostics address will expose pprof endpoints too. + type: boolean type: object profilerAddress: description: |- @@ -28373,14 +22719,58 @@ spec: provider manifests. Patches are applied in the order they are specified. The `kind` field must match the target object, and if `apiVersion` is specified it will only be applied to matching objects. - This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396 + This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396. + This will be deprecated in future releases in favor of `patches`. items: type: string type: array + patches: + description: |- + Patches are applied to the rendered provider manifests to customize the + provider manifests. Patches support both strategic merge patch and RFC6902 JSON patches. + Both `patches` and `manifestPatches` cannot be set at the same time. + items: + description: Patch defines a generic patch to be applied to provider + manifests. + properties: + patch: + description: Patch is content of the patch to be applied. It + should be an inline yaml blob-string. + type: string + target: + description: Target defines the target object to which the patch + should be applied. + properties: + group: + description: Group is the API Group of the target object. + type: string + kind: + description: Kind is the kind of the target object. + type: string + labelSelector: + description: |- + LabelSelector is a string that follows the label selection expression + https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api + type: string + name: + description: Name is the name of the target object. + type: string + namespace: + description: Namespace is the namespace of the target object. + type: string + version: + description: Version is the API version of the target object. + type: string + type: object + type: object + type: array version: description: Version indicates the provider version. type: string type: object + x-kubernetes-validations: + - message: Cannot set both 'patches' and 'manifestPatches' + rule: '!(has(self.manifestPatches) && has(self.patches))' status: description: RuntimeExtensionProviderStatus defines the observed state of RuntimeExtensionProvider. @@ -28388,51 +22778,56 @@ spec: conditions: description: Conditions define the current service state of the provider. items: - description: Condition defines an observation of a Cluster API resource - operational state. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- message is a human readable message indicating details about the transition. - This field may be empty. - maxLength: 10240 - minLength: 1 + This may be an empty string. + maxLength: 32768 type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer reason: description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may be empty. - maxLength: 256 + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 minLength: 1 - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - maxLength: 32 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - maxLength: 256 - minLength: 1 + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime + - message + - reason - status - type type: object diff --git a/packages/system/capi-operator/charts/cluster-api-operator/values.schema.json b/packages/system/capi-operator/charts/cluster-api-operator/values.schema.json index d22038fce..0107bc0c8 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/values.schema.json +++ b/packages/system/capi-operator/charts/cluster-api-operator/values.schema.json @@ -1,7 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "type": "object", "properties": { + "fetchConfig": { + "type": "object", + "deprecated": true, + "description": "This field is deprecated and will be removed in future versions. Prefer declaring fetchConfig under the individual providers instead." + }, "core": { "oneOf": [ { "type": "object" }, diff --git a/packages/system/capi-operator/charts/cluster-api-operator/values.yaml b/packages/system/capi-operator/charts/cluster-api-operator/values.yaml index 545bae393..648d4152c 100644 --- a/packages/system/capi-operator/charts/cluster-api-operator/values.yaml +++ b/packages/system/capi-operator/charts/cluster-api-operator/values.yaml @@ -2,30 +2,118 @@ # --- # Cluster API provider options core: {} -# cluster-api: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional +# cluster-api: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +# deployment: # Optional +# replicas: 1 +# nodeSelector: {} +# tolerations: [] +# affinity: {} +# containers: [] +# serviceAccountName: "" +# imagePullSecrets: [] +# manager: # Optional +# featureGates: +# ClusterTopology: true +# metrics: +# insecureDiagnostics: true +# diagnosticsAddress: localhost:8080 bootstrap: {} -# kubeadm: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional +# kubeadm: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +# deployment: # Optional +# replicas: 1 +# nodeSelector: {} +# tolerations: [] +# affinity: {} +# containers: [] +# serviceAccountName: "" +# imagePullSecrets: [] +# manager: # Optional +# featureGates: +# ClusterTopology: true +# MachinePool: true +# metrics: +# insecureDiagnostics: true +# diagnosticsAddress: localhost:8080 controlPlane: {} -# kubeadm: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional +# kubeadm: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +# deployment: # Optional +# replicas: 1 +# nodeSelector: {} +# tolerations: [] +# affinity: {} +# containers: [] +# serviceAccountName: "" +# imagePullSecrets: [] +# manager: # Optional +# featureGates: +# ClusterTopology: true +# metrics: +# insecureDiagnostics: true +# diagnosticsAddress: localhost:8080 infrastructure: {} -# docker: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional +# docker: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +# deployment: # Optional +# replicas: 1 +# nodeSelector: {} +# tolerations: [] +# affinity: {} +# containers: [] +# serviceAccountName: "" +# imagePullSecrets: [] +# manager: # Optional +# featureGates: +# ClusterTopology: true +# metrics: +# insecureDiagnostics: true +# diagnosticsAddress: localhost:8080 addon: {} -# helm: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional +# helm: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +# deployment: # Optional +# replicas: 1 +# nodeSelector: {} +# tolerations: [] +# affinity: {} +# containers: [] +# serviceAccountName: "" +# imagePullSecrets: [] +# manager: # Optional +# metrics: +# insecureDiagnostics: true +# diagnosticsAddress: localhost:8080 ipam: {} -# in-cluster: {} # Name, required -# namespace: "" # Optional -# version: "" # Optional -manager.featureGates: {} +# in-cluster: {} # Name, required +# namespace: "" # Optional +# version: "" # Optional +# createNamespace: true # Optional +# deployment: # Optional +# replicas: 1 +# nodeSelector: {} +# tolerations: [] +# affinity: {} +# containers: [] +# serviceAccountName: "" +# imagePullSecrets: [] +# manager: # Optional +# featureGates: +# ClusterTopology: true +# metrics: +# insecureDiagnostics: true +# diagnosticsAddress: localhost:8080 fetchConfig: {} # --- # Common configuration secret options @@ -39,20 +127,23 @@ leaderElection: image: manager: repository: registry.k8s.io/capi-operator/cluster-api-operator - tag: v0.19.0 + tag: v0.30.0 pullPolicy: IfNotPresent env: manager: [] diagnosticsAddress: ":8443" healthAddr: ":9440" +profilerAddress: ":6060" +contentionProfiling: false insecureDiagnostics: false watchConfigSecret: false +watchConfigMap: false imagePullSecrets: {} resources: manager: limits: cpu: 100m - memory: 150Mi + memory: 300Mi requests: cpu: 100m memory: 100Mi diff --git a/packages/system/capi-operator/files/bridge-bootstrap-components.gz b/packages/system/capi-operator/files/bridge-bootstrap-components.gz new file mode 100644 index 000000000..6d6c6e29f Binary files /dev/null and b/packages/system/capi-operator/files/bridge-bootstrap-components.gz differ diff --git a/packages/system/capi-operator/files/bridge-core-components.gz b/packages/system/capi-operator/files/bridge-core-components.gz new file mode 100644 index 000000000..e9817cbb0 Binary files /dev/null and b/packages/system/capi-operator/files/bridge-core-components.gz differ diff --git a/packages/system/capi-operator/files/bridge-metadata.yaml b/packages/system/capi-operator/files/bridge-metadata.yaml new file mode 100644 index 000000000..a779a5468 --- /dev/null +++ b/packages/system/capi-operator/files/bridge-metadata.yaml @@ -0,0 +1,50 @@ +# maps release series of major.minor to cluster-api contract version +# the contract version may change between minor or major versions, but *not* +# between patch versions. +# +# update this file only when a new major or minor version is released +apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 +kind: Metadata +releaseSeries: + - major: 1 + minor: 13 + contract: v1beta2 + - major: 1 + minor: 12 + contract: v1beta2 + - major: 1 + minor: 11 + contract: v1beta2 + - major: 1 + minor: 10 + contract: v1beta1 + - major: 1 + minor: 9 + contract: v1beta1 + - major: 1 + minor: 8 + contract: v1beta1 + - major: 1 + minor: 7 + contract: v1beta1 + - major: 1 + minor: 6 + contract: v1beta1 + - major: 1 + minor: 5 + contract: v1beta1 + - major: 1 + minor: 4 + contract: v1beta1 + - major: 1 + minor: 3 + contract: v1beta1 + - major: 1 + minor: 2 + contract: v1beta1 + - major: 1 + minor: 1 + contract: v1beta1 + - major: 1 + minor: 0 + contract: v1beta1 diff --git a/packages/system/capi-operator/files/bridge-version b/packages/system/capi-operator/files/bridge-version new file mode 100644 index 000000000..686fb286e --- /dev/null +++ b/packages/system/capi-operator/files/bridge-version @@ -0,0 +1 @@ +v1.13.8 diff --git a/packages/system/capi-operator/patches/fetch-config-precedence.diff b/packages/system/capi-operator/patches/fetch-config-precedence.diff new file mode 100644 index 000000000..4c7484921 --- /dev/null +++ b/packages/system/capi-operator/patches/fetch-config-precedence.diff @@ -0,0 +1,10 @@ +--- a/charts/cluster-api-operator/templates/infra.yaml ++++ b/charts/cluster-api-operator/templates/infra.yaml +@@ -59,1 +59,1 @@ +-{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName) }} ++{{- if and (not $infra.fetchConfig) (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName) }} +--- a/charts/cluster-api-operator/templates/ipam.yaml ++++ b/charts/cluster-api-operator/templates/ipam.yaml +@@ -59,1 +59,1 @@ +-{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $ipamName) }} ++{{- if and (not $ipam.fetchConfig) (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $ipamName) }} diff --git a/packages/system/capi-operator/patches/fetch-config-types.diff b/packages/system/capi-operator/patches/fetch-config-types.diff new file mode 100644 index 000000000..f4d9c2758 --- /dev/null +++ b/packages/system/capi-operator/patches/fetch-config-types.diff @@ -0,0 +1,20 @@ +--- a/charts/cluster-api-operator/templates/infra.yaml ++++ b/charts/cluster-api-operator/templates/infra.yaml +@@ -62,4 +62,3 @@ +- fetchConfig: +- {{- range $k, $v := $value }} +- {{ $k }}: {{ $v }} +- {{- end }} ++{{- if not (or (kindIs "invalid" $value) (and (kindIs "map" $value) (empty $value))) }} ++ fetchConfig: {{- toYaml $value | nindent 4 }} ++{{- end }} +--- a/charts/cluster-api-operator/templates/ipam.yaml ++++ b/charts/cluster-api-operator/templates/ipam.yaml +@@ -62,4 +62,3 @@ +- fetchConfig: +- {{- range $k, $v := $value }} +- {{ $k }}: {{ $v }} +- {{- end }} ++{{- if not (or (kindIs "invalid" $value) (and (kindIs "map" $value) (empty $value))) }} ++ fetchConfig: {{- toYaml $value | nindent 4 }} ++{{- end }} diff --git a/packages/system/capi-operator/patches/legacy-feature-gates.diff b/packages/system/capi-operator/patches/legacy-feature-gates.diff new file mode 100644 index 000000000..015eec1d2 --- /dev/null +++ b/packages/system/capi-operator/patches/legacy-feature-gates.diff @@ -0,0 +1,51 @@ +--- a/charts/cluster-api-operator/templates/core.yaml ++++ b/charts/cluster-api-operator/templates/core.yaml +@@ -1,5 +1,6 @@ + # Core provider + {{- range $name, $core := $.Values.core }} ++{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $core "key" "core") }} + {{- $coreNamespace := default "capi-system" (get $core "namespace") }} + {{- $coreName := $name }} + {{- $coreVersion := get $core "version" }} +--- a/charts/cluster-api-operator/templates/control-plane.yaml ++++ b/charts/cluster-api-operator/templates/control-plane.yaml +@@ -1,5 +1,6 @@ + # Control plane provider + {{- range $name, $controlPlane := $.Values.controlPlane }} ++{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $controlPlane "key" $name) }} + {{- $controlPlaneNamespace := default ( printf "%s-%s" $name "control-plane-system" ) (get $controlPlane "namespace") }} + {{- $controlPlaneName := $name }} + {{- $controlPlaneVersion := get $controlPlane "version" }} +--- a/charts/cluster-api-operator/templates/infra.yaml ++++ b/charts/cluster-api-operator/templates/infra.yaml +@@ -1,5 +1,6 @@ + # Infrastructure providers + {{- range $name, $infra := $.Values.infrastructure }} ++{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $infra "key" $name) }} + {{- $infrastructureNamespace := default ( printf "%s-%s" $name "infrastructure-system" ) (get $infra "namespace") }} + {{- $infrastructureName := $name }} + {{- $infrastructureVersion := get $infra "version" }} +--- a/charts/cluster-api-operator/templates/ipam.yaml ++++ b/charts/cluster-api-operator/templates/ipam.yaml +@@ -1,5 +1,6 @@ + # IPAM providers + {{- range $name, $ipam := $.Values.ipam }} ++{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $ipam "key" $name) }} + {{- $ipamNamespace := default ( printf "%s-%s" $name "ipam-system" ) (get $ipam "namespace") }} + {{- $ipamName := $name }} + {{- $ipamVersion := get $ipam "version" }} +--- a/charts/cluster-api-operator/templates/infra-conditions.yaml ++++ b/charts/cluster-api-operator/templates/infra-conditions.yaml +@@ -61,6 +61,12 @@ + "argocd.argoproj.io/sync-wave": "2" + {{- with .Values.configSecret }} + spec: ++{{- $controlPlane := dict }} ++{{- include "cozystack.capi-operator.legacyFeatureGates" (dict "root" $ "provider" $controlPlane "key" "kubeadm") }} ++{{- with $controlPlane.manager }} ++ manager: ++ {{- toYaml . | nindent 4 }} ++{{- end }} + configSecret: + name: {{ .name }} + {{- if .namespace }} diff --git a/packages/system/capi-operator/patches/profiling-independent.diff b/packages/system/capi-operator/patches/profiling-independent.diff new file mode 100644 index 000000000..e874ca405 --- /dev/null +++ b/packages/system/capi-operator/patches/profiling-independent.diff @@ -0,0 +1,18 @@ +--- a/charts/cluster-api-operator/templates/deployment.yaml ++++ b/charts/cluster-api-operator/templates/deployment.yaml +@@ -87,14 +87,14 @@ + {{- end }} + {{- if .retryPeriod }} + - --leader-elect-retry-period={{ .retryPeriod }} + {{- end }} ++ {{- end }} + {{- if $.Values.profilerAddress }} + - --profiler-address={{ if hasPrefix ":" ($.Values.profilerAddress | toString) }}localhost{{ end }}{{ $.Values.profilerAddress }} + {{- end }} + {{- if $.Values.contentionProfiling }} + - --contention-profiling={{ $.Values.contentionProfiling }} + {{- end }} +- {{- end }} + {{- with .Values.syncPeriod }} + - --sync-period={{ . }} + {{- end }} diff --git a/packages/system/capi-operator/patches/provider-spec-guards.diff b/packages/system/capi-operator/patches/provider-spec-guards.diff new file mode 100644 index 000000000..85e860ec4 --- /dev/null +++ b/packages/system/capi-operator/patches/provider-spec-guards.diff @@ -0,0 +1,30 @@ +--- a/charts/cluster-api-operator/templates/core.yaml ++++ b/charts/cluster-api-operator/templates/core.yaml +@@ -32,1 +32,1 @@ +-{{- if or $coreVersion $.Values.configSecret.name $core.manager $core.deployment (($core).configSecret).name }} ++{{- if or $coreVersion $.Values.configSecret.name $core.manager $core.deployment (($core).configSecret).name $core.fetchConfig $core.manifestPatches $core.additionalManifests }} +--- a/charts/cluster-api-operator/templates/bootstrap.yaml ++++ b/charts/cluster-api-operator/templates/bootstrap.yaml +@@ -31,1 +31,1 @@ +-{{- if or $bootstrapVersion $.Values.configSecret.name $bootstrap.manager $bootstrap.deployment (($bootstrap).configSecret).name }} ++{{- if or $bootstrapVersion $.Values.configSecret.name $bootstrap.manager $bootstrap.deployment (($bootstrap).configSecret).name $bootstrap.fetchConfig $bootstrap.manifestPatches $bootstrap.additionalManifests }} +--- a/charts/cluster-api-operator/templates/control-plane.yaml ++++ b/charts/cluster-api-operator/templates/control-plane.yaml +@@ -32,1 +32,1 @@ +-{{- if or $controlPlaneVersion $.Values.configSecret.name $controlPlane.manager $controlPlane.deployment (($controlPlane).configSecret).name }} ++{{- if or $controlPlaneVersion $.Values.configSecret.name $controlPlane.manager $controlPlane.deployment (($controlPlane).configSecret).name $controlPlane.fetchConfig $controlPlane.manifestPatches $controlPlane.additionalManifests }} +--- a/charts/cluster-api-operator/templates/infra.yaml ++++ b/charts/cluster-api-operator/templates/infra.yaml +@@ -32,1 +32,1 @@ +-{{- if or $infrastructureVersion $.Values.configSecret.name $infra.manager $infra.deployment $.Values.additionalDeployments (($infra).configSecret).name }} ++{{- if or $infrastructureVersion $.Values.configSecret.name $infra.manager $infra.deployment $.Values.additionalDeployments (($infra).configSecret).name $infra.fetchConfig $infra.patches $infra.manifestPatches $infra.additionalManifests (and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName)) }} +--- a/charts/cluster-api-operator/templates/ipam.yaml ++++ b/charts/cluster-api-operator/templates/ipam.yaml +@@ -32,1 +32,1 @@ +-{{- if or $ipamVersion $.Values.configSecret.name $ipam.manager $ipam.deployment $.Values.additionalDeployments (($ipam).configSecret).name }} ++{{- if or $ipamVersion $.Values.configSecret.name $ipam.manager $ipam.deployment $.Values.additionalDeployments (($ipam).configSecret).name $ipam.fetchConfig $ipam.manifestPatches $ipam.additionalManifests (and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $ipamName)) }} +--- a/charts/cluster-api-operator/templates/addon.yaml ++++ b/charts/cluster-api-operator/templates/addon.yaml +@@ -31,1 +31,1 @@ +-{{- if or $addonVersion $.Values.secretName $.Values.configSecret.name $addon.manager $addon.deployment (($addon).configSecret).name }} ++{{- if or $addonVersion $.Values.secretName $.Values.secretNamespace $.Values.configSecret.name $addon.manager $addon.deployment (($addon).configSecret).name $addon.fetchConfig $addon.manifestPatches $addon.additionalManifests }} diff --git a/packages/system/capi-operator/patches/provider-string-types.diff b/packages/system/capi-operator/patches/provider-string-types.diff new file mode 100644 index 000000000..df62a0b4a --- /dev/null +++ b/packages/system/capi-operator/patches/provider-string-types.diff @@ -0,0 +1,38 @@ +--- a/charts/cluster-api-operator/templates/core.yaml ++++ b/charts/cluster-api-operator/templates/core.yaml +@@ -55,1 +55,1 @@ +- diagnosticsAddress: {{ $core.manager.metrics.diagnosticsAddress }} ++ diagnosticsAddress: {{ $core.manager.metrics.diagnosticsAddress | toYaml }} +--- a/charts/cluster-api-operator/templates/bootstrap.yaml ++++ b/charts/cluster-api-operator/templates/bootstrap.yaml +@@ -51,1 +51,1 @@ +- diagnosticsAddress: {{ $bootstrap.manager.metrics.diagnosticsAddress }} ++ diagnosticsAddress: {{ $bootstrap.manager.metrics.diagnosticsAddress | toYaml }} +--- a/charts/cluster-api-operator/templates/control-plane.yaml ++++ b/charts/cluster-api-operator/templates/control-plane.yaml +@@ -55,1 +55,1 @@ +- diagnosticsAddress: {{ $controlPlane.manager.metrics.diagnosticsAddress }} ++ diagnosticsAddress: {{ $controlPlane.manager.metrics.diagnosticsAddress | toYaml }} +--- a/charts/cluster-api-operator/templates/infra.yaml ++++ b/charts/cluster-api-operator/templates/infra.yaml +@@ -55,1 +55,1 @@ +- diagnosticsAddress: {{ $infra.manager.metrics.diagnosticsAddress }} ++ diagnosticsAddress: {{ $infra.manager.metrics.diagnosticsAddress | toYaml }} +--- a/charts/cluster-api-operator/templates/ipam.yaml ++++ b/charts/cluster-api-operator/templates/ipam.yaml +@@ -55,1 +55,1 @@ +- diagnosticsAddress: {{ $ipam.manager.metrics.diagnosticsAddress }} ++ diagnosticsAddress: {{ $ipam.manager.metrics.diagnosticsAddress | toYaml }} +--- a/charts/cluster-api-operator/templates/addon.yaml ++++ b/charts/cluster-api-operator/templates/addon.yaml +@@ -45,1 +45,1 @@ +- diagnosticsAddress: {{ $addon.manager.metrics.diagnosticsAddress }} ++ diagnosticsAddress: {{ $addon.manager.metrics.diagnosticsAddress | toYaml }} +--- a/charts/cluster-api-operator/templates/_helpers.tpl ++++ b/charts/cluster-api-operator/templates/_helpers.tpl +@@ -30,1 +30,1 @@ +- name: {{ default (($.Values).configSecret).name (($arg).configSecret).name }} ++ name: {{ default (($.Values).configSecret).name (($arg).configSecret).name | toYaml }} +@@ -32,1 +32,1 @@ +- namespace: {{ default (($.Values).configSecret).namespace (($arg).configSecret).namespace }} ++ namespace: {{ default (($.Values).configSecret).namespace (($arg).configSecret).namespace | toYaml }} diff --git a/packages/system/capi-operator/patches/sync-period.diff b/packages/system/capi-operator/patches/sync-period.diff index 4c10946ad..b4205700b 100644 --- a/packages/system/capi-operator/patches/sync-period.diff +++ b/packages/system/capi-operator/patches/sync-period.diff @@ -1,7 +1,7 @@ --- a/charts/cluster-api-operator/templates/deployment.yaml +++ b/charts/cluster-api-operator/templates/deployment.yaml -@@ -86,6 +86,9 @@ - - --leader-elect-retry-period={{ .retryPeriod }} +@@ -95,6 +95,9 @@ + - --contention-profiling={{ $.Values.contentionProfiling }} {{- end }} {{- end }} + {{- with .Values.syncPeriod }} diff --git a/packages/system/capi-operator/templates/_compatibility.tpl b/packages/system/capi-operator/templates/_compatibility.tpl new file mode 100644 index 000000000..552a75244 --- /dev/null +++ b/packages/system/capi-operator/templates/_compatibility.tpl @@ -0,0 +1,8 @@ +{{- define "cozystack.capi-operator.legacyFeatureGates" -}} +{{- $manager := deepCopy (.provider.manager | default dict) -}} +{{- $legacy := dig "featureGates" .key (dict) (.root.Values.manager | default dict) -}} +{{- if and (not (hasKey $manager "featureGates")) $legacy -}} +{{- $_ := set $manager "featureGates" (deepCopy $legacy) -}} +{{- $_ := set .provider "manager" $manager -}} +{{- end -}} +{{- end -}} diff --git a/packages/system/capi-operator/templates/upgrade-bundles.yaml b/packages/system/capi-operator/templates/upgrade-bundles.yaml new file mode 100644 index 000000000..1d871e1fb --- /dev/null +++ b/packages/system/capi-operator/templates/upgrade-bundles.yaml @@ -0,0 +1,31 @@ +{{- $bridge := required "intermediate provider version is missing" (.Files.Get "files/bridge-version" | trim) -}} +{{/* Keep repositories available for providers left at the intermediate version. +Only the version label: a live v1.10 selector has none, and the operator fails every +provider upgrade while any installed provider's selector matches two ConfigMaps. */}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $bridge }}-core + labels: + provider.cluster.x-k8s.io/version: {{ $bridge }}-core + annotations: + provider.cluster.x-k8s.io/compressed: "true" + helm.sh/resource-policy: keep +binaryData: + components: {{ required "intermediate core bundle is missing" (.Files.Get "files/bridge-core-components.gz") | b64enc | quote }} +data: + metadata: {{ required "intermediate provider metadata is missing" (.Files.Get "files/bridge-metadata.yaml") | quote }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $bridge }}-bootstrap + labels: + provider.cluster.x-k8s.io/version: {{ $bridge }}-bootstrap + annotations: + provider.cluster.x-k8s.io/compressed: "true" + helm.sh/resource-policy: keep +binaryData: + components: {{ required "intermediate kubeadm bundle is missing" (.Files.Get "files/bridge-bootstrap-components.gz") | b64enc | quote }} +data: + metadata: {{ required "intermediate provider metadata is missing" (.Files.Get "files/bridge-metadata.yaml") | quote }} diff --git a/packages/system/capi-operator/values.yaml b/packages/system/capi-operator/values.yaml index 40cffd7a8..8a3e2fdd0 100644 --- a/packages/system/capi-operator/values.yaml +++ b/packages/system/capi-operator/values.yaml @@ -1,11 +1,13 @@ cluster-api-operator: - # A restarted v0.19 operator ignores the provider Deployments it finds + # A restarted v0.19 operator ignored the provider Deployments it found # running (kubernetes-sigs/cluster-api-operator#1031), so a stale - # Ready=False on a provider clears only at the first informer resync, + # Ready=False on a provider cleared only at the first informer resync, # two periods after the restart: ~20 min at the 10m default, ~2 min at - # 1m (both measured). A resync is served from the cache and changes - # nothing when providers are in sync, so the short period costs no API - # writes. Applied through patches/sync-period.diff. + # 1m (both measured). v0.30 carries the upstream fix, but restart + # recovery on it has not been measured, so the short period stays until + # it is. A resync is served from the cache and changes nothing when + # providers are in sync, so it costs no API writes. Applied through + # patches/sync-period.diff. syncPeriod: 1m resources: manager: diff --git a/packages/system/capi-providers-bootstrap/.helmignore b/packages/system/capi-providers-bootstrap/.helmignore index 7a69e7e1d..049bf2a0e 100644 --- a/packages/system/capi-providers-bootstrap/.helmignore +++ b/packages/system/capi-providers-bootstrap/.helmignore @@ -1 +1,2 @@ -files/.*-components.yaml +files/*-components*.yaml +patches/ diff --git a/packages/system/capi-providers-bootstrap/Chart.yaml b/packages/system/capi-providers-bootstrap/Chart.yaml index 9784077b0..9dd0395a4 100644 --- a/packages/system/capi-providers-bootstrap/Chart.yaml +++ b/packages/system/capi-providers-bootstrap/Chart.yaml @@ -1,3 +1,5 @@ apiVersion: v2 name: cozy-capi-providers-bootstrap +appVersion: "v1.14.4" +kubeVersion: ">=1.33.0-0" version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/capi-providers-bootstrap/Makefile b/packages/system/capi-providers-bootstrap/Makefile index 6fa635883..2db0bc052 100644 --- a/packages/system/capi-providers-bootstrap/Makefile +++ b/packages/system/capi-providers-bootstrap/Makefile @@ -1,37 +1,59 @@ export NAME=capi-providers-bootstrap export NAMESPACE=cozy-cluster-api +CAPI_VERSION=v1.14.4 +CAPI_URL=https://github.com/kubernetes-sigs/cluster-api/releases/download/$(CAPI_VERSION) +# SHA-256 of the kubeadm bootstrap provider's two release assets at +# CAPI_VERSION. A release tag can be moved; these cannot. Keep CAPI_VERSION +# equal to the one in capi-providers-core/Makefile. +CAPI_SHA256_COMPONENTS=cf805775f24d197581b06e938bcd0eb9a9ed49d675f67e0f689ce7b71e5e397c +CAPI_SHA256_METADATA=c470906f551ac3e3e9aedc9a3e733b5a5994428693df43e95f65ea67c035f9fe + include ../../../hack/package.mk -.PHONY: update +.PHONY: update components test + +test: + helm unittest . # 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 +CABPT_UPSTREAM_VERSION = v0.6.13 +CABPT_URL=https://github.com/siderolabs/cluster-api-bootstrap-provider-talos/releases/download/$(CABPT_UPSTREAM_VERSION) +# SHA-256 of the two CABPT release assets at CABPT_UPSTREAM_VERSION, as +# downloaded, before patches/ is applied. +CABPT_SHA256_COMPONENTS=1e721ad294bdd5c8994aa957017cb94ad6e0cfd4ba52a52b45ed456d93efd4f8 +CABPT_SHA256_METADATA=f2069963ae63593a795a7d134bb35999e372fd36240219a539f123c9387507ed -# 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). +# Providers share a namespace. Keep CABPT's permissions off that namespace's +# default service account by retaining its dedicated account and bindings. 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 + curl -fL -o .update-tmp/bootstrap-components.yaml $(CABPT_URL)/bootstrap-components.yaml + curl -fL -o .update-tmp/metadata.yaml $(CABPT_URL)/metadata.yaml + printf '%s .update-tmp/bootstrap-components.yaml\n%s .update-tmp/metadata.yaml\n' $(CABPT_SHA256_COMPONENTS) $(CABPT_SHA256_METADATA) | sha256sum -c - 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 + mv .update-tmp/metadata.yaml files/metadata-talos.yaml + gzip -9 -n -c files/bootstrap-components-talos.yaml > files/components-talos.gz rm -rf .update-tmp + +# Keep Chart.yaml appVersion equal to CAPI_VERSION: it selects the kubeadm +# version and ConfigMap that the operator installs. +components: + rm -rf .components-tmp + mkdir .components-tmp + curl -fL -o .components-tmp/bootstrap-components.yaml $(CAPI_URL)/bootstrap-components.yaml + curl -fL -o .components-tmp/metadata.yaml $(CAPI_URL)/metadata.yaml + printf '%s .components-tmp/bootstrap-components.yaml\n%s .components-tmp/metadata.yaml\n' $(CAPI_SHA256_COMPONENTS) $(CAPI_SHA256_METADATA) | sha256sum -c - + mv .components-tmp/bootstrap-components.yaml files/bootstrap-components.yaml + mv .components-tmp/metadata.yaml files/metadata.yaml + gzip -9 -n -c files/bootstrap-components.yaml > files/components.gz + rm -rf .components-tmp diff --git a/packages/system/capi-providers-bootstrap/files/bootstrap-components-talos.yaml b/packages/system/capi-providers-bootstrap/files/bootstrap-components-talos.yaml index adb7a4c87..742fa19a4 100644 --- a/packages/system/capi-providers-bootstrap/files/bootstrap-components-talos.yaml +++ b/packages/system/capi-providers-bootstrap/files/bootstrap-components-talos.yaml @@ -699,7 +699,7 @@ spec: - --insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false} command: - /manager - image: ghcr.io/siderolabs/cluster-api-talos-controller:v0.6.12 + image: ghcr.io/siderolabs/cluster-api-talos-controller:v0.6.13 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/packages/system/capi-providers-bootstrap/files/bootstrap-components.yaml b/packages/system/capi-providers-bootstrap/files/bootstrap-components.yaml index 4bd71ccd3..f0ad84a3e 100644 --- a/packages/system/capi-providers-bootstrap/files/bootstrap-components.yaml +++ b/packages/system/capi-providers-bootstrap/files/bootstrap-components.yaml @@ -11,10 +11,11 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-kubeadm-bootstrap-system/capi-kubeadm-bootstrap-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: bootstrap-kubeadm cluster.x-k8s.io/v1beta1: v1beta1 + cluster.x-k8s.io/v1beta2: v1beta2 name: kubeadmconfigs.bootstrap.cluster.x-k8s.io spec: conversion: @@ -27,7 +28,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: bootstrap.cluster.x-k8s.io names: categories: @@ -38,1995 +38,6 @@ spec: singular: kubeadmconfig scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - KubeadmConfig is the Schema for the kubeadmconfigs API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of KubeadmConfig. - properties: - clusterConfiguration: - description: clusterConfiguration along with InitConfiguration are - the configurations necessary for the init command - properties: - apiServer: - description: APIServer contains extra settings for the API server - control plane component - properties: - certSANs: - description: CertSANs sets extra Subject Alternative Names - for the API Server signing cert. - items: - type: string - type: array - extraArgs: - additionalProperties: - type: string - description: ExtraArgs is an extra set of flags to pass to - the control plane component. - type: object - extraVolumes: - description: ExtraVolumes is an extra set of host volumes, - mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - HostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: MountPath is the path inside the pod where - hostPath will be mounted. - type: string - name: - description: Name of the volume inside the pod template. - type: string - pathType: - description: PathType is the type of the HostPath. - type: string - readOnly: - description: ReadOnly controls write access to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - timeoutForControlPlane: - description: TimeoutForControlPlane controls the timeout that - we use for API server to appear - type: string - type: object - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - certificatesDir: - description: |- - CertificatesDir specifies where to store or look for all required certificates. - NB: if not provided, this will default to `/etc/kubernetes/pki` - type: string - clusterName: - description: The cluster name - type: string - controlPlaneEndpoint: - description: |- - ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it - can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. - In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort - are used; in case the ControlPlaneEndpoint is specified but without a TCP port, - the BindPort is used. - Possible usages are: - e.g. In a cluster with more than one control plane instances, this field should be - assigned the address of the external load balancer in front of the - control plane instances. - e.g. in environments with enforced node recycling, the ControlPlaneEndpoint - could be used for assigning a stable DNS to the control plane. - NB: This value defaults to the first value in the Cluster object status.apiEndpoints array. - type: string - controllerManager: - description: ControllerManager contains extra settings for the - controller manager control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: ExtraArgs is an extra set of flags to pass to - the control plane component. - type: object - extraVolumes: - description: ExtraVolumes is an extra set of host volumes, - mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - HostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: MountPath is the path inside the pod where - hostPath will be mounted. - type: string - name: - description: Name of the volume inside the pod template. - type: string - pathType: - description: PathType is the type of the HostPath. - type: string - readOnly: - description: ReadOnly controls write access to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - dns: - description: DNS defines the options for the DNS add-on installed - in the cluster. - properties: - imageRepository: - description: |- - ImageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - ImageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - type: - description: Type defines the DNS add-on to be used - type: string - type: object - etcd: - description: |- - Etcd holds configuration for etcd. - NB: This value defaults to a Local (stacked) etcd - properties: - external: - description: |- - External describes how to connect to an external etcd cluster - Local and External are mutually exclusive - properties: - caFile: - description: |- - CAFile is an SSL Certificate Authority file used to secure etcd communication. - Required if using a TLS connection. - type: string - certFile: - description: |- - CertFile is an SSL certification file used to secure etcd communication. - Required if using a TLS connection. - type: string - endpoints: - description: Endpoints of etcd members. Required for ExternalEtcd. - items: - type: string - type: array - keyFile: - description: |- - KeyFile is an SSL key file used to secure etcd communication. - Required if using a TLS connection. - type: string - required: - - caFile - - certFile - - endpoints - - keyFile - type: object - local: - description: |- - Local provides configuration knobs for configuring the local etcd instance - Local and External are mutually exclusive - properties: - dataDir: - description: |- - DataDir is the directory etcd will place its data. - Defaults to "/var/lib/etcd". - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs are extra arguments provided to the etcd binary - when run inside a static pod. - type: object - imageRepository: - description: |- - ImageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - ImageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - peerCertSANs: - description: PeerCertSANs sets extra Subject Alternative - Names for the etcd peer signing cert. - items: - type: string - type: array - serverCertSANs: - description: ServerCertSANs sets extra Subject Alternative - Names for the etcd server signing cert. - items: - type: string - type: array - type: object - type: object - featureGates: - additionalProperties: - type: boolean - description: FeatureGates enabled by the user. - type: object - imageRepository: - description: |- - ImageRepository sets the container registry to pull images from. - If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) - `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io` - will be used for all the other images. - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - kubernetesVersion: - description: |- - KubernetesVersion is the target version of the control plane. - NB: This value defaults to the Machine object spec.version - type: string - networking: - description: |- - Networking holds configuration for the networking topology of the cluster. - NB: This value defaults to the Cluster object spec.clusterNetwork. - properties: - dnsDomain: - description: DNSDomain is the dns domain used by k8s services. - Defaults to "cluster.local". - type: string - podSubnet: - description: |- - PodSubnet is the subnet used by pods. - If unset, the API server will not allocate CIDR ranges for every node. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set - type: string - serviceSubnet: - description: |- - ServiceSubnet is the subnet used by k8s services. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or - to "10.96.0.0/12" if that's unset. - type: string - type: object - scheduler: - description: Scheduler contains extra settings for the scheduler - control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: ExtraArgs is an extra set of flags to pass to - the control plane component. - type: object - extraVolumes: - description: ExtraVolumes is an extra set of host volumes, - mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - HostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: MountPath is the path inside the pod where - hostPath will be mounted. - type: string - name: - description: Name of the volume inside the pod template. - type: string - pathType: - description: PathType is the type of the HostPath. - type: string - readOnly: - description: ReadOnly controls write access to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - useHyperKubeImage: - description: UseHyperKubeImage controls if hyperkube should be - used for Kubernetes components instead of their respective separate - images - type: boolean - type: object - diskSetup: - description: diskSetup specifies options for the creation of partition - tables and file systems on devices. - properties: - filesystems: - description: filesystems specifies the list of file systems to - setup. - items: - description: Filesystem defines the file systems to be created. - properties: - device: - description: device specifies the device name - type: string - extraOpts: - description: extraOpts defined extra options to add to the - command for creating the file system. - items: - type: string - type: array - filesystem: - description: filesystem specifies the file system type. - type: string - label: - description: label specifies the file system label to be - used. If set to None, no label is used. - type: string - overwrite: - description: |- - overwrite defines whether or not to overwrite any existing filesystem. - If true, any pre-existing file system will be destroyed. Use with Caution. - type: boolean - partition: - description: 'partition specifies the partition to use. - The valid options are: "auto|any", "auto", "any", "none", - and , where NUM is the actual partition number.' - type: string - replaceFS: - description: |- - replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . - NOTE: unless you define a label, this requires the use of the 'any' partition directive. - type: string - required: - - device - - filesystem - - label - type: object - type: array - partitions: - description: partitions specifies the list of the partitions to - setup. - items: - description: Partition defines how to create and layout a partition. - properties: - device: - description: device is the name of the device. - type: string - layout: - description: |- - layout specifies the device layout. - If it is true, a single partition will be created for the entire device. - When layout is false, it means don't partition or ignore existing partitioning. - type: boolean - overwrite: - description: |- - overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. - Use with caution. Default is 'false'. - type: boolean - tableType: - description: |- - tableType specifies the tupe of partition table. The following are supported: - 'mbr': default and setups a MS-DOS partition table - 'gpt': setups a GPT partition table - type: string - required: - - device - - layout - type: object - type: array - type: object - files: - description: files specifies extra files to be passed to user_data - upon creation. - items: - description: File defines the input for generating write_files in - cloud-init. - properties: - content: - description: content is the actual content of the file. - type: string - contentFrom: - description: contentFrom is a referenced source of content to - populate the file. - properties: - secret: - description: secret represents a secret that should populate - this file. - properties: - key: - description: key is the key in the secret's data map - for this value. - type: string - name: - description: name of the secret in the KubeadmBootstrapConfig's - namespace to use. - type: string - required: - - key - - name - type: object - required: - - secret - type: object - encoding: - description: encoding specifies the encoding of the file contents. - enum: - - base64 - - gzip - - gzip+base64 - type: string - owner: - description: owner specifies the ownership of the file, e.g. - "root:root". - type: string - path: - description: path specifies the full path on disk where to store - the file. - type: string - permissions: - description: permissions specifies the permissions to assign - to the file, e.g. "0640". - type: string - required: - - path - type: object - type: array - format: - description: format specifies the output format of the bootstrap data - enum: - - cloud-config - type: string - initConfiguration: - description: initConfiguration along with ClusterConfiguration are - the configurations necessary for the init command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - bootstrapTokens: - description: |- - BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. - This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature - items: - description: BootstrapToken describes one bootstrap token, stored - as a Secret in the cluster. - properties: - description: - description: |- - Description sets a human-friendly message why this token exists and what it's used - for, so other administrators can know its purpose. - type: string - expires: - description: |- - Expires specifies the timestamp when this token expires. Defaults to being set - dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. - format: date-time - type: string - groups: - description: |- - Groups specifies the extra groups that this token will authenticate as when/if - used for authentication - items: - type: string - type: array - token: - description: |- - Token is used for establishing bidirectional trust between nodes and control-planes. - Used for joining nodes in the cluster. - type: string - ttl: - description: |- - TTL defines the time to live for this token. Defaults to 24h. - Expires and TTL are mutually exclusive. - type: string - usages: - description: |- - Usages describes the ways in which this token can be used. Can by default be used - for establishing bidirectional trust, but that can be changed here. - items: - type: string - type: array - required: - - token - type: object - type: array - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - localAPIEndpoint: - description: |- - LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node - In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint - is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This - configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible - on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process - fails you may set the desired value here. - properties: - advertiseAddress: - description: AdvertiseAddress sets the IP address for the - API server to advertise. - type: string - bindPort: - description: |- - BindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - required: - - advertiseAddress - - bindPort - type: object - nodeRegistration: - description: |- - NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: CRISocket is used to retrieve container runtime - info. This information will be annotated to the Node API - object, for later re-use - type: string - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied to - a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to the taint - key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - joinConfiguration: - description: joinConfiguration is the kubeadm configuration for the - join command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - caCertPath: - description: |- - CACertPath is the path to the SSL certificate authority used to - secure comunications between node and control-plane. - Defaults to "/etc/kubernetes/pki/ca.crt". - type: string - controlPlane: - description: |- - ControlPlane defines the additional control plane instance to be deployed on the joining node. - If nil, no additional control plane instance will be deployed. - properties: - localAPIEndpoint: - description: LocalAPIEndpoint represents the endpoint of the - API server instance to be deployed on this node. - properties: - advertiseAddress: - description: AdvertiseAddress sets the IP address for - the API server to advertise. - type: string - bindPort: - description: |- - BindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - required: - - advertiseAddress - - bindPort - type: object - type: object - discovery: - description: Discovery specifies the options for the kubelet to - use during the TLS Bootstrap process - properties: - bootstrapToken: - description: |- - BootstrapToken is used to set the options for bootstrap token based discovery - BootstrapToken and File are mutually exclusive - properties: - apiServerEndpoint: - description: APIServerEndpoint is an IP or domain name - to the API server from which info will be fetched. - type: string - caCertHashes: - description: |- - CACertHashes specifies a set of public key pins to verify - when token-based discovery is used. The root CA found during discovery - must match one of these values. Specifying an empty set disables root CA - pinning, which can be unsafe. Each hash is specified as ":", - where the only currently supported type is "sha256". This is a hex-encoded - SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded - ASN.1. These hashes can be calculated using, for example, OpenSSL: - openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex - items: - type: string - type: array - token: - description: |- - Token is a token used to validate cluster information - fetched from the control-plane. - type: string - unsafeSkipCAVerification: - description: |- - UnsafeSkipCAVerification allows token-based discovery - without CA verification via CACertHashes. This can weaken - the security of kubeadm since other nodes can impersonate the control-plane. - type: boolean - required: - - token - - unsafeSkipCAVerification - type: object - file: - description: |- - File is used to specify a file or URL to a kubeconfig file from which to load cluster information - BootstrapToken and File are mutually exclusive - properties: - kubeConfigPath: - description: KubeConfigPath is used to specify the actual - file path or URL to the kubeconfig file from which to - load cluster information - type: string - required: - - kubeConfigPath - type: object - timeout: - description: Timeout modifies the discovery timeout - type: string - tlsBootstrapToken: - description: |- - TLSBootstrapToken is a token used for TLS bootstrapping. - If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. - If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information - type: string - type: object - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - nodeRegistration: - description: |- - NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: CRISocket is used to retrieve container runtime - info. This information will be annotated to the Node API - object, for later re-use - type: string - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied to - a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to the taint - key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - mounts: - description: mounts specifies a list of mount points to be setup. - items: - description: MountPoints defines input for generated mounts in cloud-init. - items: - type: string - type: array - type: array - ntp: - description: ntp specifies NTP configuration - properties: - enabled: - description: enabled specifies whether NTP should be enabled - type: boolean - servers: - description: servers specifies which NTP servers to use - items: - type: string - type: array - type: object - postKubeadmCommands: - description: postKubeadmCommands specifies extra commands to run after - kubeadm runs - items: - type: string - type: array - preKubeadmCommands: - description: preKubeadmCommands specifies extra commands to run before - kubeadm runs - items: - type: string - type: array - useExperimentalRetryJoin: - description: |- - useExperimentalRetryJoin replaces a basic kubeadm command with a shell - script with retries for joins. - - This is meant to be an experimental temporary workaround on some environments - where joins fail due to timing (and other issues). The long term goal is to add retries to - kubeadm proper and use that functionality. - - This will add about 40KB to userdata - - For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055. - type: boolean - users: - description: users specifies extra users to add - items: - description: User defines the input for a generated user in cloud-init. - properties: - gecos: - description: gecos specifies the gecos to use for the user - type: string - groups: - description: groups specifies the additional groups for the - user - type: string - homeDir: - description: homeDir specifies the home directory to use for - the user - type: string - inactive: - description: inactive specifies whether to mark the user as - inactive - type: boolean - lockPassword: - description: lockPassword specifies if password login should - be disabled - type: boolean - name: - description: name specifies the user name - type: string - passwd: - description: passwd specifies a hashed password for the user - type: string - primaryGroup: - description: primaryGroup specifies the primary group for the - user - type: string - shell: - description: shell specifies the user's shell - type: string - sshAuthorizedKeys: - description: sshAuthorizedKeys specifies a list of ssh authorized - keys for the user - items: - type: string - type: array - sudo: - description: sudo specifies a sudo role for the user - type: string - required: - - name - type: object - type: array - verbosity: - description: |- - verbosity is the number for the kubeadm log level verbosity. - It overrides the `--v` flag in kubeadm commands. - format: int32 - type: integer - type: object - status: - description: status is the observed state of KubeadmConfig. - properties: - bootstrapData: - description: |- - bootstrapData will be a cloud-init script for now. - - Deprecated: Switch to DataSecretName. - format: byte - type: string - conditions: - description: conditions defines current service state of the KubeadmConfig. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - dataSecretName: - description: dataSecretName is the name of the secret that stores - the bootstrap data script. - type: string - failureMessage: - description: failureMessage will be set on non-retryable errors - type: string - failureReason: - description: failureReason will be set on non-retryable errors - type: string - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - ready: - description: ready indicates the BootstrapData field is ready to be - consumed - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Time duration since creation of KubeadmConfig - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - KubeadmConfig is the Schema for the kubeadmconfigs API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of KubeadmConfig. - properties: - clusterConfiguration: - description: clusterConfiguration along with InitConfiguration are - the configurations necessary for the init command - properties: - apiServer: - description: apiServer contains extra settings for the API server - control plane component - properties: - certSANs: - description: certSANs sets extra Subject Alternative Names - for the API Server signing cert. - items: - type: string - type: array - extraArgs: - additionalProperties: - type: string - description: extraArgs is an extra set of flags to pass to - the control plane component. - type: object - extraVolumes: - description: extraVolumes is an extra set of host volumes, - mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - hostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: mountPath is the path inside the pod where - hostPath will be mounted. - type: string - name: - description: name of the volume inside the pod template. - type: string - pathType: - description: pathType is the type of the HostPath. - type: string - readOnly: - description: readOnly controls write access to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - timeoutForControlPlane: - description: timeoutForControlPlane controls the timeout that - we use for API server to appear - type: string - type: object - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - certificatesDir: - description: |- - certificatesDir specifies where to store or look for all required certificates. - NB: if not provided, this will default to `/etc/kubernetes/pki` - type: string - clusterName: - description: clusterName is the cluster name - type: string - controlPlaneEndpoint: - description: |- - controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it - can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. - In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort - are used; in case the ControlPlaneEndpoint is specified but without a TCP port, - the BindPort is used. - Possible usages are: - e.g. In a cluster with more than one control plane instances, this field should be - assigned the address of the external load balancer in front of the - control plane instances. - e.g. in environments with enforced node recycling, the ControlPlaneEndpoint - could be used for assigning a stable DNS to the control plane. - NB: This value defaults to the first value in the Cluster object status.apiEndpoints array. - type: string - controllerManager: - description: controllerManager contains extra settings for the - controller manager control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: extraArgs is an extra set of flags to pass to - the control plane component. - type: object - extraVolumes: - description: extraVolumes is an extra set of host volumes, - mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - hostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: mountPath is the path inside the pod where - hostPath will be mounted. - type: string - name: - description: name of the volume inside the pod template. - type: string - pathType: - description: pathType is the type of the HostPath. - type: string - readOnly: - description: readOnly controls write access to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - dns: - description: dns defines the options for the DNS add-on installed - in the cluster. - properties: - imageRepository: - description: |- - imageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - imageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - type: object - etcd: - description: |- - etcd holds configuration for etcd. - NB: This value defaults to a Local (stacked) etcd - properties: - external: - description: |- - external describes how to connect to an external etcd cluster - Local and External are mutually exclusive - properties: - caFile: - description: |- - caFile is an SSL Certificate Authority file used to secure etcd communication. - Required if using a TLS connection. - type: string - certFile: - description: |- - certFile is an SSL certification file used to secure etcd communication. - Required if using a TLS connection. - type: string - endpoints: - description: endpoints of etcd members. Required for ExternalEtcd. - items: - type: string - type: array - keyFile: - description: |- - keyFile is an SSL key file used to secure etcd communication. - Required if using a TLS connection. - type: string - required: - - caFile - - certFile - - endpoints - - keyFile - type: object - local: - description: |- - local provides configuration knobs for configuring the local etcd instance - Local and External are mutually exclusive - properties: - dataDir: - description: |- - dataDir is the directory etcd will place its data. - Defaults to "/var/lib/etcd". - type: string - extraArgs: - additionalProperties: - type: string - description: |- - extraArgs are extra arguments provided to the etcd binary - when run inside a static pod. - type: object - imageRepository: - description: |- - imageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - imageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - peerCertSANs: - description: peerCertSANs sets extra Subject Alternative - Names for the etcd peer signing cert. - items: - type: string - type: array - serverCertSANs: - description: serverCertSANs sets extra Subject Alternative - Names for the etcd server signing cert. - items: - type: string - type: array - type: object - type: object - featureGates: - additionalProperties: - type: boolean - description: featureGates enabled by the user. - type: object - imageRepository: - description: |- - imageRepository sets the container registry to pull images from. - If empty, `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) - `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `registry.k8s.io` - will be used for all the other images. - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - kubernetesVersion: - description: |- - kubernetesVersion is the target version of the control plane. - NB: This value defaults to the Machine object spec.version - type: string - networking: - description: |- - networking holds configuration for the networking topology of the cluster. - NB: This value defaults to the Cluster object spec.clusterNetwork. - properties: - dnsDomain: - description: dnsDomain is the dns domain used by k8s services. - Defaults to "cluster.local". - type: string - podSubnet: - description: |- - podSubnet is the subnet used by pods. - If unset, the API server will not allocate CIDR ranges for every node. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set - type: string - serviceSubnet: - description: |- - serviceSubnet is the subnet used by k8s services. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or - to "10.96.0.0/12" if that's unset. - type: string - type: object - scheduler: - description: scheduler contains extra settings for the scheduler - control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: extraArgs is an extra set of flags to pass to - the control plane component. - type: object - extraVolumes: - description: extraVolumes is an extra set of host volumes, - mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - hostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: mountPath is the path inside the pod where - hostPath will be mounted. - type: string - name: - description: name of the volume inside the pod template. - type: string - pathType: - description: pathType is the type of the HostPath. - type: string - readOnly: - description: readOnly controls write access to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - type: object - diskSetup: - description: diskSetup specifies options for the creation of partition - tables and file systems on devices. - properties: - filesystems: - description: filesystems specifies the list of file systems to - setup. - items: - description: Filesystem defines the file systems to be created. - properties: - device: - description: device specifies the device name - type: string - extraOpts: - description: extraOpts defined extra options to add to the - command for creating the file system. - items: - type: string - type: array - filesystem: - description: filesystem specifies the file system type. - type: string - label: - description: label specifies the file system label to be - used. If set to None, no label is used. - type: string - overwrite: - description: |- - overwrite defines whether or not to overwrite any existing filesystem. - If true, any pre-existing file system will be destroyed. Use with Caution. - type: boolean - partition: - description: 'partition specifies the partition to use. - The valid options are: "auto|any", "auto", "any", "none", - and , where NUM is the actual partition number.' - type: string - replaceFS: - description: |- - replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . - NOTE: unless you define a label, this requires the use of the 'any' partition directive. - type: string - required: - - device - - filesystem - - label - type: object - type: array - partitions: - description: partitions specifies the list of the partitions to - setup. - items: - description: Partition defines how to create and layout a partition. - properties: - device: - description: device is the name of the device. - type: string - layout: - description: |- - layout specifies the device layout. - If it is true, a single partition will be created for the entire device. - When layout is false, it means don't partition or ignore existing partitioning. - type: boolean - overwrite: - description: |- - overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. - Use with caution. Default is 'false'. - type: boolean - tableType: - description: |- - tableType specifies the tupe of partition table. The following are supported: - 'mbr': default and setups a MS-DOS partition table - 'gpt': setups a GPT partition table - type: string - required: - - device - - layout - type: object - type: array - type: object - files: - description: files specifies extra files to be passed to user_data - upon creation. - items: - description: File defines the input for generating write_files in - cloud-init. - properties: - content: - description: content is the actual content of the file. - type: string - contentFrom: - description: contentFrom is a referenced source of content to - populate the file. - properties: - secret: - description: secret represents a secret that should populate - this file. - properties: - key: - description: key is the key in the secret's data map - for this value. - type: string - name: - description: name of the secret in the KubeadmBootstrapConfig's - namespace to use. - type: string - required: - - key - - name - type: object - required: - - secret - type: object - encoding: - description: encoding specifies the encoding of the file contents. - enum: - - base64 - - gzip - - gzip+base64 - type: string - owner: - description: owner specifies the ownership of the file, e.g. - "root:root". - type: string - path: - description: path specifies the full path on disk where to store - the file. - type: string - permissions: - description: permissions specifies the permissions to assign - to the file, e.g. "0640". - type: string - required: - - path - type: object - type: array - format: - description: format specifies the output format of the bootstrap data - enum: - - cloud-config - type: string - initConfiguration: - description: initConfiguration along with ClusterConfiguration are - the configurations necessary for the init command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - bootstrapTokens: - description: |- - bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. - This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature - items: - description: BootstrapToken describes one bootstrap token, stored - as a Secret in the cluster. - properties: - description: - description: |- - description sets a human-friendly message why this token exists and what it's used - for, so other administrators can know its purpose. - type: string - expires: - description: |- - expires specifies the timestamp when this token expires. Defaults to being set - dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. - format: date-time - type: string - groups: - description: |- - groups specifies the extra groups that this token will authenticate as when/if - used for authentication - items: - type: string - type: array - token: - description: |- - token is used for establishing bidirectional trust between nodes and control-planes. - Used for joining nodes in the cluster. - type: string - ttl: - description: |- - ttl defines the time to live for this token. Defaults to 24h. - Expires and TTL are mutually exclusive. - type: string - usages: - description: |- - usages describes the ways in which this token can be used. Can by default be used - for establishing bidirectional trust, but that can be changed here. - items: - type: string - type: array - required: - - token - type: object - type: array - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - localAPIEndpoint: - description: |- - localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node - In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint - is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This - configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible - on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process - fails you may set the desired value here. - properties: - advertiseAddress: - description: advertiseAddress sets the IP address for the - API server to advertise. - type: string - bindPort: - description: |- - bindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - type: object - nodeRegistration: - description: |- - nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: criSocket is used to retrieve container runtime - info. This information will be annotated to the Node API - object, for later re-use - type: string - ignorePreflightErrors: - description: ignorePreflightErrors provides a slice of pre-flight - errors to be ignored when the current node is registered. - items: - type: string - type: array - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied to - a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to the taint - key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - joinConfiguration: - description: joinConfiguration is the kubeadm configuration for the - join command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - caCertPath: - description: |- - caCertPath is the path to the SSL certificate authority used to - secure comunications between node and control-plane. - Defaults to "/etc/kubernetes/pki/ca.crt". - type: string - controlPlane: - description: |- - controlPlane defines the additional control plane instance to be deployed on the joining node. - If nil, no additional control plane instance will be deployed. - properties: - localAPIEndpoint: - description: localAPIEndpoint represents the endpoint of the - API server instance to be deployed on this node. - properties: - advertiseAddress: - description: advertiseAddress sets the IP address for - the API server to advertise. - type: string - bindPort: - description: |- - bindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - type: object - type: object - discovery: - description: discovery specifies the options for the kubelet to - use during the TLS Bootstrap process - properties: - bootstrapToken: - description: |- - bootstrapToken is used to set the options for bootstrap token based discovery - BootstrapToken and File are mutually exclusive - properties: - apiServerEndpoint: - description: apiServerEndpoint is an IP or domain name - to the API server from which info will be fetched. - type: string - caCertHashes: - description: |- - caCertHashes specifies a set of public key pins to verify - when token-based discovery is used. The root CA found during discovery - must match one of these values. Specifying an empty set disables root CA - pinning, which can be unsafe. Each hash is specified as ":", - where the only currently supported type is "sha256". This is a hex-encoded - SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded - ASN.1. These hashes can be calculated using, for example, OpenSSL: - openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex - items: - type: string - type: array - token: - description: |- - token is a token used to validate cluster information - fetched from the control-plane. - type: string - unsafeSkipCAVerification: - description: |- - unsafeSkipCAVerification allows token-based discovery - without CA verification via CACertHashes. This can weaken - the security of kubeadm since other nodes can impersonate the control-plane. - type: boolean - required: - - token - type: object - file: - description: |- - file is used to specify a file or URL to a kubeconfig file from which to load cluster information - BootstrapToken and File are mutually exclusive - properties: - kubeConfigPath: - description: kubeConfigPath is used to specify the actual - file path or URL to the kubeconfig file from which to - load cluster information - type: string - required: - - kubeConfigPath - type: object - timeout: - description: timeout modifies the discovery timeout - type: string - tlsBootstrapToken: - description: |- - tlsBootstrapToken is a token used for TLS bootstrapping. - If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. - If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information - type: string - type: object - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - nodeRegistration: - description: |- - nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: criSocket is used to retrieve container runtime - info. This information will be annotated to the Node API - object, for later re-use - type: string - ignorePreflightErrors: - description: ignorePreflightErrors provides a slice of pre-flight - errors to be ignored when the current node is registered. - items: - type: string - type: array - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied to - a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to the taint - key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - mounts: - description: mounts specifies a list of mount points to be setup. - items: - description: MountPoints defines input for generated mounts in cloud-init. - items: - type: string - type: array - type: array - ntp: - description: ntp specifies NTP configuration - properties: - enabled: - description: enabled specifies whether NTP should be enabled - type: boolean - servers: - description: servers specifies which NTP servers to use - items: - type: string - type: array - type: object - postKubeadmCommands: - description: postKubeadmCommands specifies extra commands to run after - kubeadm runs - items: - type: string - type: array - preKubeadmCommands: - description: preKubeadmCommands specifies extra commands to run before - kubeadm runs - items: - type: string - type: array - useExperimentalRetryJoin: - description: |- - useExperimentalRetryJoin replaces a basic kubeadm command with a shell - script with retries for joins. - - This is meant to be an experimental temporary workaround on some environments - where joins fail due to timing (and other issues). The long term goal is to add retries to - kubeadm proper and use that functionality. - - This will add about 40KB to userdata - - For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055. - type: boolean - users: - description: users specifies extra users to add - items: - description: User defines the input for a generated user in cloud-init. - properties: - gecos: - description: gecos specifies the gecos to use for the user - type: string - groups: - description: groups specifies the additional groups for the - user - type: string - homeDir: - description: homeDir specifies the home directory to use for - the user - type: string - inactive: - description: inactive specifies whether to mark the user as - inactive - type: boolean - lockPassword: - description: lockPassword specifies if password login should - be disabled - type: boolean - name: - description: name specifies the user name - type: string - passwd: - description: passwd specifies a hashed password for the user - type: string - primaryGroup: - description: primaryGroup specifies the primary group for the - user - type: string - shell: - description: shell specifies the user's shell - type: string - sshAuthorizedKeys: - description: sshAuthorizedKeys specifies a list of ssh authorized - keys for the user - items: - type: string - type: array - sudo: - description: sudo specifies a sudo role for the user - type: string - required: - - name - type: object - type: array - verbosity: - description: |- - verbosity is the number for the kubeadm log level verbosity. - It overrides the `--v` flag in kubeadm commands. - format: int32 - type: integer - type: object - status: - description: status is the observed state of KubeadmConfig. - properties: - conditions: - description: conditions defines current service state of the KubeadmConfig. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - dataSecretName: - description: dataSecretName is the name of the secret that stores - the bootstrap data script. - type: string - failureMessage: - description: failureMessage will be set on non-retryable errors - type: string - failureReason: - description: failureReason will be set on non-retryable errors - type: string - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - ready: - description: ready indicates the BootstrapData field is ready to be - consumed - type: boolean - type: object - type: object - served: false - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Cluster jsonPath: .metadata.labels['cluster\.x-k8s\.io/cluster-name'] @@ -2036,6 +47,7 @@ spec: jsonPath: .metadata.creationTimestamp name: Age type: date + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -2105,8 +117,9 @@ spec: in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -2164,6 +177,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing + the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -2270,6 +320,24 @@ spec: may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + caCertificateValidityPeriodDays: + description: |- + caCertificateValidityPeriodDays specifies the validity period for CA certificates generated by Cluster API. + If not specified, Cluster API will use a default of 3650 days (10 years). + This field cannot be modified. + format: int32 + maximum: 36500 + minimum: 1 + type: integer + certificateValidityPeriodDays: + description: |- + certificateValidityPeriodDays specifies the validity period for non-CA certificates generated by kubeadm. + If not specified, kubeadm will use a default of 365 days (1 year). + This field is only supported with Kubernetes v1.31 or above. + format: int32 + maximum: 1095 + minimum: 1 + type: integer certificatesDir: description: |- certificatesDir specifies where to store or look for all required certificates. @@ -2319,8 +387,9 @@ spec: in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -2378,6 +447,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing + the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -2492,6 +598,22 @@ spec: minLength: 1 type: string type: object + encryptionAlgorithm: + description: |- + encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates. + Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384". + For Kubernetes 1.34 or above, "ECDSA-P384" is supported. + If not specified, Cluster API will use RSA-2048 as default. + When this field is modified every certificate generated afterward will use the new + encryptionAlgorithm. Existing CA certificates and service account keys are not rotated. + This field is only supported with Kubernetes v1.31 or above. + enum: + - ECDSA-P256 + - ECDSA-P384 + - RSA-2048 + - RSA-3072 + - RSA-4096 + type: string etcd: description: |- etcd holds configuration for etcd. @@ -2566,8 +688,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -2625,6 +748,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -2799,8 +959,9 @@ spec: in a Container. properties: name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -2858,6 +1019,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing + the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -3025,6 +1223,42 @@ spec: maxLength: 256 minLength: 1 type: string + diskLayout: + description: |- + diskLayout specifies an ordered list of partitions, where each item defines the + percentage of disk space and optional partition type for that partition. + The sum of all partition percentages must not be greater than 100. + items: + description: PartitionSpec defines the size and optional + type for a partition. + properties: + partitionType: + description: |- + partitionType is the partition type (optional). + Supported values are Linux, LinuxSwap, LinuxRAID, LVM, Fat32, NTFS, + and LinuxExtended. These are translated to cloud-init partition type codes. + A full GPT partition GUID is also supported as a passthrough value. + maxLength: 36 + minLength: 1 + type: string + x-kubernetes-validations: + - message: partitionType must be one of Linux, LinuxSwap, + LinuxRAID, LVM, Fat32, NTFS, LinuxExtended or + a full GPT partition GUID + rule: self.matches('^(Linux|LinuxSwap|LinuxRAID|LVM|Fat32|NTFS|LinuxExtended|[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12})$') + percentage: + description: percentage of disk that partition will + take (1-100) + format: int32 + maximum: 100 + minimum: 1 + type: integer + required: + - percentage + type: object + maxItems: 100 + minItems: 1 + type: array layout: description: |- layout specifies the device layout. @@ -3068,6 +1302,18 @@ spec: maxLength: 10240 minLength: 1 type: string + contentFormat: + description: |- + contentFormat specifies how to interpret content after it is resolved (inline or from contentFrom). + When set to "Template", content is rendered as a Go text/template. + Available template variables: + - .controlPlane.version: the Kubernetes version of the control plane (e.g. "v1.35.0"). + Only set when the cluster has a control plane reference that exposes spec.version. + When set to "Raw" or omitted, content is used verbatim. + enum: + - Raw + - Template + type: string contentFrom: description: contentFrom is a referenced source of content to populate the file. @@ -3143,7 +1389,7 @@ spec: configuration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging The data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/ - maxLength: 10240 + maxLength: 32768 minLength: 1 type: string strict: @@ -3326,9 +1572,8 @@ spec: a node. type: string timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. + description: TimeAdded represents the time at which + the taint was added. format: date-time type: string value: @@ -3727,9 +1972,8 @@ spec: a node. type: string timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. + description: TimeAdded represents the time at which + the taint was added. format: date-time type: string value: @@ -4009,7 +2253,7 @@ spec: description: |- failureMessage will be set on non-retryable errors - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. maxLength: 10240 minLength: 1 type: string @@ -4017,7 +2261,7 @@ spec: description: |- failureReason will be set on non-retryable errors - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. maxLength: 256 minLength: 1 type: string @@ -4102,6 +2346,2595 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .metadata.labels['cluster\.x-k8s\.io/cluster-name'] + name: Cluster + type: string + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: Boostrap secret is created + jsonPath: .status.initialization.dataSecretCreated + name: Data secret created + type: string + - description: Time duration since creation of KubeadmConfig + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: KubeadmConfig is the Schema for the kubeadmconfigs API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of KubeadmConfig. + minProperties: 1 + properties: + bootCommands: + description: |- + bootCommands specifies extra commands to run very early in the boot process via the cloud-init bootcmd + module. bootcmd will run on every boot, 'cloud-init-per' command can be used to make bootcmd run exactly + once. This is typically run in the cloud-init.service systemd unit. This has no effect in Ignition. + items: + maxLength: 10240 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + clusterConfiguration: + description: clusterConfiguration along with InitConfiguration are + the configurations necessary for the init command + minProperties: 1 + properties: + apiServer: + description: apiServer contains extra settings for the API server + control plane component + minProperties: 1 + properties: + certSANs: + description: certSANs sets extra Subject Alternative Names + for the API Server signing cert. + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraArgs: + description: |- + extraArgs is a list of args to pass to the control plane component. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name and + a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to the control plane component. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing + the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraVolumes: + description: extraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: |- + HostPathMount contains elements describing volumes that are mounted from the + host. + properties: + hostPath: + description: |- + hostPath is the path in the host that will be mounted inside + the pod. + maxLength: 512 + minLength: 1 + type: string + mountPath: + description: mountPath is the path inside the pod where + hostPath will be mounted. + maxLength: 512 + minLength: 1 + type: string + name: + description: name of the volume inside the pod template. + maxLength: 512 + minLength: 1 + type: string + pathType: + description: pathType is the type of the HostPath. + type: string + readOnly: + description: readOnly controls write access to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + caCertificateValidityPeriodDays: + description: |- + caCertificateValidityPeriodDays specifies the validity period for CA certificates generated by Cluster API. + If not specified, Cluster API will use a default of 3650 days (10 years). + This field cannot be modified. + format: int32 + maximum: 36500 + minimum: 1 + type: integer + certificateValidityPeriodDays: + description: |- + certificateValidityPeriodDays specifies the validity period for non-CA certificates generated by kubeadm. + If not specified, kubeadm will use a default of 365 days (1 year). + This field is only supported with Kubernetes v1.31 or above. + format: int32 + maximum: 1095 + minimum: 1 + type: integer + certificatesDir: + description: |- + certificatesDir specifies where to store or look for all required certificates. + NB: if not provided, this will default to `/etc/kubernetes/pki` + maxLength: 512 + minLength: 1 + type: string + controlPlaneEndpoint: + description: |- + controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. + In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort + are used; in case the ControlPlaneEndpoint is specified but without a TCP port, + the BindPort is used. + Possible usages are: + e.g. In a cluster with more than one control plane instances, this field should be + assigned the address of the external load balancer in front of the + control plane instances. + e.g. in environments with enforced node recycling, the ControlPlaneEndpoint + could be used for assigning a stable DNS to the control plane. + NB: This value defaults to the first value in the Cluster object status.apiEndpoints array. + maxLength: 512 + minLength: 1 + type: string + controllerManager: + description: controllerManager contains extra settings for the + controller manager control plane component + minProperties: 1 + properties: + extraArgs: + description: |- + extraArgs is a list of args to pass to the control plane component. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name and + a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to the control plane component. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing + the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraVolumes: + description: extraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: |- + HostPathMount contains elements describing volumes that are mounted from the + host. + properties: + hostPath: + description: |- + hostPath is the path in the host that will be mounted inside + the pod. + maxLength: 512 + minLength: 1 + type: string + mountPath: + description: mountPath is the path inside the pod where + hostPath will be mounted. + maxLength: 512 + minLength: 1 + type: string + name: + description: name of the volume inside the pod template. + maxLength: 512 + minLength: 1 + type: string + pathType: + description: pathType is the type of the HostPath. + type: string + readOnly: + description: readOnly controls write access to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + dns: + description: dns defines the options for the DNS add-on installed + in the cluster. + minProperties: 1 + properties: + imageRepository: + description: |- + imageRepository sets the container registry to pull images from. + if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + maxLength: 512 + minLength: 1 + type: string + imageTag: + description: |- + imageTag allows to specify a tag for the image. + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + maxLength: 256 + minLength: 1 + type: string + type: object + encryptionAlgorithm: + description: |- + encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates. + Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384". + For Kubernetes 1.34 or above, "ECDSA-P384" is supported. + If not specified, Cluster API will use RSA-2048 as default. + When this field is modified every certificate generated afterward will use the new + encryptionAlgorithm. Existing CA certificates and service account keys are not rotated. + This field is only supported with Kubernetes v1.31 or above. + enum: + - ECDSA-P256 + - ECDSA-P384 + - RSA-2048 + - RSA-3072 + - RSA-4096 + type: string + etcd: + description: |- + etcd holds configuration for etcd. + NB: This value defaults to a Local (stacked) etcd + minProperties: 1 + properties: + external: + description: |- + external describes how to connect to an external etcd cluster + Local and External are mutually exclusive + properties: + caFile: + description: |- + caFile is an SSL Certificate Authority file used to secure etcd communication. + Required if using a TLS connection. + maxLength: 512 + minLength: 1 + type: string + certFile: + description: |- + certFile is an SSL certification file used to secure etcd communication. + Required if using a TLS connection. + maxLength: 512 + minLength: 1 + type: string + endpoints: + description: endpoints of etcd members. Required for ExternalEtcd. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + keyFile: + description: |- + keyFile is an SSL key file used to secure etcd communication. + Required if using a TLS connection. + maxLength: 512 + minLength: 1 + type: string + required: + - caFile + - certFile + - endpoints + - keyFile + type: object + local: + description: |- + local provides configuration knobs for configuring the local etcd instance + Local and External are mutually exclusive + minProperties: 1 + properties: + dataDir: + description: |- + dataDir is the directory etcd will place its data. + Defaults to "/var/lib/etcd". + maxLength: 512 + minLength: 1 + type: string + extraArgs: + description: |- + extraArgs is a list of args to pass to etcd. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name + and a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to etcd. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount + containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + imageRepository: + description: |- + imageRepository sets the container registry to pull images from. + if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + maxLength: 512 + minLength: 1 + type: string + imageTag: + description: |- + imageTag allows to specify a tag for the image. + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + maxLength: 256 + minLength: 1 + type: string + peerCertSANs: + description: peerCertSANs sets extra Subject Alternative + Names for the etcd peer signing cert. + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + serverCertSANs: + description: serverCertSANs sets extra Subject Alternative + Names for the etcd server signing cert. + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + featureGates: + additionalProperties: + type: boolean + description: featureGates enabled by the user. + type: object + imageRepository: + description: |- + imageRepository sets the container registry to pull images from. + If not set, the default registry of kubeadm will be used (registry.k8s.io). + maxLength: 512 + minLength: 1 + type: string + scheduler: + description: scheduler contains extra settings for the scheduler + control plane component + minProperties: 1 + properties: + extraArgs: + description: |- + extraArgs is a list of args to pass to the control plane component. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name and + a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to the control plane component. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing + the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraVolumes: + description: extraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: |- + HostPathMount contains elements describing volumes that are mounted from the + host. + properties: + hostPath: + description: |- + hostPath is the path in the host that will be mounted inside + the pod. + maxLength: 512 + minLength: 1 + type: string + mountPath: + description: mountPath is the path inside the pod where + hostPath will be mounted. + maxLength: 512 + minLength: 1 + type: string + name: + description: name of the volume inside the pod template. + maxLength: 512 + minLength: 1 + type: string + pathType: + description: pathType is the type of the HostPath. + type: string + readOnly: + description: readOnly controls write access to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + diskSetup: + description: diskSetup specifies options for the creation of partition + tables and file systems on devices. + minProperties: 1 + properties: + filesystems: + description: filesystems specifies the list of file systems to + setup. + items: + description: Filesystem defines the file systems to be created. + properties: + device: + description: device specifies the device name + maxLength: 256 + minLength: 1 + type: string + extraOpts: + description: extraOpts defined extra options to add to the + command for creating the file system. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + filesystem: + description: filesystem specifies the file system type. + maxLength: 128 + minLength: 1 + type: string + label: + description: label specifies the file system label to be + used. If set to None, no label is used. + maxLength: 512 + minLength: 1 + type: string + overwrite: + description: |- + overwrite defines whether or not to overwrite any existing filesystem. + If true, any pre-existing file system will be destroyed. Use with Caution. + type: boolean + partition: + description: 'partition specifies the partition to use. + The valid options are: "auto|any", "auto", "any", "none", + and , where NUM is the actual partition number.' + maxLength: 128 + minLength: 1 + type: string + replaceFS: + description: |- + replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . + NOTE: unless you define a label, this requires the use of the 'any' partition directive. + maxLength: 128 + minLength: 1 + type: string + required: + - device + - filesystem + type: object + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + partitions: + description: partitions specifies the list of the partitions to + setup. + items: + description: Partition defines how to create and layout a partition. + properties: + device: + description: device is the name of the device. + maxLength: 256 + minLength: 1 + type: string + diskLayout: + description: |- + diskLayout specifies an ordered list of partitions, where each item defines the + percentage of disk space and optional partition type for that partition. + The sum of all partition percentages must not be greater than 100. + Mutually exclusive with layout. + items: + description: PartitionSpec defines the size and optional + type for a partition. + properties: + partitionType: + description: |- + partitionType is the partition type (optional). + Supported values are Linux, LinuxSwap, LinuxRAID, LVM, Fat32, NTFS, + and LinuxExtended. These are translated to cloud-init partition type codes. + A full GPT partition GUID is also supported as a passthrough value. + maxLength: 36 + minLength: 1 + type: string + x-kubernetes-validations: + - message: partitionType must be one of Linux, LinuxSwap, + LinuxRAID, LVM, Fat32, NTFS, LinuxExtended or + a full GPT partition GUID + rule: self.matches('^(Linux|LinuxSwap|LinuxRAID|LVM|Fat32|NTFS|LinuxExtended|[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12})$') + percentage: + description: percentage of disk that partition will + take (1-100) + format: int32 + maximum: 100 + minimum: 1 + type: integer + required: + - percentage + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + layout: + description: |- + layout specifies the device layout. + If it is true, a single partition will be created for the entire device. + When layout is false, it means don't partition or ignore existing partitioning. + Mutually exclusive with diskLayout. + type: boolean + overwrite: + description: |- + overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. + Use with caution. Default is 'false'. + type: boolean + tableType: + description: |- + tableType specifies the tupe of partition table. The following are supported: + 'mbr': default and setups a MS-DOS partition table + 'gpt': setups a GPT partition table + enum: + - mbr + - gpt + type: string + required: + - device + type: object + x-kubernetes-validations: + - message: exactly one of the fields in [layout diskLayout] + must be set + rule: '[has(self.layout),has(self.diskLayout)].filter(x,x==true).size() + == 1' + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + type: object + files: + description: files specifies extra files to be passed to user_data + upon creation. + items: + description: File defines the input for generating write_files in + cloud-init. + properties: + append: + description: append specifies whether to append Content to existing + file if Path exists. + type: boolean + content: + description: content is the actual content of the file. + maxLength: 10240 + minLength: 1 + type: string + contentFormat: + description: |- + contentFormat specifies how to interpret content after it is resolved (inline or from contentFrom). + When set to "Template", content is rendered as a Go text/template. + Available template variables: + - .controlPlane.version: the Kubernetes version of the control plane (e.g. "v1.35.0"). + Only set when the cluster has a control plane reference that exposes spec.version. + When set to "Raw" or omitted, content is used verbatim. + enum: + - Raw + - Template + type: string + contentFrom: + description: contentFrom is a referenced source of content to + populate the file. + properties: + secret: + description: secret represents a secret that should populate + this file. + properties: + key: + description: key is the key in the secret's data map + for this value. + maxLength: 256 + minLength: 1 + type: string + name: + description: name of the secret in the KubeadmBootstrapConfig's + namespace to use. + maxLength: 253 + minLength: 1 + type: string + required: + - key + - name + type: object + required: + - secret + type: object + encoding: + description: encoding specifies the encoding of the file contents. + enum: + - base64 + - gzip + - gzip+base64 + type: string + owner: + description: owner specifies the ownership of the file, e.g. + "root:root". + maxLength: 256 + minLength: 1 + type: string + path: + description: path specifies the full path on disk where to store + the file. + maxLength: 512 + minLength: 1 + type: string + permissions: + description: permissions specifies the permissions to assign + to the file, e.g. "0640". + maxLength: 16 + minLength: 1 + type: string + required: + - path + type: object + maxItems: 200 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + format: + description: |- + format specifies the output format of the bootstrap data. + Defaults to cloud-config if not set. + enum: + - cloud-config + - ignition + type: string + ignition: + description: ignition contains Ignition specific configuration. + minProperties: 1 + properties: + containerLinuxConfig: + description: containerLinuxConfig contains CLC specific configuration. + minProperties: 1 + properties: + additionalConfig: + description: |- + additionalConfig contains additional configuration to be merged with the Ignition + configuration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging + + The data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/ + maxLength: 32768 + minLength: 1 + type: string + strict: + description: strict controls if AdditionalConfig should be + strictly parsed. If so, warnings are treated as errors. + type: boolean + type: object + type: object + initConfiguration: + description: initConfiguration along with ClusterConfiguration are + the configurations necessary for the init command + minProperties: 1 + properties: + bootstrapTokens: + description: |- + bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature + items: + description: BootstrapToken describes one bootstrap token, stored + as a Secret in the cluster. + properties: + description: + description: |- + description sets a human-friendly message why this token exists and what it's used + for, so other administrators can know its purpose. + maxLength: 512 + minLength: 1 + type: string + expires: + description: |- + expires specifies the timestamp when this token expires. Defaults to being set + dynamically at runtime based on the ttlSeconds. Expires and ttlSeconds are mutually exclusive. + format: date-time + type: string + groups: + description: |- + groups specifies the extra groups that this token will authenticate as when/if + used for authentication + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + token: + description: |- + token is used for establishing bidirectional trust between nodes and control-planes. + Used for joining nodes in the cluster. + maxLength: 23 + minLength: 1 + type: string + ttlSeconds: + description: |- + ttlSeconds defines the time to live for this token. Defaults to 24h. + Expires and ttlSeconds are mutually exclusive. + format: int32 + minimum: 0 + type: integer + usages: + description: |- + usages describes the ways in which this token can be used. Can by default be used + for establishing bidirectional trust, but that can be changed here. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + required: + - token + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + localAPIEndpoint: + description: |- + localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint + is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This + configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible + on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process + fails you may set the desired value here. + minProperties: 1 + properties: + advertiseAddress: + description: advertiseAddress sets the IP address for the + API server to advertise. + maxLength: 39 + minLength: 1 + type: string + bindPort: + description: |- + bindPort sets the secure port for the API Server to bind to. + Defaults to 6443. + format: int32 + minimum: 1 + type: integer + type: object + nodeRegistration: + description: |- + nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + When used in the context of control plane nodes, NodeRegistration should remain consistent + across both InitConfiguration and JoinConfiguration + minProperties: 1 + properties: + criSocket: + description: criSocket is used to retrieve container runtime + info. This information will be annotated to the Node API + object, for later re-use + maxLength: 512 + minLength: 1 + type: string + ignorePreflightErrors: + description: |- + ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'. + Value 'all' ignores errors from all checks. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + imagePullPolicy: + description: |- + imagePullPolicy specifies the policy for image pulling + during kubeadm "init" and "join" operations. The value of + this field must be one of "Always", "IfNotPresent" or + "Never". Defaults to "IfNotPresent" if not set. + enum: + - Always + - IfNotPresent + - Never + type: string + imagePullSerial: + description: |- + imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. + This option takes effect only on Kubernetes >=1.31.0. + Default: true (defaulted in kubeadm) + type: boolean + kubeletExtraArgs: + description: |- + kubeletExtraArgs is a list of args to pass to kubelet. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name and + a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: kubeletExtraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + name: + description: |- + name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + This field is also used in the CommonName field of the kubelet's client certificate to the API server. + Defaults to the hostname of the node if not provided. + maxLength: 253 + minLength: 1 + type: string + taints: + description: |- + taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an + empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. + items: + description: |- + The node this Taint is attached to has the "effect" on + any pod that does not tolerate the Taint. + properties: + effect: + description: |- + Required. The effect of the taint on pods + that do not tolerate the taint. + Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied to + a node. + type: string + timeAdded: + description: TimeAdded represents the time at which + the taint was added. + format: date-time + type: string + value: + description: The taint value corresponding to the taint + key. + type: string + required: + - effect + - key + type: object + maxItems: 100 + minItems: 0 + type: array + type: object + patches: + description: |- + patches contains options related to applying patches to components deployed by kubeadm during + "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22 + minProperties: 1 + properties: + directory: + description: |- + directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". + For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of + "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one + of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. + The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". + "suffix" is an optional string that can be used to determine which patches are applied + first alpha-numerically. + These files can be written into the target directory via KubeadmConfig.Files which + specifies additional files to be created on the machine, either with content inline or + by referencing a secret. + maxLength: 512 + minLength: 1 + type: string + type: object + skipPhases: + description: |- + skipPhases is a list of phases to skip during command execution. + The list of phases can be obtained with the "kubeadm init --help" command. + This option takes effect only on Kubernetes >=1.22.0. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + timeouts: + description: timeouts holds various timeouts that apply to kubeadm + commands. + minProperties: 1 + properties: + controlPlaneComponentHealthCheckSeconds: + description: |- + controlPlaneComponentHealthCheckSeconds is the amount of time to wait for a control plane + component, such as the API server, to be healthy during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + discoverySeconds: + description: |- + discoverySeconds is the amount of time to wait for kubeadm to validate the API server identity + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + etcdAPICallSeconds: + description: |- + etcdAPICallSeconds is the amount of time to wait for the kubeadm etcd client to complete a request to + the etcd cluster. + If not set, it defaults to 2m (120s). + format: int32 + minimum: 0 + type: integer + kubeletHealthCheckSeconds: + description: |- + kubeletHealthCheckSeconds is the amount of time to wait for the kubelet to be healthy + during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + kubernetesAPICallSeconds: + description: |- + kubernetesAPICallSeconds is the amount of time to wait for the kubeadm client to complete a request to + the API server. This applies to all types of methods (GET, POST, etc). + If not set, it defaults to 1m (60s). + format: int32 + minimum: 0 + type: integer + tlsBootstrapSeconds: + description: |- + tlsBootstrapSeconds is the amount of time to wait for the kubelet to complete TLS bootstrap + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + type: object + type: object + joinConfiguration: + description: joinConfiguration is the kubeadm configuration for the + join command + minProperties: 1 + properties: + caCertPath: + description: |- + caCertPath is the path to the SSL certificate authority used to + secure communications between node and control-plane. + Defaults to "/etc/kubernetes/pki/ca.crt". + maxLength: 512 + minLength: 1 + type: string + controlPlane: + description: |- + controlPlane defines the additional control plane instance to be deployed on the joining node. + If nil, no additional control plane instance will be deployed. + properties: + localAPIEndpoint: + description: localAPIEndpoint represents the endpoint of the + API server instance to be deployed on this node. + minProperties: 1 + properties: + advertiseAddress: + description: advertiseAddress sets the IP address for + the API server to advertise. + maxLength: 39 + minLength: 1 + type: string + bindPort: + description: |- + bindPort sets the secure port for the API Server to bind to. + Defaults to 6443. + format: int32 + minimum: 1 + type: integer + type: object + type: object + discovery: + description: discovery specifies the options for the kubelet to + use during the TLS Bootstrap process + minProperties: 1 + properties: + bootstrapToken: + description: |- + bootstrapToken is used to set the options for bootstrap token based discovery + BootstrapToken and File are mutually exclusive + minProperties: 1 + properties: + apiServerEndpoint: + description: apiServerEndpoint is an IP or domain name + to the API server from which info will be fetched. + maxLength: 512 + minLength: 1 + type: string + caCertHashes: + description: |- + caCertHashes specifies a set of public key pins to verify + when token-based discovery is used. The root CA found during discovery + must match one of these values. Specifying an empty set disables root CA + pinning, which can be unsafe. Each hash is specified as ":", + where the only currently supported type is "sha256". This is a hex-encoded + SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded + ASN.1. These hashes can be calculated using, for example, OpenSSL: + openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + token: + description: |- + token is a token used to validate cluster information + fetched from the control-plane. + maxLength: 512 + minLength: 1 + type: string + unsafeSkipCAVerification: + description: |- + unsafeSkipCAVerification allows token-based discovery + without CA verification via CACertHashes. This can weaken + the security of kubeadm since other nodes can impersonate the control-plane. + type: boolean + type: object + file: + description: |- + file is used to specify a file or URL to a kubeconfig file from which to load cluster information + BootstrapToken and File are mutually exclusive + properties: + kubeConfig: + description: |- + kubeConfig is used (optionally) to generate a KubeConfig based on the KubeadmConfig's information. + The file is generated at the path specified in KubeConfigPath. + + Host address (server field) information is automatically populated based on the Cluster's ControlPlaneEndpoint. + Certificate Authority (certificate-authority-data field) is gathered from the cluster's CA secret. + properties: + cluster: + description: |- + cluster contains information about how to communicate with the kubernetes cluster. + + By default the following fields are automatically populated: + - Server with the Cluster's ControlPlaneEndpoint. + - CertificateAuthorityData with the Cluster's CA certificate. + minProperties: 1 + properties: + certificateAuthorityData: + description: |- + certificateAuthorityData contains PEM-encoded certificate authority certificates. + + Defaults to the Cluster's CA certificate if empty. + format: byte + maxLength: 51200 + minLength: 1 + type: string + insecureSkipTLSVerify: + description: insecureSkipTLSVerify skips the validity + check for the server's certificate. This will + make your HTTPS connections insecure. + type: boolean + proxyURL: + description: |- + proxyURL is the URL to the proxy to be used for all requests made by this + client. URLs with "http", "https", and "socks5" schemes are supported. If + this configuration is not provided or the empty string, the client + attempts to construct a proxy configuration from http_proxy and + https_proxy environment variables. If these environment variables are not + set, the client does not attempt to proxy requests. + + socks5 proxying does not currently support spdy streaming endpoints (exec, + attach, port forward). + maxLength: 512 + minLength: 1 + type: string + server: + description: |- + server is the address of the kubernetes cluster (https://hostname:port). + + Defaults to https:// + Cluster.Spec.ControlPlaneEndpoint. + maxLength: 512 + minLength: 1 + type: string + tlsServerName: + description: tlsServerName is used to check server + certificate. If TLSServerName is empty, the + hostname used to contact the server is used. + maxLength: 512 + minLength: 1 + type: string + type: object + user: + description: |- + user contains information that describes identity information. + This is used to tell the kubernetes cluster who you are. + minProperties: 1 + properties: + authProvider: + description: authProvider specifies a custom authentication + plugin for the kubernetes cluster. + properties: + config: + additionalProperties: + type: string + description: config holds the parameters for + the authentication plugin. + type: object + name: + description: name is the name of the authentication + plugin. + maxLength: 256 + minLength: 1 + type: string + required: + - name + type: object + exec: + description: exec specifies a custom exec-based + authentication plugin for the kubernetes cluster. + properties: + apiVersion: + description: |- + apiVersion is preferred input version of the ExecInfo. The returned ExecCredentials MUST use + the same encoding version as the input. + Defaults to client.authentication.k8s.io/v1 if not set. + maxLength: 512 + minLength: 1 + type: string + args: + description: args is the arguments to pass + to the command when executing it. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + command: + description: command to execute. + maxLength: 1024 + minLength: 1 + type: string + env: + description: |- + env defines additional environment variables to expose to the process. These + are unioned with the host's environment, as well as variables client-go uses + to pass argument to the plugin. + items: + description: |- + KubeConfigAuthExecEnv is used for setting environment variables when executing an exec-based + credential plugin. + properties: + name: + description: name of the environment + variable + maxLength: 512 + minLength: 1 + type: string + value: + description: value of the environment + variable + maxLength: 512 + minLength: 1 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + provideClusterInfo: + description: |- + provideClusterInfo determines whether or not to provide cluster information, + which could potentially contain very large CA data, to this exec plugin as a + part of the KUBERNETES_EXEC_INFO environment variable. By default, it is set + to false. Package k8s.io/client-go/tools/auth/exec provides helper methods for + reading this environment variable. + type: boolean + required: + - command + type: object + type: object + required: + - user + type: object + kubeConfigPath: + description: kubeConfigPath is used to specify the actual + file path or URL to the kubeconfig file from which to + load cluster information + maxLength: 512 + minLength: 1 + type: string + required: + - kubeConfigPath + type: object + tlsBootstrapToken: + description: |- + tlsBootstrapToken is a token used for TLS bootstrapping. + If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. + If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information + maxLength: 512 + minLength: 1 + type: string + type: object + nodeRegistration: + description: |- + nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + When used in the context of control plane nodes, NodeRegistration should remain consistent + across both InitConfiguration and JoinConfiguration + minProperties: 1 + properties: + criSocket: + description: criSocket is used to retrieve container runtime + info. This information will be annotated to the Node API + object, for later re-use + maxLength: 512 + minLength: 1 + type: string + ignorePreflightErrors: + description: |- + ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'. + Value 'all' ignores errors from all checks. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + imagePullPolicy: + description: |- + imagePullPolicy specifies the policy for image pulling + during kubeadm "init" and "join" operations. The value of + this field must be one of "Always", "IfNotPresent" or + "Never". Defaults to "IfNotPresent" if not set. + enum: + - Always + - IfNotPresent + - Never + type: string + imagePullSerial: + description: |- + imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. + This option takes effect only on Kubernetes >=1.31.0. + Default: true (defaulted in kubeadm) + type: boolean + kubeletExtraArgs: + description: |- + kubeletExtraArgs is a list of args to pass to kubelet. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name and + a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: kubeletExtraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + name: + description: |- + name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + This field is also used in the CommonName field of the kubelet's client certificate to the API server. + Defaults to the hostname of the node if not provided. + maxLength: 253 + minLength: 1 + type: string + taints: + description: |- + taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an + empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. + items: + description: |- + The node this Taint is attached to has the "effect" on + any pod that does not tolerate the Taint. + properties: + effect: + description: |- + Required. The effect of the taint on pods + that do not tolerate the taint. + Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied to + a node. + type: string + timeAdded: + description: TimeAdded represents the time at which + the taint was added. + format: date-time + type: string + value: + description: The taint value corresponding to the taint + key. + type: string + required: + - effect + - key + type: object + maxItems: 100 + minItems: 0 + type: array + type: object + patches: + description: |- + patches contains options related to applying patches to components deployed by kubeadm during + "kubeadm join". The minimum kubernetes version needed to support Patches is v1.22 + minProperties: 1 + properties: + directory: + description: |- + directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". + For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of + "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one + of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. + The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". + "suffix" is an optional string that can be used to determine which patches are applied + first alpha-numerically. + These files can be written into the target directory via KubeadmConfig.Files which + specifies additional files to be created on the machine, either with content inline or + by referencing a secret. + maxLength: 512 + minLength: 1 + type: string + type: object + skipPhases: + description: |- + skipPhases is a list of phases to skip during command execution. + The list of phases can be obtained with the "kubeadm init --help" command. + This option takes effect only on Kubernetes >=1.22.0. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + timeouts: + description: timeouts holds various timeouts that apply to kubeadm + commands. + minProperties: 1 + properties: + controlPlaneComponentHealthCheckSeconds: + description: |- + controlPlaneComponentHealthCheckSeconds is the amount of time to wait for a control plane + component, such as the API server, to be healthy during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + discoverySeconds: + description: |- + discoverySeconds is the amount of time to wait for kubeadm to validate the API server identity + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + etcdAPICallSeconds: + description: |- + etcdAPICallSeconds is the amount of time to wait for the kubeadm etcd client to complete a request to + the etcd cluster. + If not set, it defaults to 2m (120s). + format: int32 + minimum: 0 + type: integer + kubeletHealthCheckSeconds: + description: |- + kubeletHealthCheckSeconds is the amount of time to wait for the kubelet to be healthy + during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + kubernetesAPICallSeconds: + description: |- + kubernetesAPICallSeconds is the amount of time to wait for the kubeadm client to complete a request to + the API server. This applies to all types of methods (GET, POST, etc). + If not set, it defaults to 1m (60s). + format: int32 + minimum: 0 + type: integer + tlsBootstrapSeconds: + description: |- + tlsBootstrapSeconds is the amount of time to wait for the kubelet to complete TLS bootstrap + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + type: object + type: object + mounts: + description: mounts specifies a list of mount points to be setup. + items: + description: MountPoints defines input for generated mounts in cloud-init. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + ntp: + description: ntp specifies NTP configuration + minProperties: 1 + properties: + enabled: + description: enabled specifies whether NTP should be enabled + type: boolean + servers: + description: servers specifies which NTP servers to use + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + type: object + postKubeadmCommands: + description: |- + postKubeadmCommands specifies extra commands to run after kubeadm runs. + With cloud-init, this is appended to the runcmd module configuration, and is typically executed in + the cloud-final.service systemd unit. In Ignition, this is appended to /etc/kubeadm.sh. + items: + maxLength: 10240 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + preKubeadmCommands: + description: |- + preKubeadmCommands specifies extra commands to run before kubeadm runs. + With cloud-init, this is prepended to the runcmd module configuration, and is typically executed in + the cloud-final.service systemd unit. In Ignition, this is prepended to /etc/kubeadm.sh. + items: + maxLength: 10240 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + users: + description: users specifies extra users to add + items: + description: User defines the input for a generated user in cloud-init. + properties: + gecos: + description: gecos specifies the gecos to use for the user + maxLength: 256 + minLength: 1 + type: string + groups: + description: groups specifies the additional groups for the + user + maxLength: 256 + minLength: 1 + type: string + homeDir: + description: homeDir specifies the home directory to use for + the user + maxLength: 256 + minLength: 1 + type: string + inactive: + description: inactive specifies whether to mark the user as + inactive + type: boolean + lockPassword: + description: lockPassword specifies if password login should + be disabled + type: boolean + name: + description: name specifies the user name + maxLength: 256 + minLength: 1 + type: string + passwd: + description: passwd specifies a hashed password for the user + maxLength: 256 + minLength: 1 + type: string + passwdFrom: + description: passwdFrom is a referenced source of passwd to + populate the passwd. + properties: + secret: + description: secret represents a secret that should populate + this password. + properties: + key: + description: key is the key in the secret's data map + for this value. + maxLength: 256 + minLength: 1 + type: string + name: + description: name of the secret in the KubeadmBootstrapConfig's + namespace to use. + maxLength: 253 + minLength: 1 + type: string + required: + - key + - name + type: object + required: + - secret + type: object + primaryGroup: + description: primaryGroup specifies the primary group for the + user + maxLength: 256 + minLength: 1 + type: string + shell: + description: shell specifies the user's shell + maxLength: 256 + minLength: 1 + type: string + sshAuthorizedKeys: + description: sshAuthorizedKeys specifies a list of ssh authorized + keys for the user + items: + maxLength: 2048 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + sudo: + description: sudo specifies a sudo role for the user + maxLength: 256 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + verbosity: + description: |- + verbosity is the number for the kubeadm log level verbosity. + It overrides the `--v` flag in kubeadm commands. + format: int32 + type: integer + type: object + status: + description: status is the observed state of KubeadmConfig. + minProperties: 1 + properties: + conditions: + description: |- + conditions represents the observations of a KubeadmConfig's current state. + Known condition types are Ready, DataSecretAvailable, CertificatesAvailable. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + dataSecretName: + description: dataSecretName is the name of the secret that stores + the bootstrap data script. + maxLength: 253 + minLength: 1 + type: string + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + conditions: + description: |- + conditions defines current service state of the KubeadmConfig. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureMessage: + description: |- + failureMessage will be set on non-retryable errors + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + maxLength: 10240 + minLength: 1 + type: string + failureReason: + description: |- + failureReason will be set on non-retryable errors + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + maxLength: 256 + minLength: 1 + type: string + type: object + type: object + initialization: + description: |- + initialization provides observations of the KubeadmConfig initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning. + minProperties: 1 + properties: + dataSecretCreated: + description: |- + dataSecretCreated is true when the Machine's boostrap secret is created. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Machine provisioning. + type: boolean + type: object + observedGeneration: + description: observedGeneration is the latest generation observed + by the controller. + format: int64 + minimum: 1 + type: integer + type: object + type: object + served: true storage: true subresources: status: {} @@ -4111,10 +4944,11 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-kubeadm-bootstrap-system/capi-kubeadm-bootstrap-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: bootstrap-kubeadm cluster.x-k8s.io/v1beta1: v1beta1 + cluster.x-k8s.io/v1beta2: v1beta2 name: kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io spec: conversion: @@ -4127,7 +4961,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: bootstrap.cluster.x-k8s.io names: categories: @@ -4138,1920 +4971,12 @@ spec: singular: kubeadmconfigtemplate scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of KubeadmConfigTemplate. - properties: - template: - description: template defines the desired state of KubeadmConfigTemplate. - properties: - spec: - description: spec is the desired state of KubeadmConfig. - properties: - clusterConfiguration: - description: clusterConfiguration along with InitConfiguration - are the configurations necessary for the init command - properties: - apiServer: - description: APIServer contains extra settings for the - API server control plane component - properties: - certSANs: - description: CertSANs sets extra Subject Alternative - Names for the API Server signing cert. - items: - type: string - type: array - extraArgs: - additionalProperties: - type: string - description: ExtraArgs is an extra set of flags to - pass to the control plane component. - type: object - extraVolumes: - description: ExtraVolumes is an extra set of host - volumes, mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - HostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: MountPath is the path inside the - pod where hostPath will be mounted. - type: string - name: - description: Name of the volume inside the pod - template. - type: string - pathType: - description: PathType is the type of the HostPath. - type: string - readOnly: - description: ReadOnly controls write access - to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - timeoutForControlPlane: - description: TimeoutForControlPlane controls the timeout - that we use for API server to appear - type: string - type: object - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - certificatesDir: - description: |- - CertificatesDir specifies where to store or look for all required certificates. - NB: if not provided, this will default to `/etc/kubernetes/pki` - type: string - clusterName: - description: The cluster name - type: string - controlPlaneEndpoint: - description: |- - ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it - can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. - In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort - are used; in case the ControlPlaneEndpoint is specified but without a TCP port, - the BindPort is used. - Possible usages are: - e.g. In a cluster with more than one control plane instances, this field should be - assigned the address of the external load balancer in front of the - control plane instances. - e.g. in environments with enforced node recycling, the ControlPlaneEndpoint - could be used for assigning a stable DNS to the control plane. - NB: This value defaults to the first value in the Cluster object status.apiEndpoints array. - type: string - controllerManager: - description: ControllerManager contains extra settings - for the controller manager control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: ExtraArgs is an extra set of flags to - pass to the control plane component. - type: object - extraVolumes: - description: ExtraVolumes is an extra set of host - volumes, mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - HostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: MountPath is the path inside the - pod where hostPath will be mounted. - type: string - name: - description: Name of the volume inside the pod - template. - type: string - pathType: - description: PathType is the type of the HostPath. - type: string - readOnly: - description: ReadOnly controls write access - to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - dns: - description: DNS defines the options for the DNS add-on - installed in the cluster. - properties: - imageRepository: - description: |- - ImageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - ImageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - type: - description: Type defines the DNS add-on to be used - type: string - type: object - etcd: - description: |- - Etcd holds configuration for etcd. - NB: This value defaults to a Local (stacked) etcd - properties: - external: - description: |- - External describes how to connect to an external etcd cluster - Local and External are mutually exclusive - properties: - caFile: - description: |- - CAFile is an SSL Certificate Authority file used to secure etcd communication. - Required if using a TLS connection. - type: string - certFile: - description: |- - CertFile is an SSL certification file used to secure etcd communication. - Required if using a TLS connection. - type: string - endpoints: - description: Endpoints of etcd members. Required - for ExternalEtcd. - items: - type: string - type: array - keyFile: - description: |- - KeyFile is an SSL key file used to secure etcd communication. - Required if using a TLS connection. - type: string - required: - - caFile - - certFile - - endpoints - - keyFile - type: object - local: - description: |- - Local provides configuration knobs for configuring the local etcd instance - Local and External are mutually exclusive - properties: - dataDir: - description: |- - DataDir is the directory etcd will place its data. - Defaults to "/var/lib/etcd". - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs are extra arguments provided to the etcd binary - when run inside a static pod. - type: object - imageRepository: - description: |- - ImageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - ImageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - peerCertSANs: - description: PeerCertSANs sets extra Subject Alternative - Names for the etcd peer signing cert. - items: - type: string - type: array - serverCertSANs: - description: ServerCertSANs sets extra Subject - Alternative Names for the etcd server signing - cert. - items: - type: string - type: array - type: object - type: object - featureGates: - additionalProperties: - type: boolean - description: FeatureGates enabled by the user. - type: object - imageRepository: - description: |- - ImageRepository sets the container registry to pull images from. - If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) - `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io` - will be used for all the other images. - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - kubernetesVersion: - description: |- - KubernetesVersion is the target version of the control plane. - NB: This value defaults to the Machine object spec.version - type: string - networking: - description: |- - Networking holds configuration for the networking topology of the cluster. - NB: This value defaults to the Cluster object spec.clusterNetwork. - properties: - dnsDomain: - description: DNSDomain is the dns domain used by k8s - services. Defaults to "cluster.local". - type: string - podSubnet: - description: |- - PodSubnet is the subnet used by pods. - If unset, the API server will not allocate CIDR ranges for every node. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set - type: string - serviceSubnet: - description: |- - ServiceSubnet is the subnet used by k8s services. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or - to "10.96.0.0/12" if that's unset. - type: string - type: object - scheduler: - description: Scheduler contains extra settings for the - scheduler control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: ExtraArgs is an extra set of flags to - pass to the control plane component. - type: object - extraVolumes: - description: ExtraVolumes is an extra set of host - volumes, mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - HostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: MountPath is the path inside the - pod where hostPath will be mounted. - type: string - name: - description: Name of the volume inside the pod - template. - type: string - pathType: - description: PathType is the type of the HostPath. - type: string - readOnly: - description: ReadOnly controls write access - to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - useHyperKubeImage: - description: UseHyperKubeImage controls if hyperkube should - be used for Kubernetes components instead of their respective - separate images - type: boolean - type: object - diskSetup: - description: diskSetup specifies options for the creation - of partition tables and file systems on devices. - properties: - filesystems: - description: filesystems specifies the list of file systems - to setup. - items: - description: Filesystem defines the file systems to - be created. - properties: - device: - description: device specifies the device name - type: string - extraOpts: - description: extraOpts defined extra options to - add to the command for creating the file system. - items: - type: string - type: array - filesystem: - description: filesystem specifies the file system - type. - type: string - label: - description: label specifies the file system label - to be used. If set to None, no label is used. - type: string - overwrite: - description: |- - overwrite defines whether or not to overwrite any existing filesystem. - If true, any pre-existing file system will be destroyed. Use with Caution. - type: boolean - partition: - description: 'partition specifies the partition - to use. The valid options are: "auto|any", "auto", - "any", "none", and , where NUM is the actual - partition number.' - type: string - replaceFS: - description: |- - replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . - NOTE: unless you define a label, this requires the use of the 'any' partition directive. - type: string - required: - - device - - filesystem - - label - type: object - type: array - partitions: - description: partitions specifies the list of the partitions - to setup. - items: - description: Partition defines how to create and layout - a partition. - properties: - device: - description: device is the name of the device. - type: string - layout: - description: |- - layout specifies the device layout. - If it is true, a single partition will be created for the entire device. - When layout is false, it means don't partition or ignore existing partitioning. - type: boolean - overwrite: - description: |- - overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. - Use with caution. Default is 'false'. - type: boolean - tableType: - description: |- - tableType specifies the tupe of partition table. The following are supported: - 'mbr': default and setups a MS-DOS partition table - 'gpt': setups a GPT partition table - type: string - required: - - device - - layout - type: object - type: array - type: object - files: - description: files specifies extra files to be passed to user_data - upon creation. - items: - description: File defines the input for generating write_files - in cloud-init. - properties: - content: - description: content is the actual content of the file. - type: string - contentFrom: - description: contentFrom is a referenced source of content - to populate the file. - properties: - secret: - description: secret represents a secret that should - populate this file. - properties: - key: - description: key is the key in the secret's - data map for this value. - type: string - name: - description: name of the secret in the KubeadmBootstrapConfig's - namespace to use. - type: string - required: - - key - - name - type: object - required: - - secret - type: object - encoding: - description: encoding specifies the encoding of the - file contents. - enum: - - base64 - - gzip - - gzip+base64 - type: string - owner: - description: owner specifies the ownership of the file, - e.g. "root:root". - type: string - path: - description: path specifies the full path on disk where - to store the file. - type: string - permissions: - description: permissions specifies the permissions to - assign to the file, e.g. "0640". - type: string - required: - - path - type: object - type: array - format: - description: format specifies the output format of the bootstrap - data - enum: - - cloud-config - type: string - initConfiguration: - description: initConfiguration along with ClusterConfiguration - are the configurations necessary for the init command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - bootstrapTokens: - description: |- - BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. - This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature - items: - description: BootstrapToken describes one bootstrap - token, stored as a Secret in the cluster. - properties: - description: - description: |- - Description sets a human-friendly message why this token exists and what it's used - for, so other administrators can know its purpose. - type: string - expires: - description: |- - Expires specifies the timestamp when this token expires. Defaults to being set - dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. - format: date-time - type: string - groups: - description: |- - Groups specifies the extra groups that this token will authenticate as when/if - used for authentication - items: - type: string - type: array - token: - description: |- - Token is used for establishing bidirectional trust between nodes and control-planes. - Used for joining nodes in the cluster. - type: string - ttl: - description: |- - TTL defines the time to live for this token. Defaults to 24h. - Expires and TTL are mutually exclusive. - type: string - usages: - description: |- - Usages describes the ways in which this token can be used. Can by default be used - for establishing bidirectional trust, but that can be changed here. - items: - type: string - type: array - required: - - token - type: object - type: array - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - localAPIEndpoint: - description: |- - LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node - In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint - is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This - configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible - on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process - fails you may set the desired value here. - properties: - advertiseAddress: - description: AdvertiseAddress sets the IP address - for the API server to advertise. - type: string - bindPort: - description: |- - BindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - required: - - advertiseAddress - - bindPort - type: object - nodeRegistration: - description: |- - NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: CRISocket is used to retrieve container - runtime info. This information will be annotated - to the Node API object, for later re-use - type: string - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied - to a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to - the taint key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - joinConfiguration: - description: joinConfiguration is the kubeadm configuration - for the join command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - caCertPath: - description: |- - CACertPath is the path to the SSL certificate authority used to - secure comunications between node and control-plane. - Defaults to "/etc/kubernetes/pki/ca.crt". - type: string - controlPlane: - description: |- - ControlPlane defines the additional control plane instance to be deployed on the joining node. - If nil, no additional control plane instance will be deployed. - properties: - localAPIEndpoint: - description: LocalAPIEndpoint represents the endpoint - of the API server instance to be deployed on this - node. - properties: - advertiseAddress: - description: AdvertiseAddress sets the IP address - for the API server to advertise. - type: string - bindPort: - description: |- - BindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - required: - - advertiseAddress - - bindPort - type: object - type: object - discovery: - description: Discovery specifies the options for the kubelet - to use during the TLS Bootstrap process - properties: - bootstrapToken: - description: |- - BootstrapToken is used to set the options for bootstrap token based discovery - BootstrapToken and File are mutually exclusive - properties: - apiServerEndpoint: - description: APIServerEndpoint is an IP or domain - name to the API server from which info will - be fetched. - type: string - caCertHashes: - description: |- - CACertHashes specifies a set of public key pins to verify - when token-based discovery is used. The root CA found during discovery - must match one of these values. Specifying an empty set disables root CA - pinning, which can be unsafe. Each hash is specified as ":", - where the only currently supported type is "sha256". This is a hex-encoded - SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded - ASN.1. These hashes can be calculated using, for example, OpenSSL: - openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex - items: - type: string - type: array - token: - description: |- - Token is a token used to validate cluster information - fetched from the control-plane. - type: string - unsafeSkipCAVerification: - description: |- - UnsafeSkipCAVerification allows token-based discovery - without CA verification via CACertHashes. This can weaken - the security of kubeadm since other nodes can impersonate the control-plane. - type: boolean - required: - - token - - unsafeSkipCAVerification - type: object - file: - description: |- - File is used to specify a file or URL to a kubeconfig file from which to load cluster information - BootstrapToken and File are mutually exclusive - properties: - kubeConfigPath: - description: KubeConfigPath is used to specify - the actual file path or URL to the kubeconfig - file from which to load cluster information - type: string - required: - - kubeConfigPath - type: object - timeout: - description: Timeout modifies the discovery timeout - type: string - tlsBootstrapToken: - description: |- - TLSBootstrapToken is a token used for TLS bootstrapping. - If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. - If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information - type: string - type: object - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - nodeRegistration: - description: |- - NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: CRISocket is used to retrieve container - runtime info. This information will be annotated - to the Node API object, for later re-use - type: string - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied - to a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to - the taint key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - mounts: - description: mounts specifies a list of mount points to be - setup. - items: - description: MountPoints defines input for generated mounts - in cloud-init. - items: - type: string - type: array - type: array - ntp: - description: ntp specifies NTP configuration - properties: - enabled: - description: enabled specifies whether NTP should be enabled - type: boolean - servers: - description: servers specifies which NTP servers to use - items: - type: string - type: array - type: object - postKubeadmCommands: - description: postKubeadmCommands specifies extra commands - to run after kubeadm runs - items: - type: string - type: array - preKubeadmCommands: - description: preKubeadmCommands specifies extra commands to - run before kubeadm runs - items: - type: string - type: array - useExperimentalRetryJoin: - description: |- - useExperimentalRetryJoin replaces a basic kubeadm command with a shell - script with retries for joins. - - This is meant to be an experimental temporary workaround on some environments - where joins fail due to timing (and other issues). The long term goal is to add retries to - kubeadm proper and use that functionality. - - This will add about 40KB to userdata - - For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055. - type: boolean - users: - description: users specifies extra users to add - items: - description: User defines the input for a generated user - in cloud-init. - properties: - gecos: - description: gecos specifies the gecos to use for the - user - type: string - groups: - description: groups specifies the additional groups - for the user - type: string - homeDir: - description: homeDir specifies the home directory to - use for the user - type: string - inactive: - description: inactive specifies whether to mark the - user as inactive - type: boolean - lockPassword: - description: lockPassword specifies if password login - should be disabled - type: boolean - name: - description: name specifies the user name - type: string - passwd: - description: passwd specifies a hashed password for - the user - type: string - primaryGroup: - description: primaryGroup specifies the primary group - for the user - type: string - shell: - description: shell specifies the user's shell - type: string - sshAuthorizedKeys: - description: sshAuthorizedKeys specifies a list of ssh - authorized keys for the user - items: - type: string - type: array - sudo: - description: sudo specifies a sudo role for the user - type: string - required: - - name - type: object - type: array - verbosity: - description: |- - verbosity is the number for the kubeadm log level verbosity. - It overrides the `--v` flag in kubeadm commands. - format: int32 - type: integer - type: object - type: object - required: - - template - type: object - type: object - served: false - storage: false - additionalPrinterColumns: - description: Time duration since creation of KubeadmConfigTemplate jsonPath: .metadata.creationTimestamp name: Age type: date deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of KubeadmConfigTemplate. - properties: - template: - description: template defines the desired state of KubeadmConfigTemplate. - properties: - spec: - description: spec is the desired state of KubeadmConfig. - properties: - clusterConfiguration: - description: clusterConfiguration along with InitConfiguration - are the configurations necessary for the init command - properties: - apiServer: - description: apiServer contains extra settings for the - API server control plane component - properties: - certSANs: - description: certSANs sets extra Subject Alternative - Names for the API Server signing cert. - items: - type: string - type: array - extraArgs: - additionalProperties: - type: string - description: extraArgs is an extra set of flags to - pass to the control plane component. - type: object - extraVolumes: - description: extraVolumes is an extra set of host - volumes, mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - hostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: mountPath is the path inside the - pod where hostPath will be mounted. - type: string - name: - description: name of the volume inside the pod - template. - type: string - pathType: - description: pathType is the type of the HostPath. - type: string - readOnly: - description: readOnly controls write access - to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - timeoutForControlPlane: - description: timeoutForControlPlane controls the timeout - that we use for API server to appear - type: string - type: object - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - certificatesDir: - description: |- - certificatesDir specifies where to store or look for all required certificates. - NB: if not provided, this will default to `/etc/kubernetes/pki` - type: string - clusterName: - description: clusterName is the cluster name - type: string - controlPlaneEndpoint: - description: |- - controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it - can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. - In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort - are used; in case the ControlPlaneEndpoint is specified but without a TCP port, - the BindPort is used. - Possible usages are: - e.g. In a cluster with more than one control plane instances, this field should be - assigned the address of the external load balancer in front of the - control plane instances. - e.g. in environments with enforced node recycling, the ControlPlaneEndpoint - could be used for assigning a stable DNS to the control plane. - NB: This value defaults to the first value in the Cluster object status.apiEndpoints array. - type: string - controllerManager: - description: controllerManager contains extra settings - for the controller manager control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: extraArgs is an extra set of flags to - pass to the control plane component. - type: object - extraVolumes: - description: extraVolumes is an extra set of host - volumes, mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - hostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: mountPath is the path inside the - pod where hostPath will be mounted. - type: string - name: - description: name of the volume inside the pod - template. - type: string - pathType: - description: pathType is the type of the HostPath. - type: string - readOnly: - description: readOnly controls write access - to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - dns: - description: dns defines the options for the DNS add-on - installed in the cluster. - properties: - imageRepository: - description: |- - imageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - imageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - type: object - etcd: - description: |- - etcd holds configuration for etcd. - NB: This value defaults to a Local (stacked) etcd - properties: - external: - description: |- - external describes how to connect to an external etcd cluster - Local and External are mutually exclusive - properties: - caFile: - description: |- - caFile is an SSL Certificate Authority file used to secure etcd communication. - Required if using a TLS connection. - type: string - certFile: - description: |- - certFile is an SSL certification file used to secure etcd communication. - Required if using a TLS connection. - type: string - endpoints: - description: endpoints of etcd members. Required - for ExternalEtcd. - items: - type: string - type: array - keyFile: - description: |- - keyFile is an SSL key file used to secure etcd communication. - Required if using a TLS connection. - type: string - required: - - caFile - - certFile - - endpoints - - keyFile - type: object - local: - description: |- - local provides configuration knobs for configuring the local etcd instance - Local and External are mutually exclusive - properties: - dataDir: - description: |- - dataDir is the directory etcd will place its data. - Defaults to "/var/lib/etcd". - type: string - extraArgs: - additionalProperties: - type: string - description: |- - extraArgs are extra arguments provided to the etcd binary - when run inside a static pod. - type: object - imageRepository: - description: |- - imageRepository sets the container registry to pull images from. - if not set, the ImageRepository defined in ClusterConfiguration will be used instead. - type: string - imageTag: - description: |- - imageTag allows to specify a tag for the image. - In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. - type: string - peerCertSANs: - description: peerCertSANs sets extra Subject Alternative - Names for the etcd peer signing cert. - items: - type: string - type: array - serverCertSANs: - description: serverCertSANs sets extra Subject - Alternative Names for the etcd server signing - cert. - items: - type: string - type: array - type: object - type: object - featureGates: - additionalProperties: - type: boolean - description: featureGates enabled by the user. - type: object - imageRepository: - description: |- - imageRepository sets the container registry to pull images from. - If empty, `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) - `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `registry.k8s.io` - will be used for all the other images. - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - kubernetesVersion: - description: |- - kubernetesVersion is the target version of the control plane. - NB: This value defaults to the Machine object spec.version - type: string - networking: - description: |- - networking holds configuration for the networking topology of the cluster. - NB: This value defaults to the Cluster object spec.clusterNetwork. - properties: - dnsDomain: - description: dnsDomain is the dns domain used by k8s - services. Defaults to "cluster.local". - type: string - podSubnet: - description: |- - podSubnet is the subnet used by pods. - If unset, the API server will not allocate CIDR ranges for every node. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set - type: string - serviceSubnet: - description: |- - serviceSubnet is the subnet used by k8s services. - Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or - to "10.96.0.0/12" if that's unset. - type: string - type: object - scheduler: - description: scheduler contains extra settings for the - scheduler control plane component - properties: - extraArgs: - additionalProperties: - type: string - description: extraArgs is an extra set of flags to - pass to the control plane component. - type: object - extraVolumes: - description: extraVolumes is an extra set of host - volumes, mounted to the control plane component. - items: - description: |- - HostPathMount contains elements describing volumes that are mounted from the - host. - properties: - hostPath: - description: |- - hostPath is the path in the host that will be mounted inside - the pod. - type: string - mountPath: - description: mountPath is the path inside the - pod where hostPath will be mounted. - type: string - name: - description: name of the volume inside the pod - template. - type: string - pathType: - description: pathType is the type of the HostPath. - type: string - readOnly: - description: readOnly controls write access - to the volume - type: boolean - required: - - hostPath - - mountPath - - name - type: object - type: array - type: object - type: object - diskSetup: - description: diskSetup specifies options for the creation - of partition tables and file systems on devices. - properties: - filesystems: - description: filesystems specifies the list of file systems - to setup. - items: - description: Filesystem defines the file systems to - be created. - properties: - device: - description: device specifies the device name - type: string - extraOpts: - description: extraOpts defined extra options to - add to the command for creating the file system. - items: - type: string - type: array - filesystem: - description: filesystem specifies the file system - type. - type: string - label: - description: label specifies the file system label - to be used. If set to None, no label is used. - type: string - overwrite: - description: |- - overwrite defines whether or not to overwrite any existing filesystem. - If true, any pre-existing file system will be destroyed. Use with Caution. - type: boolean - partition: - description: 'partition specifies the partition - to use. The valid options are: "auto|any", "auto", - "any", "none", and , where NUM is the actual - partition number.' - type: string - replaceFS: - description: |- - replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . - NOTE: unless you define a label, this requires the use of the 'any' partition directive. - type: string - required: - - device - - filesystem - - label - type: object - type: array - partitions: - description: partitions specifies the list of the partitions - to setup. - items: - description: Partition defines how to create and layout - a partition. - properties: - device: - description: device is the name of the device. - type: string - layout: - description: |- - layout specifies the device layout. - If it is true, a single partition will be created for the entire device. - When layout is false, it means don't partition or ignore existing partitioning. - type: boolean - overwrite: - description: |- - overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. - Use with caution. Default is 'false'. - type: boolean - tableType: - description: |- - tableType specifies the tupe of partition table. The following are supported: - 'mbr': default and setups a MS-DOS partition table - 'gpt': setups a GPT partition table - type: string - required: - - device - - layout - type: object - type: array - type: object - files: - description: files specifies extra files to be passed to user_data - upon creation. - items: - description: File defines the input for generating write_files - in cloud-init. - properties: - content: - description: content is the actual content of the file. - type: string - contentFrom: - description: contentFrom is a referenced source of content - to populate the file. - properties: - secret: - description: secret represents a secret that should - populate this file. - properties: - key: - description: key is the key in the secret's - data map for this value. - type: string - name: - description: name of the secret in the KubeadmBootstrapConfig's - namespace to use. - type: string - required: - - key - - name - type: object - required: - - secret - type: object - encoding: - description: encoding specifies the encoding of the - file contents. - enum: - - base64 - - gzip - - gzip+base64 - type: string - owner: - description: owner specifies the ownership of the file, - e.g. "root:root". - type: string - path: - description: path specifies the full path on disk where - to store the file. - type: string - permissions: - description: permissions specifies the permissions to - assign to the file, e.g. "0640". - type: string - required: - - path - type: object - type: array - format: - description: format specifies the output format of the bootstrap - data - enum: - - cloud-config - type: string - initConfiguration: - description: initConfiguration along with ClusterConfiguration - are the configurations necessary for the init command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - bootstrapTokens: - description: |- - bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. - This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature - items: - description: BootstrapToken describes one bootstrap - token, stored as a Secret in the cluster. - properties: - description: - description: |- - description sets a human-friendly message why this token exists and what it's used - for, so other administrators can know its purpose. - type: string - expires: - description: |- - expires specifies the timestamp when this token expires. Defaults to being set - dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. - format: date-time - type: string - groups: - description: |- - groups specifies the extra groups that this token will authenticate as when/if - used for authentication - items: - type: string - type: array - token: - description: |- - token is used for establishing bidirectional trust between nodes and control-planes. - Used for joining nodes in the cluster. - type: string - ttl: - description: |- - ttl defines the time to live for this token. Defaults to 24h. - Expires and TTL are mutually exclusive. - type: string - usages: - description: |- - usages describes the ways in which this token can be used. Can by default be used - for establishing bidirectional trust, but that can be changed here. - items: - type: string - type: array - required: - - token - type: object - type: array - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - localAPIEndpoint: - description: |- - localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node - In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint - is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This - configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible - on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process - fails you may set the desired value here. - properties: - advertiseAddress: - description: advertiseAddress sets the IP address - for the API server to advertise. - type: string - bindPort: - description: |- - bindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - type: object - nodeRegistration: - description: |- - nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: criSocket is used to retrieve container - runtime info. This information will be annotated - to the Node API object, for later re-use - type: string - ignorePreflightErrors: - description: ignorePreflightErrors provides a slice - of pre-flight errors to be ignored when the current - node is registered. - items: - type: string - type: array - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied - to a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to - the taint key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - joinConfiguration: - description: joinConfiguration is the kubeadm configuration - for the join command - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - caCertPath: - description: |- - caCertPath is the path to the SSL certificate authority used to - secure comunications between node and control-plane. - Defaults to "/etc/kubernetes/pki/ca.crt". - type: string - controlPlane: - description: |- - controlPlane defines the additional control plane instance to be deployed on the joining node. - If nil, no additional control plane instance will be deployed. - properties: - localAPIEndpoint: - description: localAPIEndpoint represents the endpoint - of the API server instance to be deployed on this - node. - properties: - advertiseAddress: - description: advertiseAddress sets the IP address - for the API server to advertise. - type: string - bindPort: - description: |- - bindPort sets the secure port for the API Server to bind to. - Defaults to 6443. - format: int32 - type: integer - type: object - type: object - discovery: - description: discovery specifies the options for the kubelet - to use during the TLS Bootstrap process - properties: - bootstrapToken: - description: |- - bootstrapToken is used to set the options for bootstrap token based discovery - BootstrapToken and File are mutually exclusive - properties: - apiServerEndpoint: - description: apiServerEndpoint is an IP or domain - name to the API server from which info will - be fetched. - type: string - caCertHashes: - description: |- - caCertHashes specifies a set of public key pins to verify - when token-based discovery is used. The root CA found during discovery - must match one of these values. Specifying an empty set disables root CA - pinning, which can be unsafe. Each hash is specified as ":", - where the only currently supported type is "sha256". This is a hex-encoded - SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded - ASN.1. These hashes can be calculated using, for example, OpenSSL: - openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex - items: - type: string - type: array - token: - description: |- - token is a token used to validate cluster information - fetched from the control-plane. - type: string - unsafeSkipCAVerification: - description: |- - unsafeSkipCAVerification allows token-based discovery - without CA verification via CACertHashes. This can weaken - the security of kubeadm since other nodes can impersonate the control-plane. - type: boolean - required: - - token - type: object - file: - description: |- - file is used to specify a file or URL to a kubeconfig file from which to load cluster information - BootstrapToken and File are mutually exclusive - properties: - kubeConfigPath: - description: kubeConfigPath is used to specify - the actual file path or URL to the kubeconfig - file from which to load cluster information - type: string - required: - - kubeConfigPath - type: object - timeout: - description: timeout modifies the discovery timeout - type: string - tlsBootstrapToken: - description: |- - tlsBootstrapToken is a token used for TLS bootstrapping. - If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. - If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information - type: string - type: object - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - nodeRegistration: - description: |- - nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. - When used in the context of control plane nodes, NodeRegistration should remain consistent - across both InitConfiguration and JoinConfiguration - properties: - criSocket: - description: criSocket is used to retrieve container - runtime info. This information will be annotated - to the Node API object, for later re-use - type: string - ignorePreflightErrors: - description: ignorePreflightErrors provides a slice - of pre-flight errors to be ignored when the current - node is registered. - items: - type: string - type: array - kubeletExtraArgs: - additionalProperties: - type: string - description: |- - kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file - kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap - Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. - type: object - name: - description: |- - name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. - This field is also used in the CommonName field of the kubelet's client certificate to the API server. - Defaults to the hostname of the node if not provided. - type: string - taints: - description: |- - taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process - it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an - empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. - items: - description: |- - The node this Taint is attached to has the "effect" on - any pod that does not tolerate the Taint. - properties: - effect: - description: |- - Required. The effect of the taint on pods - that do not tolerate the taint. - Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Required. The taint key to be applied - to a node. - type: string - timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to - the taint key. - type: string - required: - - effect - - key - type: object - type: array - type: object - type: object - mounts: - description: mounts specifies a list of mount points to be - setup. - items: - description: MountPoints defines input for generated mounts - in cloud-init. - items: - type: string - type: array - type: array - ntp: - description: ntp specifies NTP configuration - properties: - enabled: - description: enabled specifies whether NTP should be enabled - type: boolean - servers: - description: servers specifies which NTP servers to use - items: - type: string - type: array - type: object - postKubeadmCommands: - description: postKubeadmCommands specifies extra commands - to run after kubeadm runs - items: - type: string - type: array - preKubeadmCommands: - description: preKubeadmCommands specifies extra commands to - run before kubeadm runs - items: - type: string - type: array - useExperimentalRetryJoin: - description: |- - useExperimentalRetryJoin replaces a basic kubeadm command with a shell - script with retries for joins. - - This is meant to be an experimental temporary workaround on some environments - where joins fail due to timing (and other issues). The long term goal is to add retries to - kubeadm proper and use that functionality. - - This will add about 40KB to userdata - - For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055. - type: boolean - users: - description: users specifies extra users to add - items: - description: User defines the input for a generated user - in cloud-init. - properties: - gecos: - description: gecos specifies the gecos to use for the - user - type: string - groups: - description: groups specifies the additional groups - for the user - type: string - homeDir: - description: homeDir specifies the home directory to - use for the user - type: string - inactive: - description: inactive specifies whether to mark the - user as inactive - type: boolean - lockPassword: - description: lockPassword specifies if password login - should be disabled - type: boolean - name: - description: name specifies the user name - type: string - passwd: - description: passwd specifies a hashed password for - the user - type: string - primaryGroup: - description: primaryGroup specifies the primary group - for the user - type: string - shell: - description: shell specifies the user's shell - type: string - sshAuthorizedKeys: - description: sshAuthorizedKeys specifies a list of ssh - authorized keys for the user - items: - type: string - type: array - sudo: - description: sudo specifies a sudo role for the user - type: string - required: - - name - type: object - type: array - verbosity: - description: |- - verbosity is the number for the kubeadm log level verbosity. - It overrides the `--v` flag in kubeadm commands. - format: int32 - type: integer - type: object - type: object - required: - - template - type: object - type: object - served: false - storage: false - subresources: {} - - additionalPrinterColumns: - - description: Time duration since creation of KubeadmConfigTemplate - jsonPath: .metadata.creationTimestamp - name: Age - type: date name: v1beta1 schema: openAPIV3Schema: @@ -6152,8 +5077,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -6212,6 +5138,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -6323,6 +5286,24 @@ spec: may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string + caCertificateValidityPeriodDays: + description: |- + caCertificateValidityPeriodDays specifies the validity period for CA certificates generated by Cluster API. + If not specified, Cluster API will use a default of 3650 days (10 years). + This field cannot be modified. + format: int32 + maximum: 36500 + minimum: 1 + type: integer + certificateValidityPeriodDays: + description: |- + certificateValidityPeriodDays specifies the validity period for non-CA certificates generated by kubeadm. + If not specified, kubeadm will use a default of 365 days (1 year). + This field is only supported with Kubernetes v1.31 or above. + format: int32 + maximum: 1095 + minimum: 1 + type: integer certificatesDir: description: |- certificatesDir specifies where to store or look for all required certificates. @@ -6372,8 +5353,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -6432,6 +5414,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -6551,6 +5570,22 @@ spec: minLength: 1 type: string type: object + encryptionAlgorithm: + description: |- + encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates. + Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384". + For Kubernetes 1.34 or above, "ECDSA-P384" is supported. + If not specified, Cluster API will use RSA-2048 as default. + When this field is modified every certificate generated afterward will use the new + encryptionAlgorithm. Existing CA certificates and service account keys are not rotated. + This field is only supported with Kubernetes v1.31 or above. + enum: + - ECDSA-P256 + - ECDSA-P384 + - RSA-2048 + - RSA-3072 + - RSA-4096 + type: string etcd: description: |- etcd holds configuration for etcd. @@ -6626,8 +5661,9 @@ spec: variable present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -6687,6 +5723,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -6865,8 +5938,9 @@ spec: present in a Container. properties: name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string value: description: |- @@ -6925,6 +5999,43 @@ spec: - fieldPath type: object x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests @@ -7101,6 +6212,43 @@ spec: maxLength: 256 minLength: 1 type: string + diskLayout: + description: |- + diskLayout specifies an ordered list of partitions, where each item defines the + percentage of disk space and optional partition type for that partition. + The sum of all partition percentages must not be greater than 100. + items: + description: PartitionSpec defines the size and + optional type for a partition. + properties: + partitionType: + description: |- + partitionType is the partition type (optional). + Supported values are Linux, LinuxSwap, LinuxRAID, LVM, Fat32, NTFS, + and LinuxExtended. These are translated to cloud-init partition type codes. + A full GPT partition GUID is also supported as a passthrough value. + maxLength: 36 + minLength: 1 + type: string + x-kubernetes-validations: + - message: partitionType must be one of Linux, + LinuxSwap, LinuxRAID, LVM, Fat32, NTFS, + LinuxExtended or a full GPT partition + GUID + rule: self.matches('^(Linux|LinuxSwap|LinuxRAID|LVM|Fat32|NTFS|LinuxExtended|[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12})$') + percentage: + description: percentage of disk that partition + will take (1-100) + format: int32 + maximum: 100 + minimum: 1 + type: integer + required: + - percentage + type: object + maxItems: 100 + minItems: 1 + type: array layout: description: |- layout specifies the device layout. @@ -7144,6 +6292,18 @@ spec: maxLength: 10240 minLength: 1 type: string + contentFormat: + description: |- + contentFormat specifies how to interpret content after it is resolved (inline or from contentFrom). + When set to "Template", content is rendered as a Go text/template. + Available template variables: + - .controlPlane.version: the Kubernetes version of the control plane (e.g. "v1.35.0"). + Only set when the cluster has a control plane reference that exposes spec.version. + When set to "Raw" or omitted, content is used verbatim. + enum: + - Raw + - Template + type: string contentFrom: description: contentFrom is a referenced source of content to populate the file. @@ -7222,7 +6382,7 @@ spec: configuration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging The data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/ - maxLength: 10240 + maxLength: 32768 minLength: 1 type: string strict: @@ -7407,9 +6567,8 @@ spec: to a node. type: string timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. + description: TimeAdded represents the time at + which the taint was added. format: date-time type: string value: @@ -7816,9 +6975,8 @@ spec: to a node. type: string timeAdded: - description: |- - TimeAdded represents the time at which the taint was added. - It is only written for NoExecute taints. + description: TimeAdded represents the time at + which the taint was added. format: date-time type: string value: @@ -8044,6 +7202,2496 @@ spec: type: object type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Name of the ClusterClass owning this template + jsonPath: .metadata.ownerReferences[?(@.kind=="ClusterClass")].name + name: ClusterClass + type: string + - description: Name of the Cluster owning this template + jsonPath: .metadata.ownerReferences[?(@.kind=="Cluster")].name + name: Cluster + type: string + - description: Time duration since creation of KubeadmConfigTemplate + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of KubeadmConfigTemplate. + properties: + template: + description: template defines the desired state of KubeadmConfigTemplate. + minProperties: 1 + properties: + metadata: + description: |- + metadata is the standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + spec: + description: spec is the desired state of KubeadmConfig. + minProperties: 1 + properties: + bootCommands: + description: |- + bootCommands specifies extra commands to run very early in the boot process via the cloud-init bootcmd + module. bootcmd will run on every boot, 'cloud-init-per' command can be used to make bootcmd run exactly + once. This is typically run in the cloud-init.service systemd unit. This has no effect in Ignition. + items: + maxLength: 10240 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + clusterConfiguration: + description: clusterConfiguration along with InitConfiguration + are the configurations necessary for the init command + minProperties: 1 + properties: + apiServer: + description: apiServer contains extra settings for the + API server control plane component + minProperties: 1 + properties: + certSANs: + description: certSANs sets extra Subject Alternative + Names for the API Server signing cert. + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraArgs: + description: |- + extraArgs is a list of args to pass to the control plane component. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name + and a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to the control plane component. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraVolumes: + description: extraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: |- + HostPathMount contains elements describing volumes that are mounted from the + host. + properties: + hostPath: + description: |- + hostPath is the path in the host that will be mounted inside + the pod. + maxLength: 512 + minLength: 1 + type: string + mountPath: + description: mountPath is the path inside the + pod where hostPath will be mounted. + maxLength: 512 + minLength: 1 + type: string + name: + description: name of the volume inside the pod + template. + maxLength: 512 + minLength: 1 + type: string + pathType: + description: pathType is the type of the HostPath. + type: string + readOnly: + description: readOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + caCertificateValidityPeriodDays: + description: |- + caCertificateValidityPeriodDays specifies the validity period for CA certificates generated by Cluster API. + If not specified, Cluster API will use a default of 3650 days (10 years). + This field cannot be modified. + format: int32 + maximum: 36500 + minimum: 1 + type: integer + certificateValidityPeriodDays: + description: |- + certificateValidityPeriodDays specifies the validity period for non-CA certificates generated by kubeadm. + If not specified, kubeadm will use a default of 365 days (1 year). + This field is only supported with Kubernetes v1.31 or above. + format: int32 + maximum: 1095 + minimum: 1 + type: integer + certificatesDir: + description: |- + certificatesDir specifies where to store or look for all required certificates. + NB: if not provided, this will default to `/etc/kubernetes/pki` + maxLength: 512 + minLength: 1 + type: string + controlPlaneEndpoint: + description: |- + controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. + In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort + are used; in case the ControlPlaneEndpoint is specified but without a TCP port, + the BindPort is used. + Possible usages are: + e.g. In a cluster with more than one control plane instances, this field should be + assigned the address of the external load balancer in front of the + control plane instances. + e.g. in environments with enforced node recycling, the ControlPlaneEndpoint + could be used for assigning a stable DNS to the control plane. + NB: This value defaults to the first value in the Cluster object status.apiEndpoints array. + maxLength: 512 + minLength: 1 + type: string + controllerManager: + description: controllerManager contains extra settings + for the controller manager control plane component + minProperties: 1 + properties: + extraArgs: + description: |- + extraArgs is a list of args to pass to the control plane component. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name + and a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to the control plane component. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraVolumes: + description: extraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: |- + HostPathMount contains elements describing volumes that are mounted from the + host. + properties: + hostPath: + description: |- + hostPath is the path in the host that will be mounted inside + the pod. + maxLength: 512 + minLength: 1 + type: string + mountPath: + description: mountPath is the path inside the + pod where hostPath will be mounted. + maxLength: 512 + minLength: 1 + type: string + name: + description: name of the volume inside the pod + template. + maxLength: 512 + minLength: 1 + type: string + pathType: + description: pathType is the type of the HostPath. + type: string + readOnly: + description: readOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + dns: + description: dns defines the options for the DNS add-on + installed in the cluster. + minProperties: 1 + properties: + imageRepository: + description: |- + imageRepository sets the container registry to pull images from. + if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + maxLength: 512 + minLength: 1 + type: string + imageTag: + description: |- + imageTag allows to specify a tag for the image. + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + maxLength: 256 + minLength: 1 + type: string + type: object + encryptionAlgorithm: + description: |- + encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates. + Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384". + For Kubernetes 1.34 or above, "ECDSA-P384" is supported. + If not specified, Cluster API will use RSA-2048 as default. + When this field is modified every certificate generated afterward will use the new + encryptionAlgorithm. Existing CA certificates and service account keys are not rotated. + This field is only supported with Kubernetes v1.31 or above. + enum: + - ECDSA-P256 + - ECDSA-P384 + - RSA-2048 + - RSA-3072 + - RSA-4096 + type: string + etcd: + description: |- + etcd holds configuration for etcd. + NB: This value defaults to a Local (stacked) etcd + minProperties: 1 + properties: + external: + description: |- + external describes how to connect to an external etcd cluster + Local and External are mutually exclusive + properties: + caFile: + description: |- + caFile is an SSL Certificate Authority file used to secure etcd communication. + Required if using a TLS connection. + maxLength: 512 + minLength: 1 + type: string + certFile: + description: |- + certFile is an SSL certification file used to secure etcd communication. + Required if using a TLS connection. + maxLength: 512 + minLength: 1 + type: string + endpoints: + description: endpoints of etcd members. Required + for ExternalEtcd. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + keyFile: + description: |- + keyFile is an SSL key file used to secure etcd communication. + Required if using a TLS connection. + maxLength: 512 + minLength: 1 + type: string + required: + - caFile + - certFile + - endpoints + - keyFile + type: object + local: + description: |- + local provides configuration knobs for configuring the local etcd instance + Local and External are mutually exclusive + minProperties: 1 + properties: + dataDir: + description: |- + dataDir is the directory etcd will place its data. + Defaults to "/var/lib/etcd". + maxLength: 512 + minLength: 1 + type: string + extraArgs: + description: |- + extraArgs is a list of args to pass to etcd. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with + a name and a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name + == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to etcd. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + imageRepository: + description: |- + imageRepository sets the container registry to pull images from. + if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + maxLength: 512 + minLength: 1 + type: string + imageTag: + description: |- + imageTag allows to specify a tag for the image. + In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + maxLength: 256 + minLength: 1 + type: string + peerCertSANs: + description: peerCertSANs sets extra Subject Alternative + Names for the etcd peer signing cert. + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + serverCertSANs: + description: serverCertSANs sets extra Subject + Alternative Names for the etcd server signing + cert. + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + featureGates: + additionalProperties: + type: boolean + description: featureGates enabled by the user. + type: object + imageRepository: + description: |- + imageRepository sets the container registry to pull images from. + If not set, the default registry of kubeadm will be used (registry.k8s.io). + maxLength: 512 + minLength: 1 + type: string + scheduler: + description: scheduler contains extra settings for the + scheduler control plane component + minProperties: 1 + properties: + extraArgs: + description: |- + extraArgs is a list of args to pass to the control plane component. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name + and a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: extraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + extraEnvs: + description: |- + extraEnvs is an extra set of environment variables to pass to the control plane component. + Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. + This option takes effect only on Kubernetes >=1.31.0. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + extraVolumes: + description: extraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: |- + HostPathMount contains elements describing volumes that are mounted from the + host. + properties: + hostPath: + description: |- + hostPath is the path in the host that will be mounted inside + the pod. + maxLength: 512 + minLength: 1 + type: string + mountPath: + description: mountPath is the path inside the + pod where hostPath will be mounted. + maxLength: 512 + minLength: 1 + type: string + name: + description: name of the volume inside the pod + template. + maxLength: 512 + minLength: 1 + type: string + pathType: + description: pathType is the type of the HostPath. + type: string + readOnly: + description: readOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + diskSetup: + description: diskSetup specifies options for the creation + of partition tables and file systems on devices. + minProperties: 1 + properties: + filesystems: + description: filesystems specifies the list of file systems + to setup. + items: + description: Filesystem defines the file systems to + be created. + properties: + device: + description: device specifies the device name + maxLength: 256 + minLength: 1 + type: string + extraOpts: + description: extraOpts defined extra options to + add to the command for creating the file system. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + filesystem: + description: filesystem specifies the file system + type. + maxLength: 128 + minLength: 1 + type: string + label: + description: label specifies the file system label + to be used. If set to None, no label is used. + maxLength: 512 + minLength: 1 + type: string + overwrite: + description: |- + overwrite defines whether or not to overwrite any existing filesystem. + If true, any pre-existing file system will be destroyed. Use with Caution. + type: boolean + partition: + description: 'partition specifies the partition + to use. The valid options are: "auto|any", "auto", + "any", "none", and , where NUM is the actual + partition number.' + maxLength: 128 + minLength: 1 + type: string + replaceFS: + description: |- + replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . + NOTE: unless you define a label, this requires the use of the 'any' partition directive. + maxLength: 128 + minLength: 1 + type: string + required: + - device + - filesystem + type: object + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + partitions: + description: partitions specifies the list of the partitions + to setup. + items: + description: Partition defines how to create and layout + a partition. + properties: + device: + description: device is the name of the device. + maxLength: 256 + minLength: 1 + type: string + diskLayout: + description: |- + diskLayout specifies an ordered list of partitions, where each item defines the + percentage of disk space and optional partition type for that partition. + The sum of all partition percentages must not be greater than 100. + Mutually exclusive with layout. + items: + description: PartitionSpec defines the size and + optional type for a partition. + properties: + partitionType: + description: |- + partitionType is the partition type (optional). + Supported values are Linux, LinuxSwap, LinuxRAID, LVM, Fat32, NTFS, + and LinuxExtended. These are translated to cloud-init partition type codes. + A full GPT partition GUID is also supported as a passthrough value. + maxLength: 36 + minLength: 1 + type: string + x-kubernetes-validations: + - message: partitionType must be one of Linux, + LinuxSwap, LinuxRAID, LVM, Fat32, NTFS, + LinuxExtended or a full GPT partition + GUID + rule: self.matches('^(Linux|LinuxSwap|LinuxRAID|LVM|Fat32|NTFS|LinuxExtended|[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12})$') + percentage: + description: percentage of disk that partition + will take (1-100) + format: int32 + maximum: 100 + minimum: 1 + type: integer + required: + - percentage + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + layout: + description: |- + layout specifies the device layout. + If it is true, a single partition will be created for the entire device. + When layout is false, it means don't partition or ignore existing partitioning. + Mutually exclusive with diskLayout. + type: boolean + overwrite: + description: |- + overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. + Use with caution. Default is 'false'. + type: boolean + tableType: + description: |- + tableType specifies the tupe of partition table. The following are supported: + 'mbr': default and setups a MS-DOS partition table + 'gpt': setups a GPT partition table + enum: + - mbr + - gpt + type: string + required: + - device + type: object + x-kubernetes-validations: + - message: exactly one of the fields in [layout diskLayout] + must be set + rule: '[has(self.layout),has(self.diskLayout)].filter(x,x==true).size() + == 1' + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + type: object + files: + description: files specifies extra files to be passed to user_data + upon creation. + items: + description: File defines the input for generating write_files + in cloud-init. + properties: + append: + description: append specifies whether to append Content + to existing file if Path exists. + type: boolean + content: + description: content is the actual content of the file. + maxLength: 10240 + minLength: 1 + type: string + contentFormat: + description: |- + contentFormat specifies how to interpret content after it is resolved (inline or from contentFrom). + When set to "Template", content is rendered as a Go text/template. + Available template variables: + - .controlPlane.version: the Kubernetes version of the control plane (e.g. "v1.35.0"). + Only set when the cluster has a control plane reference that exposes spec.version. + When set to "Raw" or omitted, content is used verbatim. + enum: + - Raw + - Template + type: string + contentFrom: + description: contentFrom is a referenced source of content + to populate the file. + properties: + secret: + description: secret represents a secret that should + populate this file. + properties: + key: + description: key is the key in the secret's + data map for this value. + maxLength: 256 + minLength: 1 + type: string + name: + description: name of the secret in the KubeadmBootstrapConfig's + namespace to use. + maxLength: 253 + minLength: 1 + type: string + required: + - key + - name + type: object + required: + - secret + type: object + encoding: + description: encoding specifies the encoding of the + file contents. + enum: + - base64 + - gzip + - gzip+base64 + type: string + owner: + description: owner specifies the ownership of the file, + e.g. "root:root". + maxLength: 256 + minLength: 1 + type: string + path: + description: path specifies the full path on disk where + to store the file. + maxLength: 512 + minLength: 1 + type: string + permissions: + description: permissions specifies the permissions to + assign to the file, e.g. "0640". + maxLength: 16 + minLength: 1 + type: string + required: + - path + type: object + maxItems: 200 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + format: + description: |- + format specifies the output format of the bootstrap data. + Defaults to cloud-config if not set. + enum: + - cloud-config + - ignition + type: string + ignition: + description: ignition contains Ignition specific configuration. + minProperties: 1 + properties: + containerLinuxConfig: + description: containerLinuxConfig contains CLC specific + configuration. + minProperties: 1 + properties: + additionalConfig: + description: |- + additionalConfig contains additional configuration to be merged with the Ignition + configuration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging + + The data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/ + maxLength: 32768 + minLength: 1 + type: string + strict: + description: strict controls if AdditionalConfig should + be strictly parsed. If so, warnings are treated + as errors. + type: boolean + type: object + type: object + initConfiguration: + description: initConfiguration along with ClusterConfiguration + are the configurations necessary for the init command + minProperties: 1 + properties: + bootstrapTokens: + description: |- + bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature + items: + description: BootstrapToken describes one bootstrap + token, stored as a Secret in the cluster. + properties: + description: + description: |- + description sets a human-friendly message why this token exists and what it's used + for, so other administrators can know its purpose. + maxLength: 512 + minLength: 1 + type: string + expires: + description: |- + expires specifies the timestamp when this token expires. Defaults to being set + dynamically at runtime based on the ttlSeconds. Expires and ttlSeconds are mutually exclusive. + format: date-time + type: string + groups: + description: |- + groups specifies the extra groups that this token will authenticate as when/if + used for authentication + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + token: + description: |- + token is used for establishing bidirectional trust between nodes and control-planes. + Used for joining nodes in the cluster. + maxLength: 23 + minLength: 1 + type: string + ttlSeconds: + description: |- + ttlSeconds defines the time to live for this token. Defaults to 24h. + Expires and ttlSeconds are mutually exclusive. + format: int32 + minimum: 0 + type: integer + usages: + description: |- + usages describes the ways in which this token can be used. Can by default be used + for establishing bidirectional trust, but that can be changed here. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + required: + - token + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + localAPIEndpoint: + description: |- + localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint + is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This + configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible + on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process + fails you may set the desired value here. + minProperties: 1 + properties: + advertiseAddress: + description: advertiseAddress sets the IP address + for the API server to advertise. + maxLength: 39 + minLength: 1 + type: string + bindPort: + description: |- + bindPort sets the secure port for the API Server to bind to. + Defaults to 6443. + format: int32 + minimum: 1 + type: integer + type: object + nodeRegistration: + description: |- + nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + When used in the context of control plane nodes, NodeRegistration should remain consistent + across both InitConfiguration and JoinConfiguration + minProperties: 1 + properties: + criSocket: + description: criSocket is used to retrieve container + runtime info. This information will be annotated + to the Node API object, for later re-use + maxLength: 512 + minLength: 1 + type: string + ignorePreflightErrors: + description: |- + ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'. + Value 'all' ignores errors from all checks. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + imagePullPolicy: + description: |- + imagePullPolicy specifies the policy for image pulling + during kubeadm "init" and "join" operations. The value of + this field must be one of "Always", "IfNotPresent" or + "Never". Defaults to "IfNotPresent" if not set. + enum: + - Always + - IfNotPresent + - Never + type: string + imagePullSerial: + description: |- + imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. + This option takes effect only on Kubernetes >=1.31.0. + Default: true (defaulted in kubeadm) + type: boolean + kubeletExtraArgs: + description: |- + kubeletExtraArgs is a list of args to pass to kubelet. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name + and a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: kubeletExtraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + name: + description: |- + name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + This field is also used in the CommonName field of the kubelet's client certificate to the API server. + Defaults to the hostname of the node if not provided. + maxLength: 253 + minLength: 1 + type: string + taints: + description: |- + taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an + empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. + items: + description: |- + The node this Taint is attached to has the "effect" on + any pod that does not tolerate the Taint. + properties: + effect: + description: |- + Required. The effect of the taint on pods + that do not tolerate the taint. + Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied + to a node. + type: string + timeAdded: + description: TimeAdded represents the time at + which the taint was added. + format: date-time + type: string + value: + description: The taint value corresponding to + the taint key. + type: string + required: + - effect + - key + type: object + maxItems: 100 + minItems: 0 + type: array + type: object + patches: + description: |- + patches contains options related to applying patches to components deployed by kubeadm during + "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22 + minProperties: 1 + properties: + directory: + description: |- + directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". + For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of + "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one + of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. + The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". + "suffix" is an optional string that can be used to determine which patches are applied + first alpha-numerically. + These files can be written into the target directory via KubeadmConfig.Files which + specifies additional files to be created on the machine, either with content inline or + by referencing a secret. + maxLength: 512 + minLength: 1 + type: string + type: object + skipPhases: + description: |- + skipPhases is a list of phases to skip during command execution. + The list of phases can be obtained with the "kubeadm init --help" command. + This option takes effect only on Kubernetes >=1.22.0. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + timeouts: + description: timeouts holds various timeouts that apply + to kubeadm commands. + minProperties: 1 + properties: + controlPlaneComponentHealthCheckSeconds: + description: |- + controlPlaneComponentHealthCheckSeconds is the amount of time to wait for a control plane + component, such as the API server, to be healthy during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + discoverySeconds: + description: |- + discoverySeconds is the amount of time to wait for kubeadm to validate the API server identity + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + etcdAPICallSeconds: + description: |- + etcdAPICallSeconds is the amount of time to wait for the kubeadm etcd client to complete a request to + the etcd cluster. + If not set, it defaults to 2m (120s). + format: int32 + minimum: 0 + type: integer + kubeletHealthCheckSeconds: + description: |- + kubeletHealthCheckSeconds is the amount of time to wait for the kubelet to be healthy + during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + kubernetesAPICallSeconds: + description: |- + kubernetesAPICallSeconds is the amount of time to wait for the kubeadm client to complete a request to + the API server. This applies to all types of methods (GET, POST, etc). + If not set, it defaults to 1m (60s). + format: int32 + minimum: 0 + type: integer + tlsBootstrapSeconds: + description: |- + tlsBootstrapSeconds is the amount of time to wait for the kubelet to complete TLS bootstrap + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + type: object + type: object + joinConfiguration: + description: joinConfiguration is the kubeadm configuration + for the join command + minProperties: 1 + properties: + caCertPath: + description: |- + caCertPath is the path to the SSL certificate authority used to + secure communications between node and control-plane. + Defaults to "/etc/kubernetes/pki/ca.crt". + maxLength: 512 + minLength: 1 + type: string + controlPlane: + description: |- + controlPlane defines the additional control plane instance to be deployed on the joining node. + If nil, no additional control plane instance will be deployed. + properties: + localAPIEndpoint: + description: localAPIEndpoint represents the endpoint + of the API server instance to be deployed on this + node. + minProperties: 1 + properties: + advertiseAddress: + description: advertiseAddress sets the IP address + for the API server to advertise. + maxLength: 39 + minLength: 1 + type: string + bindPort: + description: |- + bindPort sets the secure port for the API Server to bind to. + Defaults to 6443. + format: int32 + minimum: 1 + type: integer + type: object + type: object + discovery: + description: discovery specifies the options for the kubelet + to use during the TLS Bootstrap process + minProperties: 1 + properties: + bootstrapToken: + description: |- + bootstrapToken is used to set the options for bootstrap token based discovery + BootstrapToken and File are mutually exclusive + minProperties: 1 + properties: + apiServerEndpoint: + description: apiServerEndpoint is an IP or domain + name to the API server from which info will + be fetched. + maxLength: 512 + minLength: 1 + type: string + caCertHashes: + description: |- + caCertHashes specifies a set of public key pins to verify + when token-based discovery is used. The root CA found during discovery + must match one of these values. Specifying an empty set disables root CA + pinning, which can be unsafe. Each hash is specified as ":", + where the only currently supported type is "sha256". This is a hex-encoded + SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded + ASN.1. These hashes can be calculated using, for example, OpenSSL: + openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + token: + description: |- + token is a token used to validate cluster information + fetched from the control-plane. + maxLength: 512 + minLength: 1 + type: string + unsafeSkipCAVerification: + description: |- + unsafeSkipCAVerification allows token-based discovery + without CA verification via CACertHashes. This can weaken + the security of kubeadm since other nodes can impersonate the control-plane. + type: boolean + type: object + file: + description: |- + file is used to specify a file or URL to a kubeconfig file from which to load cluster information + BootstrapToken and File are mutually exclusive + properties: + kubeConfig: + description: |- + kubeConfig is used (optionally) to generate a KubeConfig based on the KubeadmConfig's information. + The file is generated at the path specified in KubeConfigPath. + + Host address (server field) information is automatically populated based on the Cluster's ControlPlaneEndpoint. + Certificate Authority (certificate-authority-data field) is gathered from the cluster's CA secret. + properties: + cluster: + description: |- + cluster contains information about how to communicate with the kubernetes cluster. + + By default the following fields are automatically populated: + - Server with the Cluster's ControlPlaneEndpoint. + - CertificateAuthorityData with the Cluster's CA certificate. + minProperties: 1 + properties: + certificateAuthorityData: + description: |- + certificateAuthorityData contains PEM-encoded certificate authority certificates. + + Defaults to the Cluster's CA certificate if empty. + format: byte + maxLength: 51200 + minLength: 1 + type: string + insecureSkipTLSVerify: + description: insecureSkipTLSVerify skips + the validity check for the server's + certificate. This will make your HTTPS + connections insecure. + type: boolean + proxyURL: + description: |- + proxyURL is the URL to the proxy to be used for all requests made by this + client. URLs with "http", "https", and "socks5" schemes are supported. If + this configuration is not provided or the empty string, the client + attempts to construct a proxy configuration from http_proxy and + https_proxy environment variables. If these environment variables are not + set, the client does not attempt to proxy requests. + + socks5 proxying does not currently support spdy streaming endpoints (exec, + attach, port forward). + maxLength: 512 + minLength: 1 + type: string + server: + description: |- + server is the address of the kubernetes cluster (https://hostname:port). + + Defaults to https:// + Cluster.Spec.ControlPlaneEndpoint. + maxLength: 512 + minLength: 1 + type: string + tlsServerName: + description: tlsServerName is used to + check server certificate. If TLSServerName + is empty, the hostname used to contact + the server is used. + maxLength: 512 + minLength: 1 + type: string + type: object + user: + description: |- + user contains information that describes identity information. + This is used to tell the kubernetes cluster who you are. + minProperties: 1 + properties: + authProvider: + description: authProvider specifies a + custom authentication plugin for the + kubernetes cluster. + properties: + config: + additionalProperties: + type: string + description: config holds the parameters + for the authentication plugin. + type: object + name: + description: name is the name of the + authentication plugin. + maxLength: 256 + minLength: 1 + type: string + required: + - name + type: object + exec: + description: exec specifies a custom exec-based + authentication plugin for the kubernetes + cluster. + properties: + apiVersion: + description: |- + apiVersion is preferred input version of the ExecInfo. The returned ExecCredentials MUST use + the same encoding version as the input. + Defaults to client.authentication.k8s.io/v1 if not set. + maxLength: 512 + minLength: 1 + type: string + args: + description: args is the arguments + to pass to the command when executing + it. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + command: + description: command to execute. + maxLength: 1024 + minLength: 1 + type: string + env: + description: |- + env defines additional environment variables to expose to the process. These + are unioned with the host's environment, as well as variables client-go uses + to pass argument to the plugin. + items: + description: |- + KubeConfigAuthExecEnv is used for setting environment variables when executing an exec-based + credential plugin. + properties: + name: + description: name of the environment + variable + maxLength: 512 + minLength: 1 + type: string + value: + description: value of the environment + variable + maxLength: 512 + minLength: 1 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + provideClusterInfo: + description: |- + provideClusterInfo determines whether or not to provide cluster information, + which could potentially contain very large CA data, to this exec plugin as a + part of the KUBERNETES_EXEC_INFO environment variable. By default, it is set + to false. Package k8s.io/client-go/tools/auth/exec provides helper methods for + reading this environment variable. + type: boolean + required: + - command + type: object + type: object + required: + - user + type: object + kubeConfigPath: + description: kubeConfigPath is used to specify + the actual file path or URL to the kubeconfig + file from which to load cluster information + maxLength: 512 + minLength: 1 + type: string + required: + - kubeConfigPath + type: object + tlsBootstrapToken: + description: |- + tlsBootstrapToken is a token used for TLS bootstrapping. + If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. + If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information + maxLength: 512 + minLength: 1 + type: string + type: object + nodeRegistration: + description: |- + nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + When used in the context of control plane nodes, NodeRegistration should remain consistent + across both InitConfiguration and JoinConfiguration + minProperties: 1 + properties: + criSocket: + description: criSocket is used to retrieve container + runtime info. This information will be annotated + to the Node API object, for later re-use + maxLength: 512 + minLength: 1 + type: string + ignorePreflightErrors: + description: |- + ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'. + Value 'all' ignores errors from all checks. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + imagePullPolicy: + description: |- + imagePullPolicy specifies the policy for image pulling + during kubeadm "init" and "join" operations. The value of + this field must be one of "Always", "IfNotPresent" or + "Never". Defaults to "IfNotPresent" if not set. + enum: + - Always + - IfNotPresent + - Never + type: string + imagePullSerial: + description: |- + imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. + This option takes effect only on Kubernetes >=1.31.0. + Default: true (defaulted in kubeadm) + type: boolean + kubeletExtraArgs: + description: |- + kubeletExtraArgs is a list of args to pass to kubelet. + The arg name must match the command line flag name except without leading dash(es). + Extra arguments will override existing default arguments set by kubeadm. + items: + description: Arg represents an argument with a name + and a value. + properties: + name: + description: name is the Name of the extraArg. + maxLength: 256 + minLength: 1 + type: string + value: + description: value is the Value of the extraArg. + maxLength: 1024 + minLength: 0 + type: string + required: + - name + - value + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + - value + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: kubeletExtraArgs name must be unique + rule: self.all(x, self.exists_one(y, x.name == y.name)) + name: + description: |- + name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + This field is also used in the CommonName field of the kubelet's client certificate to the API server. + Defaults to the hostname of the node if not provided. + maxLength: 253 + minLength: 1 + type: string + taints: + description: |- + taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an + empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. + items: + description: |- + The node this Taint is attached to has the "effect" on + any pod that does not tolerate the Taint. + properties: + effect: + description: |- + Required. The effect of the taint on pods + that do not tolerate the taint. + Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied + to a node. + type: string + timeAdded: + description: TimeAdded represents the time at + which the taint was added. + format: date-time + type: string + value: + description: The taint value corresponding to + the taint key. + type: string + required: + - effect + - key + type: object + maxItems: 100 + minItems: 0 + type: array + type: object + patches: + description: |- + patches contains options related to applying patches to components deployed by kubeadm during + "kubeadm join". The minimum kubernetes version needed to support Patches is v1.22 + minProperties: 1 + properties: + directory: + description: |- + directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". + For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of + "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one + of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. + The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". + "suffix" is an optional string that can be used to determine which patches are applied + first alpha-numerically. + These files can be written into the target directory via KubeadmConfig.Files which + specifies additional files to be created on the machine, either with content inline or + by referencing a secret. + maxLength: 512 + minLength: 1 + type: string + type: object + skipPhases: + description: |- + skipPhases is a list of phases to skip during command execution. + The list of phases can be obtained with the "kubeadm init --help" command. + This option takes effect only on Kubernetes >=1.22.0. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + timeouts: + description: timeouts holds various timeouts that apply + to kubeadm commands. + minProperties: 1 + properties: + controlPlaneComponentHealthCheckSeconds: + description: |- + controlPlaneComponentHealthCheckSeconds is the amount of time to wait for a control plane + component, such as the API server, to be healthy during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + discoverySeconds: + description: |- + discoverySeconds is the amount of time to wait for kubeadm to validate the API server identity + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + etcdAPICallSeconds: + description: |- + etcdAPICallSeconds is the amount of time to wait for the kubeadm etcd client to complete a request to + the etcd cluster. + If not set, it defaults to 2m (120s). + format: int32 + minimum: 0 + type: integer + kubeletHealthCheckSeconds: + description: |- + kubeletHealthCheckSeconds is the amount of time to wait for the kubelet to be healthy + during "kubeadm init" and "kubeadm join". + If not set, it defaults to 4m (240s). + format: int32 + minimum: 0 + type: integer + kubernetesAPICallSeconds: + description: |- + kubernetesAPICallSeconds is the amount of time to wait for the kubeadm client to complete a request to + the API server. This applies to all types of methods (GET, POST, etc). + If not set, it defaults to 1m (60s). + format: int32 + minimum: 0 + type: integer + tlsBootstrapSeconds: + description: |- + tlsBootstrapSeconds is the amount of time to wait for the kubelet to complete TLS bootstrap + for a joining node. + If not set, it defaults to 5m (300s). + format: int32 + minimum: 0 + type: integer + type: object + type: object + mounts: + description: mounts specifies a list of mount points to be + setup. + items: + description: MountPoints defines input for generated mounts + in cloud-init. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + ntp: + description: ntp specifies NTP configuration + minProperties: 1 + properties: + enabled: + description: enabled specifies whether NTP should be enabled + type: boolean + servers: + description: servers specifies which NTP servers to use + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + type: object + postKubeadmCommands: + description: |- + postKubeadmCommands specifies extra commands to run after kubeadm runs. + With cloud-init, this is appended to the runcmd module configuration, and is typically executed in + the cloud-final.service systemd unit. In Ignition, this is appended to /etc/kubeadm.sh. + items: + maxLength: 10240 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + preKubeadmCommands: + description: |- + preKubeadmCommands specifies extra commands to run before kubeadm runs. + With cloud-init, this is prepended to the runcmd module configuration, and is typically executed in + the cloud-final.service systemd unit. In Ignition, this is prepended to /etc/kubeadm.sh. + items: + maxLength: 10240 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + users: + description: users specifies extra users to add + items: + description: User defines the input for a generated user + in cloud-init. + properties: + gecos: + description: gecos specifies the gecos to use for the + user + maxLength: 256 + minLength: 1 + type: string + groups: + description: groups specifies the additional groups + for the user + maxLength: 256 + minLength: 1 + type: string + homeDir: + description: homeDir specifies the home directory to + use for the user + maxLength: 256 + minLength: 1 + type: string + inactive: + description: inactive specifies whether to mark the + user as inactive + type: boolean + lockPassword: + description: lockPassword specifies if password login + should be disabled + type: boolean + name: + description: name specifies the user name + maxLength: 256 + minLength: 1 + type: string + passwd: + description: passwd specifies a hashed password for + the user + maxLength: 256 + minLength: 1 + type: string + passwdFrom: + description: passwdFrom is a referenced source of passwd + to populate the passwd. + properties: + secret: + description: secret represents a secret that should + populate this password. + properties: + key: + description: key is the key in the secret's + data map for this value. + maxLength: 256 + minLength: 1 + type: string + name: + description: name of the secret in the KubeadmBootstrapConfig's + namespace to use. + maxLength: 253 + minLength: 1 + type: string + required: + - key + - name + type: object + required: + - secret + type: object + primaryGroup: + description: primaryGroup specifies the primary group + for the user + maxLength: 256 + minLength: 1 + type: string + shell: + description: shell specifies the user's shell + maxLength: 256 + minLength: 1 + type: string + sshAuthorizedKeys: + description: sshAuthorizedKeys specifies a list of ssh + authorized keys for the user + items: + maxLength: 2048 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + sudo: + description: sudo specifies a sudo role for the user + maxLength: 256 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + verbosity: + description: |- + verbosity is the number for the kubeadm log level verbosity. + It overrides the `--v` flag in kubeadm commands. + format: int32 + type: integer + type: object + type: object + required: + - template + type: object + type: object + served: true storage: true subresources: {} --- @@ -8178,6 +9826,14 @@ rules: - get - list - watch +- apiGroups: + - controlplane.cluster.x-k8s.io + resources: + - kubeadmcontrolplanes + verbs: + - get + - list + - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -8249,7 +9905,7 @@ spec: - --leader-elect - --diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443} - --insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false} - - --feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false},PriorityQueue=${EXP_PRIORITY_QUEUE:=false} + - --feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false},PriorityQueue=${EXP_PRIORITY_QUEUE:=true},ReconcilerRateLimiting=${EXP_RECONCILER_RATE_LIMITING:=true} - --bootstrap-token-ttl=${KUBEADM_BOOTSTRAP_TOKEN_TTL:=15m} command: - /manager @@ -8266,7 +9922,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.uid - image: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.10.1 + image: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.14.4 imagePullPolicy: IfNotPresent livenessProbe: httpGet: @@ -8356,40 +10012,18 @@ metadata: webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-kubeadm-bootstrap-webhook-service namespace: capi-kubeadm-bootstrap-system - path: /mutate-bootstrap-cluster-x-k8s-io-v1beta1-kubeadmconfig - failurePolicy: Fail - name: default.kubeadmconfig.bootstrap.cluster.x-k8s.io - rules: - - apiGroups: - - bootstrap.cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - kubeadmconfigs - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-kubeadm-bootstrap-webhook-service - namespace: capi-kubeadm-bootstrap-system - path: /mutate-bootstrap-cluster-x-k8s-io-v1beta1-kubeadmconfigtemplate + path: /mutate-bootstrap-cluster-x-k8s-io-v1beta2-kubeadmconfigtemplate failurePolicy: Fail name: default.kubeadmconfigtemplate.bootstrap.cluster.x-k8s.io rules: - apiGroups: - bootstrap.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -8408,12 +10042,11 @@ metadata: webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-kubeadm-bootstrap-webhook-service namespace: capi-kubeadm-bootstrap-system - path: /validate-bootstrap-cluster-x-k8s-io-v1beta1-kubeadmconfig + path: /validate-bootstrap-cluster-x-k8s-io-v1beta2-kubeadmconfig failurePolicy: Fail matchPolicy: Equivalent name: validation.kubeadmconfig.bootstrap.cluster.x-k8s.io @@ -8421,7 +10054,7 @@ webhooks: - apiGroups: - bootstrap.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -8430,12 +10063,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-kubeadm-bootstrap-webhook-service namespace: capi-kubeadm-bootstrap-system - path: /validate-bootstrap-cluster-x-k8s-io-v1beta1-kubeadmconfigtemplate + path: /validate-bootstrap-cluster-x-k8s-io-v1beta2-kubeadmconfigtemplate failurePolicy: Fail matchPolicy: Equivalent name: validation.kubeadmconfigtemplate.bootstrap.cluster.x-k8s.io @@ -8443,7 +10075,7 @@ webhooks: - apiGroups: - bootstrap.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE diff --git a/packages/system/capi-providers-bootstrap/files/components-talos.gz b/packages/system/capi-providers-bootstrap/files/components-talos.gz index 99e4608a7..3943c9206 100644 Binary files a/packages/system/capi-providers-bootstrap/files/components-talos.gz and b/packages/system/capi-providers-bootstrap/files/components-talos.gz differ diff --git a/packages/system/capi-providers-bootstrap/files/components.gz b/packages/system/capi-providers-bootstrap/files/components.gz index 6a2f1d7a7..5ee73b445 100644 Binary files a/packages/system/capi-providers-bootstrap/files/components.gz and b/packages/system/capi-providers-bootstrap/files/components.gz differ diff --git a/packages/system/capi-providers-bootstrap/files/metadata.yaml b/packages/system/capi-providers-bootstrap/files/metadata.yaml index 5d25cb466..523591366 100644 --- a/packages/system/capi-providers-bootstrap/files/metadata.yaml +++ b/packages/system/capi-providers-bootstrap/files/metadata.yaml @@ -6,6 +6,18 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 14 + contract: v1beta2 + - major: 1 + minor: 13 + contract: v1beta2 + - major: 1 + minor: 12 + contract: v1beta2 + - major: 1 + minor: 11 + contract: v1beta2 - major: 1 minor: 10 contract: v1beta1 diff --git a/packages/system/capi-providers-bootstrap/templates/_helpers.tpl b/packages/system/capi-providers-bootstrap/templates/_helpers.tpl new file mode 100644 index 000000000..36e9565ad --- /dev/null +++ b/packages/system/capi-providers-bootstrap/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{- define "capi-providers-bootstrap.assertUpgradeWindow" -}} +{{- if .Capabilities.APIVersions.Has "operator.cluster.x-k8s.io/v1alpha2" -}} +{{- $provider := lookup "operator.cluster.x-k8s.io/v1alpha2" "BootstrapProvider" .Release.Namespace "kubeadm" -}} +{{- $installed := dig "status" "installedVersion" "" ($provider | default dict) -}} +{{- if and (kindIs "string" $installed) (ne $installed "") -}} +{{- $current := semver $installed -}} +{{- $target := semver .Chart.AppVersion -}} +{{- if or (gt $current.Major $target.Major) (and (eq $current.Major $target.Major) (gt $current.Minor $target.Minor)) (and (eq $current.Major $target.Major) (eq $current.Minor $target.Minor) (gt $current.Patch $target.Patch)) -}} +{{- fail "Cluster API provider downgrades are not supported" -}} +{{- end -}} +{{- if or (ne $current.Major $target.Major) (gt (sub $target.Minor $current.Minor) 3) -}} +{{- fail "kubeadm provider cannot skip more than three minor versions; upgrade the core provider package first to run the intermediate migration" -}} +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/packages/system/capi-providers-bootstrap/templates/configmaps.yaml b/packages/system/capi-providers-bootstrap/templates/configmaps.yaml index a3e2cd81f..2c505ed94 100644 --- a/packages/system/capi-providers-bootstrap/templates/configmaps.yaml +++ b/packages/system/capi-providers-bootstrap/templates/configmaps.yaml @@ -1,8 +1,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: v1.10.1-bootstrap + name: {{ .Chart.AppVersion }}-bootstrap labels: + provider.cluster.x-k8s.io/version: {{ .Chart.AppVersion }}-bootstrap bootstrap-components: cozy bootstrap-provider: kubeadm annotations: @@ -15,7 +16,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: v0.6.12-bootstrap-talos + name: v0.6.13-bootstrap-talos labels: bootstrap-components: cozy bootstrap-provider: talos diff --git a/packages/system/capi-providers-bootstrap/templates/providers.yaml b/packages/system/capi-providers-bootstrap/templates/providers.yaml index 3574f0f05..20de4b179 100644 --- a/packages/system/capi-providers-bootstrap/templates/providers.yaml +++ b/packages/system/capi-providers-bootstrap/templates/providers.yaml @@ -1,13 +1,15 @@ +{{- include "capi-providers-bootstrap.assertUpgradeWindow" . }} apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm spec: # https://github.com/kubernetes-sigs/cluster-api - version: v1.10.1-bootstrap + version: {{ .Chart.AppVersion }}-bootstrap fetchConfig: selector: matchLabels: + provider.cluster.x-k8s.io/version: {{ .Chart.AppVersion }}-bootstrap bootstrap-components: cozy bootstrap-provider: kubeadm deployment: @@ -27,7 +29,7 @@ metadata: name: talos spec: # https://github.com/siderolabs/cluster-api-bootstrap-provider-talos - version: v0.6.12-bootstrap-talos + version: v0.6.13-bootstrap-talos fetchConfig: selector: matchLabels: diff --git a/packages/system/capi-providers-bootstrap/tests/upgrade_guard_test.yaml b/packages/system/capi-providers-bootstrap/tests/upgrade_guard_test.yaml new file mode 100644 index 000000000..cccc667d9 --- /dev/null +++ b/packages/system/capi-providers-bootstrap/tests/upgrade_guard_test.yaml @@ -0,0 +1,144 @@ +suite: kubeadm provider upgrade window +templates: + - templates/providers.yaml +release: + name: capi-providers-bootstrap + namespace: test-capi +capabilities: + majorVersion: 1 + minorVersion: 33 + apiVersions: + - operator.cluster.x-k8s.io/v1alpha2 +tests: + - it: allows a fresh installation + kubernetesProvider: + scheme: &scheme + operator.cluster.x-k8s.io/v1alpha2/BootstrapProvider: + gvr: + group: operator.cluster.x-k8s.io + version: v1alpha2 + resource: bootstrapproviders + namespaced: true + objects: + - &other + apiVersion: operator.cluster.x-k8s.io/v1alpha2 + kind: BootstrapProvider + metadata: + name: other + namespace: other + documentSelector: + path: metadata.name + value: kubeadm + asserts: + - isKind: + of: BootstrapProvider + + - it: rejects the legacy installed version before the core migration + kubernetesProvider: + scheme: *scheme + objects: + - &legacy + apiVersion: operator.cluster.x-k8s.io/v1alpha2 + kind: BootstrapProvider + metadata: + name: kubeadm + namespace: test-capi + spec: + version: v1.10.1-bootstrap + status: + installedVersion: v1.10.1-bootstrap + asserts: + - failedTemplate: + errorPattern: "upgrade the core provider package first" + + - it: does not confuse a requested bridge version with an installed one + kubernetesProvider: + scheme: *scheme + objects: + - <<: *legacy + spec: + version: v1.13.8-bootstrap + asserts: + - failedTemplate: + errorPattern: "upgrade the core provider package first" + + - it: accepts the installed intermediate release + kubernetesProvider: + scheme: *scheme + objects: + - <<: *legacy + spec: + version: v1.13.8-bootstrap + status: + installedVersion: v1.13.8-bootstrap + documentSelector: + path: metadata.name + value: kubeadm + asserts: + - isKind: + of: BootstrapProvider + + - it: accepts the oldest supported minor despite the provider suffix + kubernetesProvider: + scheme: *scheme + objects: + - <<: *legacy + spec: + version: v1.11.0-bootstrap + status: + installedVersion: v1.11.0-bootstrap + documentSelector: + path: metadata.name + value: kubeadm + asserts: + - isKind: + of: BootstrapProvider + + - it: treats a provider that never finished installing as a fresh installation + kubernetesProvider: + scheme: *scheme + objects: + - <<: *legacy + status: {} + documentSelector: + path: metadata.name + value: kubeadm + asserts: + - isKind: + of: BootstrapProvider + + - it: refuses a downgrade + kubernetesProvider: + scheme: *scheme + objects: + - <<: *legacy + spec: + version: v1.15.0-bootstrap + status: + installedVersion: v1.15.0-bootstrap + asserts: + - failedTemplate: + errorPattern: "downgrades are not supported" + + - it: refuses a patch downgrade + kubernetesProvider: + scheme: *scheme + objects: + - <<: *legacy + spec: + version: v1.14.5-bootstrap + status: + installedVersion: v1.14.5-bootstrap + asserts: + - failedTemplate: + errorPattern: "downgrades are not supported" + + - it: renders offline when the provider API is not served + capabilities: + apiVersions: [] + documentSelector: + path: metadata.name + value: kubeadm + asserts: + - isKind: + of: BootstrapProvider diff --git a/packages/system/capi-providers-core/.helmignore b/packages/system/capi-providers-core/.helmignore index aba9a295f..3a1c68e3c 100644 --- a/packages/system/capi-providers-core/.helmignore +++ b/packages/system/capi-providers-core/.helmignore @@ -1 +1,2 @@ files/*-components.yaml +patches/ diff --git a/packages/system/capi-providers-core/Chart.yaml b/packages/system/capi-providers-core/Chart.yaml index 850f1dee9..13a1cd07d 100644 --- a/packages/system/capi-providers-core/Chart.yaml +++ b/packages/system/capi-providers-core/Chart.yaml @@ -1,3 +1,5 @@ apiVersion: v2 name: cozy-capi-providers-core +appVersion: "v1.14.4" +kubeVersion: ">=1.33.0-0" version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/capi-providers-core/Makefile b/packages/system/capi-providers-core/Makefile index f5f038c1b..9b47caedf 100644 --- a/packages/system/capi-providers-core/Makefile +++ b/packages/system/capi-providers-core/Makefile @@ -1,4 +1,33 @@ export NAME=capi-providers-core export NAMESPACE=cozy-cluster-api +CAPI_VERSION=v1.14.4 +CAPI_URL=https://github.com/kubernetes-sigs/cluster-api/releases/download/$(CAPI_VERSION) +# SHA-256 of the two release assets at CAPI_VERSION, as downloaded. A release tag +# can be moved; these cannot. Bumping the version means recording the new sums +# here. files/core-components.yaml carries patches/ on top, so its own sum differs. +CAPI_SHA256_COMPONENTS=0030264eb0a0d90ebacc9da8f6bbb717bee32e45ffadc4a74784fb5ad7b9bb0b +CAPI_SHA256_METADATA=c470906f551ac3e3e9aedc9a3e733b5a5994428693df43e95f65ea67c035f9fe + include ../../../hack/package.mk + +# Keep Chart.yaml appVersion equal to CAPI_VERSION: it selects the provider +# version and ConfigMap that the operator installs. +# patches/ is applied on top of the verified download. See the note in +# capi-providers-infraprovider-proxmox/Makefile on gzip -n. +.PHONY: components +components: + @command -v patch >/dev/null || { echo "patch(1) required"; exit 1; } + rm -rf .components-tmp + mkdir .components-tmp + curl -fL -o .components-tmp/core-components.yaml $(CAPI_URL)/core-components.yaml + curl -fL -o .components-tmp/metadata.yaml $(CAPI_URL)/metadata.yaml + printf '%s .components-tmp/core-components.yaml\n%s .components-tmp/metadata.yaml\n' $(CAPI_SHA256_COMPONENTS) $(CAPI_SHA256_METADATA) | sha256sum -c - + for p in patches/*.diff; do \ + [ -e "$$p" ] || continue; \ + (cd .components-tmp && patch core-components.yaml < ../$$p) || exit 1; \ + done + mv .components-tmp/core-components.yaml files/core-components.yaml + mv .components-tmp/metadata.yaml files/metadata.yaml + gzip -9 -n -c files/core-components.yaml > files/components.gz + rm -rf .components-tmp diff --git a/packages/system/capi-providers-core/charts/cozy-lib b/packages/system/capi-providers-core/charts/cozy-lib new file mode 120000 index 000000000..e18135098 --- /dev/null +++ b/packages/system/capi-providers-core/charts/cozy-lib @@ -0,0 +1 @@ +../../../library/cozy-lib \ No newline at end of file diff --git a/packages/system/capi-providers-core/files/bridge-version b/packages/system/capi-providers-core/files/bridge-version new file mode 100644 index 000000000..686fb286e --- /dev/null +++ b/packages/system/capi-providers-core/files/bridge-version @@ -0,0 +1 @@ +v1.13.8 diff --git a/packages/system/capi-providers-core/files/components.gz b/packages/system/capi-providers-core/files/components.gz index bf045689a..b584aef64 100644 Binary files a/packages/system/capi-providers-core/files/components.gz and b/packages/system/capi-providers-core/files/components.gz differ diff --git a/packages/system/capi-providers-core/files/core-components.yaml b/packages/system/capi-providers-core/files/core-components.yaml index e82893bc4..9c20aa928 100644 --- a/packages/system/capi-providers-core/files/core-components.yaml +++ b/packages/system/capi-providers-core/files/core-components.yaml @@ -11,7 +11,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: clusterclasses.cluster.x-k8s.io @@ -26,7 +26,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -45,402 +44,6 @@ spec: name: Age type: date deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - ClusterClass is a template which can be used to create managed topologies. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of ClusterClass. - properties: - controlPlane: - description: |- - controlPlane is a reference to a local struct that holds the details - for provisioning the Control Plane for the Cluster. - properties: - machineInfrastructure: - description: |- - machineInfrastructure defines the metadata and infrastructure information - for control plane machines. - - This field is supported if and only if the control plane provider template - referenced above is Machine based and supports setting replicas. - properties: - ref: - description: |- - ref is a required reference to a custom resource - offered by a provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - ref - type: object - metadata: - description: |- - metadata is the metadata applied to the machines of the ControlPlane. - At runtime this metadata is merged with the corresponding metadata from the topology. - - This field is supported if and only if the control plane provider template - referenced is Machine based. - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - type: object - ref: - description: |- - ref is a required reference to a custom resource - offered by a provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - ref - type: object - infrastructure: - description: |- - infrastructure is a reference to a provider-specific template that holds - the details for provisioning infrastructure specific cluster - for the underlying provider. - The underlying provider is responsible for the implementation - of the template to an infrastructure cluster. - properties: - ref: - description: |- - ref is a required reference to a custom resource - offered by a provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - ref - type: object - workers: - description: |- - workers describes the worker nodes for the cluster. - It is a collection of node types which can be used to create - the worker nodes of the cluster. - properties: - machineDeployments: - description: |- - machineDeployments is a list of machine deployment classes that can be used to create - a set of worker nodes. - items: - description: |- - MachineDeploymentClass serves as a template to define a set of worker nodes of the cluster - provisioned using the `ClusterClass`. - properties: - class: - description: |- - class denotes a type of worker node present in the cluster, - this name MUST be unique within a ClusterClass and can be referenced - in the Cluster to create a managed MachineDeployment. - type: string - template: - description: |- - template is a local struct containing a collection of templates for creation of - MachineDeployment objects representing a set of worker nodes. - properties: - bootstrap: - description: |- - bootstrap contains the bootstrap template reference to be used - for the creation of worker Machines. - properties: - ref: - description: |- - ref is a required reference to a custom resource - offered by a provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - ref - type: object - infrastructure: - description: |- - infrastructure contains the infrastructure template reference to be used - for the creation of worker Machines. - properties: - ref: - description: |- - ref is a required reference to a custom resource - offered by a provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - required: - - ref - type: object - metadata: - description: |- - metadata is the metadata applied to the machines of the MachineDeployment. - At runtime this metadata is merged with the corresponding metadata from the topology. - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - type: object - required: - - bootstrap - - infrastructure - type: object - required: - - class - - template - type: object - type: array - type: object - type: object - type: object - served: false - storage: false - subresources: {} - - additionalPrinterColumns: - - description: Time duration since creation of ClusterClass - jsonPath: .metadata.creationTimestamp - name: Age - type: date name: v1beta1 schema: openAPIV3Schema: @@ -624,6 +227,51 @@ spec: type: object maxItems: 100 type: array + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeout: + description: |- + timeout is the duration that a Machine must be in a given status for, + after which the Machine is considered unhealthy. + For example, with a value of "1h", the Machine must match the status + for at least 1 hour before being considered unhealthy. + type: string + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, + HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeout + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyRange: description: |- unhealthyRange specifies the range of unhealthy machines allowed. @@ -848,6 +496,69 @@ spec: type: string type: object x-kubernetes-map-type: atomic + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to corev1.Taint, + but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid values + are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map required: - ref type: object @@ -924,6 +635,20 @@ spec: minLength: 1 type: string type: object + kubernetesVersions: + description: |- + kubernetesVersions is the list of Kubernetes versions that can be + used for clusters using this ClusterClass. + The list of version must be ordered from the older to the newer version, and there should be + at least one version for every minor in between the first and the last version. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic patches: description: |- patches defines the patches which are applied to customize @@ -1135,6 +860,24 @@ spec: type: object maxItems: 1000 type: array + upgrade: + description: upgrade defines the upgrade configuration for clusters + using this ClusterClass. + minProperties: 1 + properties: + external: + description: external defines external runtime extensions for + upgrade operations. + minProperties: 1 + properties: + generateUpgradePlanExtension: + description: generateUpgradePlanExtension references an extension + which is called to generate upgrade plan. + maxLength: 512 + minLength: 1 + type: string + type: object + type: object variables: description: |- variables defines the variables which can be configured @@ -1689,6 +1432,51 @@ spec: type: object maxItems: 100 type: array + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeout: + description: |- + timeout is the duration that a Machine must be in a given status for, + after which the Machine is considered unhealthy. + For example, with a value of "1h", the Machine must match the status + for at least 1 hour before being considered unhealthy. + type: string + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, + HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeout + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyRange: description: |- unhealthyRange specifies the range of unhealthy machines allowed. @@ -1831,7 +1619,7 @@ spec: deletePolicy: description: |- deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. - Valid values are "Random, "Newest", "Oldest" + Valid values are "Random", "Newest", "Oldest" When no value is supplied, the default DeletePolicy of MachineSet is used enum: - Random @@ -1885,6 +1673,70 @@ spec: - OnDelete type: string type: object + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map template: description: |- template is a local struct containing a collection of templates for creation of @@ -2108,6 +1960,70 @@ spec: to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. type: string + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map template: description: |- template is a local struct containing a collection of templates for creation of @@ -2833,6 +2749,2792 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: Variables ready + jsonPath: .status.conditions[?(@.type=="VariablesReady")].status + name: Variables Ready + type: string + - description: Time duration since creation of ClusterClass + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: |- + ClusterClass is a template which can be used to create managed topologies. + NOTE: This CRD can only be used if the ClusterTopology feature gate is enabled. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of ClusterClass. + properties: + availabilityGates: + description: |- + availabilityGates specifies additional conditions to include when evaluating Cluster Available condition. + + NOTE: If a Cluster is using this ClusterClass, and this Cluster defines a custom list of availabilityGates, + such list overrides availabilityGates defined in this field. + items: + description: ClusterAvailabilityGate contains the type of a Cluster + condition to be used as availability gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Cluster's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as availability gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this availabilityGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + controlPlane: + description: |- + controlPlane is a reference to a local struct that holds the details + for provisioning the Control Plane for the Cluster. + properties: + deletion: + description: deletion contains configuration options for Machine + deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + NOTE: This value can be overridden while defining a Cluster.Topology. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + NOTE: This value can be overridden while defining a Cluster.Topology. + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + NOTE: This value can be overridden while defining a Cluster.Topology. + format: int32 + minimum: 0 + type: integer + type: object + healthCheck: + description: |- + healthCheck defines a MachineHealthCheck for this ControlPlaneClass. + This field is supported if and only if the ControlPlane provider template + referenced above is Machine based and supports setting replicas. + minProperties: 1 + properties: + checks: + description: |- + checks are the checks that are used to evaluate if a Machine is healthy. + + Independent of this configuration the MachineHealthCheck controller will always + flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and + Machines with deleted Nodes as unhealthy. + + Furthermore, if checks.nodeStartupTimeoutSeconds is not set it + is defaulted to 10 minutes and evaluated accordingly. + minProperties: 1 + properties: + nodeStartupTimeoutSeconds: + description: |- + nodeStartupTimeoutSeconds allows to set the maximum time for MachineHealthCheck + to consider a Machine unhealthy if a corresponding Node isn't associated + through a `Spec.ProviderID` field. + + The duration set in this field is compared to the greatest of: + - Cluster's infrastructure ready condition timestamp (if and when available) + - Control Plane's initialized condition timestamp (if and when available) + - Machine's infrastructure ready condition timestamp (if and when available) + - Machine's metadata creation timestamp + + Defaults to 10 minutes. + If you wish to disable this feature, set the value explicitly to 0. + format: int32 + minimum: 0 + type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, + HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + unhealthyNodeConditions: + description: |- + unhealthyNodeConditions contains a list of conditions that determine + whether a node is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the node is unhealthy. + items: + description: |- + UnhealthyNodeCondition represents a Node condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a node is considered unhealthy. + properties: + status: + description: status of the condition, one of True, + False, Unknown. + minLength: 1 + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a node must be in a given status for, + after which the node is considered unhealthy. + For example, with a value of "3600", the node must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Node condition + minLength: 1 + type: string + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + remediation: + description: |- + remediation configures if and how remediations are triggered if a Machine is unhealthy. + + If remediation or remediation.triggerIf is not set, + remediation will always be triggered for unhealthy Machines. + + If remediation or remediation.templateRef is not set, + the OwnerRemediated condition will be set on unhealthy Machines to trigger remediation via + the owner of the Machines, for example a MachineSet or a KubeadmControlPlane. + minProperties: 1 + properties: + templateRef: + description: |- + templateRef is a reference to a remediation template + provided by an infrastructure provider. + + This field is completely optional, when filled, the MachineHealthCheck controller + creates a new object from the template referenced and hands off remediation of the machine to + a controller that lives outside of Cluster API. + properties: + apiVersion: + description: |- + apiVersion of the remediation template. + apiVersion must be fully qualified domain name followed by / and a version. + NOTE: This field must be kept in sync with the APIVersion of the remediation template. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the remediation template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the remediation template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + triggerIf: + description: |- + triggerIf configures if remediations are triggered. + If this field is not set, remediations are always triggered. + minProperties: 1 + properties: + unhealthyInRange: + description: |- + unhealthyInRange specifies that remediations are only triggered if the number of + unhealthy Machines is in the configured range. + Takes precedence over unhealthyLessThanOrEqualTo. + Eg. "[3-5]" - This means that remediation will be allowed only when: + (a) there are at least 3 unhealthy Machines (and) + (b) there are at most 5 unhealthy Machines + maxLength: 32 + minLength: 1 + pattern: ^\[[0-9]+-[0-9]+\]$ + type: string + unhealthyLessThanOrEqualTo: + anyOf: + - type: integer + - type: string + description: |- + unhealthyLessThanOrEqualTo specifies that remediations are only triggered if the number of + unhealthy Machines is less than or equal to the configured value. + unhealthyInRange takes precedence if set. + x-kubernetes-int-or-string: true + type: object + type: object + type: object + machineInfrastructure: + description: |- + machineInfrastructure defines the metadata and infrastructure information + for control plane machines. + + This field is supported if and only if the control plane provider template + referenced above is Machine based and supports setting replicas. + properties: + templateRef: + description: templateRef is a required reference to the template + for a MachineInfrastructure of a ControlPlane. + properties: + apiVersion: + description: |- + apiVersion of the template. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + required: + - templateRef + type: object + metadata: + description: |- + metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane + if the ControlPlaneTemplate referenced is machine based. If not, it is applied only to the + ControlPlane. + At runtime this metadata is merged with the corresponding metadata from the topology. + + This field is supported if and only if the control plane provider template + referenced is Machine based. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + naming: + description: naming allows changing the naming pattern used when + creating the control plane provider object. + minProperties: 1 + properties: + template: + description: |- + template defines the template to use for generating the name of the ControlPlane object. + If not defined, it will fallback to `{{ .cluster.name }}-{{ .random }}`. + If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will + get concatenated with a random suffix of length 5. + The templating mechanism provides the following arguments: + * `.cluster.name`: The name of the cluster object. + * `.random`: A random alphanumeric string, without vowels, of length 5. + maxLength: 1024 + minLength: 1 + type: string + type: object + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready + computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine. + + NOTE: If a Cluster defines a custom list of readinessGates for the control plane, + such list overrides readinessGates defined in this field. + NOTE: Specific control plane provider implementations might automatically extend the list of readinessGates; + e.g. the kubeadm control provider adds ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc. + items: + description: MachineReadinessGate contains the type of a Machine + condition to be used as a readiness gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to corev1.Taint, + but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid values + are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + templateRef: + description: templateRef contains the reference to a provider-specific + control plane template. + properties: + apiVersion: + description: |- + apiVersion of the template. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + required: + - templateRef + type: object + infrastructure: + description: |- + infrastructure is a reference to a local struct that holds the details + for provisioning the infrastructure cluster for the Cluster. + properties: + naming: + description: naming allows changing the naming pattern used when + creating the infrastructure cluster object. + minProperties: 1 + properties: + template: + description: |- + template defines the template to use for generating the name of the Infrastructure object. + If not defined, it will fallback to `{{ .cluster.name }}-{{ .random }}`. + If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will + get concatenated with a random suffix of length 5. + The templating mechanism provides the following arguments: + * `.cluster.name`: The name of the cluster object. + * `.random`: A random alphanumeric string, without vowels, of length 5. + maxLength: 1024 + minLength: 1 + type: string + type: object + templateRef: + description: templateRef contains the reference to a provider-specific + infrastructure cluster template. + properties: + apiVersion: + description: |- + apiVersion of the template. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + required: + - templateRef + type: object + kubernetesVersions: + description: |- + kubernetesVersions is the list of Kubernetes versions that can be + used for clusters using this ClusterClass. + The list of version must be ordered from the older to the newer version, and there should be + at least one version for every minor in between the first and the last version. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + patches: + description: |- + patches defines the patches which are applied to customize + referenced templates of a ClusterClass. + Note: Patches will be applied in the order of the array. + items: + description: ClusterClassPatch defines a patch which is applied + to customize the referenced templates. + properties: + definitions: + description: |- + definitions define inline patches. + Note: Patches will be applied in the order of the array. + Note: Exactly one of Definitions or External must be set. + items: + description: PatchDefinition defines a patch which is applied + to customize the referenced templates. + properties: + jsonPatches: + description: |- + jsonPatches defines the patches which should be applied on the templates + matching the selector. + Note: Patches will be applied in the order of the array. + items: + description: JSONPatch defines a JSON patch. + properties: + op: + description: |- + op defines the operation of the patch. + Note: Only `add`, `replace` and `remove` are supported. + enum: + - add + - replace + - remove + type: string + path: + description: |- + path defines the path of the patch. + Note: Only the spec of a template can be patched, thus the path has to start with /spec/. + Note: For now the only allowed array modifications are `append` and `prepend`, i.e.: + * for op: `add`: only index 0 (prepend) and - (append) are allowed + * for op: `replace` or `remove`: no indexes are allowed + maxLength: 512 + minLength: 1 + type: string + value: + description: |- + value defines the value of the patch. + Note: Either Value or ValueFrom is required for add and replace + operations. Only one of them is allowed to be set at the same time. + Note: We have to use apiextensionsv1.JSON instead of our JSON type, + because controller-tools has a hard-coded schema for apiextensionsv1.JSON + which cannot be produced by another type (unset type field). + Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111 + x-kubernetes-preserve-unknown-fields: true + valueFrom: + description: |- + valueFrom defines the value of the patch. + Note: Either Value or ValueFrom is required for add and replace + operations. Only one of them is allowed to be set at the same time. + properties: + template: + description: |- + template is the Go template to be used to calculate the value. + A template can reference variables defined in .spec.variables and builtin variables. + Note: The template must evaluate to a valid YAML or JSON value. + maxLength: 10240 + minLength: 1 + type: string + variable: + description: |- + variable is the variable to be used as value. + Variable can be one of the variables defined in .spec.variables or a builtin variable. + maxLength: 256 + minLength: 1 + type: string + type: object + required: + - op + - path + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + selector: + description: selector defines on which templates the patch + should be applied. + properties: + apiVersion: + description: |- + apiVersion filters templates by apiVersion. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind filters templates by kind. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + matchResources: + description: matchResources selects templates based + on where they are referenced. + minProperties: 1 + properties: + controlPlane: + description: |- + controlPlane selects templates referenced in .spec.ControlPlane. + Note: this will match the controlPlane and also the controlPlane + machineInfrastructure (depending on the kind and apiVersion). + type: boolean + infrastructureCluster: + description: infrastructureCluster selects templates + referenced in .spec.infrastructure. + type: boolean + machineDeploymentClass: + description: |- + machineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in + .spec.workers.machineDeployments. + properties: + names: + description: names selects templates by class + names. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + type: object + machinePoolClass: + description: |- + machinePoolClass selects templates referenced in specific MachinePoolClasses in + .spec.workers.machinePools. + properties: + names: + description: names selects templates by class + names. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + required: + - apiVersion + - kind + - matchResources + type: object + required: + - jsonPatches + - selector + type: object + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + description: + description: description is a human-readable description of + this patch. + maxLength: 1024 + minLength: 1 + type: string + enabledIf: + description: |- + enabledIf is a Go template to be used to calculate if a patch should be enabled. + It can reference variables defined in .spec.variables and builtin variables. + The patch will be enabled if the template evaluates to `true`, otherwise it will + be disabled. + If EnabledIf is not set, the patch will be enabled per default. + maxLength: 256 + minLength: 1 + type: string + external: + description: |- + external defines an external patch. + Note: Exactly one of Definitions or External must be set. + properties: + discoverVariablesExtension: + description: discoverVariablesExtension references an extension + which is called to discover variables. + maxLength: 512 + minLength: 1 + type: string + generatePatchesExtension: + description: generatePatchesExtension references an extension + which is called to generate patches. + maxLength: 512 + minLength: 1 + type: string + settings: + additionalProperties: + type: string + description: |- + settings defines key value pairs to be passed to the extensions. + Values defined here take precedence over the values defined in the + corresponding ExtensionConfig. + type: object + validateTopologyExtension: + description: validateTopologyExtension references an extension + which is called to validate the topology. + maxLength: 512 + minLength: 1 + type: string + type: object + name: + description: name of the patch. + maxLength: 256 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + upgrade: + description: upgrade defines the upgrade configuration for clusters + using this ClusterClass. + minProperties: 1 + properties: + external: + description: external defines external runtime extensions for + upgrade operations. + minProperties: 1 + properties: + generateUpgradePlanExtension: + description: generateUpgradePlanExtension references an extension + which is called to generate upgrade plan. + maxLength: 512 + minLength: 1 + type: string + type: object + type: object + variables: + description: |- + variables defines the variables which can be configured + in the Cluster topology and are then used in patches. + items: + description: |- + ClusterClassVariable defines a variable which can + be configured in the Cluster topology and used in patches. + properties: + deprecatedV1Beta1Metadata: + description: |- + deprecatedV1Beta1Metadata is the metadata of a variable. + It can be used to add additional data for higher level tools to + a ClusterClassVariable. + + Deprecated: This field is deprecated and will be removed when support for v1beta1 will be dropped. Please use XMetadata in JSONSchemaProps instead. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map that can be used to store and + retrieve arbitrary metadata. + They are not queryable. + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) variables. + type: object + type: object + name: + description: name of the variable. + maxLength: 256 + minLength: 1 + type: string + required: + description: |- + required specifies if the variable is required. + Note: this applies to the variable as a whole and thus the + top-level object defined in the schema. If nested fields are + required, this will be specified inside the schema. + type: boolean + schema: + description: schema defines the schema of the variable. + properties: + openAPIV3Schema: + description: |- + openAPIV3Schema defines the schema of a variable via OpenAPI v3 + schema. The schema is a subset of the schema used in + Kubernetes CRDs. + minProperties: 1 + properties: + additionalProperties: + description: |- + additionalProperties specifies the schema of values in a map (keys are always strings). + NOTE: Can only be set if type is object. + NOTE: AdditionalProperties is mutually exclusive with Properties. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + allOf: + description: |- + allOf specifies that the variable must validate against all of the subschemas in the array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + anyOf: + description: |- + anyOf specifies that the variable must validate against one or more of the subschemas in the array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + default: + description: |- + default is the default value of the variable. + NOTE: Can be set for all types. + x-kubernetes-preserve-unknown-fields: true + description: + description: description is a human-readable description + of this variable. + maxLength: 4096 + minLength: 1 + type: string + enum: + description: |- + enum is the list of valid values of the variable. + NOTE: Can be set for all types. + items: + x-kubernetes-preserve-unknown-fields: true + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + example: + description: example is an example for this variable. + x-kubernetes-preserve-unknown-fields: true + exclusiveMaximum: + description: |- + exclusiveMaximum specifies if the Maximum is exclusive. + NOTE: Can only be set if type is integer or number. + type: boolean + exclusiveMinimum: + description: |- + exclusiveMinimum specifies if the Minimum is exclusive. + NOTE: Can only be set if type is integer or number. + type: boolean + format: + description: |- + format is an OpenAPI v3 format string. Unknown formats are ignored. + For a list of supported formats please see: (of the k8s.io/apiextensions-apiserver version we're currently using) + https://github.com/kubernetes/apiextensions-apiserver/blob/master/pkg/apiserver/validation/formats.go + NOTE: Can only be set if type is string. + maxLength: 32 + minLength: 1 + type: string + items: + description: |- + items specifies fields of an array. + NOTE: Can only be set if type is array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + maxItems: + description: |- + maxItems is the max length of an array variable. + NOTE: Can only be set if type is array. + format: int64 + type: integer + maxLength: + description: |- + maxLength is the max length of a string variable. + NOTE: Can only be set if type is string. + format: int64 + type: integer + maxProperties: + description: |- + maxProperties is the maximum amount of entries in a map or properties in an object. + NOTE: Can only be set if type is object. + format: int64 + type: integer + maximum: + description: |- + maximum is the maximum of an integer or number variable. + If ExclusiveMaximum is false, the variable is valid if it is lower than, or equal to, the value of Maximum. + If ExclusiveMaximum is true, the variable is valid if it is strictly lower than the value of Maximum. + NOTE: Can only be set if type is integer or number. + format: int64 + type: integer + minItems: + description: |- + minItems is the min length of an array variable. + NOTE: Can only be set if type is array. + format: int64 + type: integer + minLength: + description: |- + minLength is the min length of a string variable. + NOTE: Can only be set if type is string. + format: int64 + type: integer + minProperties: + description: |- + minProperties is the minimum amount of entries in a map or properties in an object. + NOTE: Can only be set if type is object. + format: int64 + type: integer + minimum: + description: |- + minimum is the minimum of an integer or number variable. + If ExclusiveMinimum is false, the variable is valid if it is greater than, or equal to, the value of Minimum. + If ExclusiveMinimum is true, the variable is valid if it is strictly greater than the value of Minimum. + NOTE: Can only be set if type is integer or number. + format: int64 + type: integer + not: + description: |- + not specifies that the variable must not validate against the subschema. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + oneOf: + description: |- + oneOf specifies that the variable must validate against exactly one of the subschemas in the array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + pattern: + description: |- + pattern is the regex which a string variable must match. + NOTE: Can only be set if type is string. + maxLength: 512 + minLength: 1 + type: string + properties: + description: |- + properties specifies fields of an object. + NOTE: Can only be set if type is object. + NOTE: Properties is mutually exclusive with AdditionalProperties. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + required: + description: |- + required specifies which fields of an object are required. + NOTE: Can only be set if type is object. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: + description: |- + type is the type of the variable. + Valid values are: object, array, string, integer, number or boolean. + enum: + - object + - array + - string + - integer + - number + - boolean + type: string + uniqueItems: + description: |- + uniqueItems specifies if items in an array must be unique. + NOTE: Can only be set if type is array. + type: boolean + x-kubernetes-int-or-string: + description: |- + x-kubernetes-int-or-string specifies that this value is + either an integer or a string. If this is true, an empty + type is allowed and type as child of anyOf is permitted + if following one of the following patterns: + + 1) anyOf: + - type: integer + - type: string + 2) allOf: + - anyOf: + - type: integer + - type: string + - ... zero or more + type: boolean + x-kubernetes-preserve-unknown-fields: + description: |- + x-kubernetes-preserve-unknown-fields allows setting fields in a variable object + which are not defined in the variable schema. This affects fields recursively, + except if nested properties or additionalProperties are specified in the schema. + type: boolean + x-kubernetes-validations: + description: x-kubernetes-validations describes a list + of validation rules written in the CEL expression + language. + items: + description: ValidationRule describes a validation + rule written in the CEL expression language. + properties: + fieldPath: + description: |- + fieldPath represents the field path returned when the validation fails. + It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. + e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` + If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` + It does not support list numeric index. + It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. + Numeric index of array is not supported. + For field name which contains special characters, use `['specialName']` to refer the field name. + e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` + maxLength: 512 + minLength: 1 + type: string + message: + description: |- + message represents the message displayed when validation fails. The message is required if the Rule contains + line breaks. The message must not contain line breaks. + If unset, the message is "failed rule: {Rule}". + e.g. "must be a URL with the host matching spec.host" + maxLength: 512 + minLength: 1 + type: string + messageExpression: + description: |- + messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + Since messageExpression is used as a failure message, it must evaluate to a string. + If both message and messageExpression are present on a rule, then messageExpression will be used if validation + fails. If messageExpression results in a runtime error, the validation failure message is produced + as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset. + messageExpression has access to all the same variables as the rule; the only difference is the return type. + Example: + "x must be less than max ("+string(self.max)+")" + maxLength: 1024 + minLength: 1 + type: string + reason: + default: FieldValueInvalid + description: |- + reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. + The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". + If not set, default to use "FieldValueInvalid". + All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. + enum: + - FieldValueInvalid + - FieldValueForbidden + - FieldValueRequired + - FieldValueDuplicate + type: string + rule: + description: "rule represents the expression which + will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nThe + Rule is scoped to the location of the x-kubernetes-validations + extension in the schema.\nThe `self` variable + in the CEL expression is bound to the scoped + value.\nIf the Rule is scoped to an object with + properties, the accessible properties of the + object are field selectable\nvia `self.field` + and field presence can be checked via `has(self.field)`.\nIf + the Rule is scoped to an object with additionalProperties + (i.e. a map) the value of the map\nare accessible + via `self[mapKey]`, map containment can be checked + via `mapKey in self` and all entries of the + map\nare accessible via CEL macros and functions + such as `self.all(...)`.\nIf the Rule is scoped + to an array, the elements of the array are accessible + via `self[i]` and also by macros and\nfunctions.\nIf + the Rule is scoped to a scalar, `self` is bound + to the scalar value.\nExamples:\n- Rule scoped + to a map of objects: {\"rule\": \"self.components['Widget'].priority + < 10\"}\n- Rule scoped to a list of integers: + {\"rule\": \"self.values.all(value, value >= + 0 && value < 100)\"}\n- Rule scoped to a string + value: {\"rule\": \"self.startsWith('kube')\"}\n\nUnknown + data preserved in custom resources via x-kubernetes-preserve-unknown-fields + is not accessible in CEL\nexpressions. This + includes:\n- Unknown field values that are preserved + by object schemas with x-kubernetes-preserve-unknown-fields.\n- + Object properties where the property schema + is of an \"unknown type\". An \"unknown type\" + is recursively defined as:\n - A schema with + no type and x-kubernetes-preserve-unknown-fields + set to true\n - An array where the items schema + is of an \"unknown type\"\n - An object where + the additionalProperties schema is of an \"unknown + type\"\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` + are accessible.\nAccessible property names are + escaped according to the following rules when + accessed in the expression:\n- '__' escapes + to '__underscores__'\n- '.' escapes to '__dot__'\n- + '-' escapes to '__dash__'\n- '/' escapes to + '__slash__'\n- Property names that exactly match + a CEL RESERVED keyword escape to '__{keyword}__'. + The keywords are:\n\t \"true\", \"false\", + \"null\", \"in\", \"as\", \"break\", \"const\", + \"continue\", \"else\", \"for\", \"function\", + \"if\",\n\t \"import\", \"let\", \"loop\", + \"package\", \"namespace\", \"return\".\nExamples:\n + \ - Rule accessing a property named \"namespace\": + {\"rule\": \"self.__namespace__ > 0\"}\n - + Rule accessing a property named \"x-prop\": + {\"rule\": \"self.x__dash__prop > 0\"}\n - + Rule accessing a property named \"redact__d\": + {\"rule\": \"self.redact__underscores__d > 0\"}\n\nIf + `rule` makes use of the `oldSelf` variable it + is implicitly a\n`transition rule`.\n\nBy default, + the `oldSelf` variable is the same type as `self`.\n\nTransition + rules by default are applied only on UPDATE + requests and are\nskipped if an old value could + not be found." + maxLength: 4096 + minLength: 1 + type: string + required: + - rule + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - rule + x-kubernetes-list-type: map + x-metadata: + description: |- + x-metadata is the metadata of a variable or a nested field within a variable. + It can be used to add additional data for higher level tools. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map that can be used to store and + retrieve arbitrary metadata. + They are not queryable. + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) variables. + type: object + type: object + type: object + required: + - openAPIV3Schema + type: object + required: + - name + - required + - schema + type: object + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + workers: + description: |- + workers describes the worker nodes for the cluster. + It is a collection of node types which can be used to create + the worker nodes of the cluster. + minProperties: 1 + properties: + machineDeployments: + description: |- + machineDeployments is a list of machine deployment classes that can be used to create + a set of worker nodes. + items: + description: |- + MachineDeploymentClass serves as a template to define a set of worker nodes of the cluster + provisioned using the `ClusterClass`. + properties: + bootstrap: + description: |- + bootstrap contains the bootstrap template reference to be used + for the creation of worker Machines. + properties: + templateRef: + description: templateRef is a required reference to + the BootstrapTemplate for a MachineDeployment. + properties: + apiVersion: + description: |- + apiVersion of the template. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + required: + - templateRef + type: object + class: + description: |- + class denotes a type of worker node present in the cluster, + this name MUST be unique within a ClusterClass and can be referenced + in the Cluster to create a managed MachineDeployment. + maxLength: 256 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for + Machine deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. + format: int32 + minimum: 0 + type: integer + order: + description: |- + order defines the order in which Machines are deleted when downscaling. + Defaults to "Random". Valid values are "Random", "Newest", "Oldest" + enum: + - Random + - Newest + - Oldest + type: string + type: object + failureDomain: + description: |- + failureDomain is the failure domain the machines will be created in. + Must match the name of a FailureDomain from the Cluster status. + NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. + maxLength: 256 + minLength: 1 + type: string + healthCheck: + description: healthCheck defines a MachineHealthCheck for + this MachineDeploymentClass. + minProperties: 1 + properties: + checks: + description: |- + checks are the checks that are used to evaluate if a Machine is healthy. + + Independent of this configuration the MachineHealthCheck controller will always + flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and + Machines with deleted Nodes as unhealthy. + + Furthermore, if checks.nodeStartupTimeoutSeconds is not set it + is defaulted to 10 minutes and evaluated accordingly. + minProperties: 1 + properties: + nodeStartupTimeoutSeconds: + description: |- + nodeStartupTimeoutSeconds allows to set the maximum time for MachineHealthCheck + to consider a Machine unhealthy if a corresponding Node isn't associated + through a `Spec.ProviderID` field. + + The duration set in this field is compared to the greatest of: + - Cluster's infrastructure ready condition timestamp (if and when available) + - Control Plane's initialized condition timestamp (if and when available) + - Machine's infrastructure ready condition timestamp (if and when available) + - Machine's metadata creation timestamp + + Defaults to 10 minutes. + If you wish to disable this feature, set the value explicitly to 0. + format: int32 + minimum: 0 + type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one + of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, + Available, HealthCheckSucceeded, OwnerRemediated, + ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + unhealthyNodeConditions: + description: |- + unhealthyNodeConditions contains a list of conditions that determine + whether a node is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the node is unhealthy. + items: + description: |- + UnhealthyNodeCondition represents a Node condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a node is considered unhealthy. + properties: + status: + description: status of the condition, one + of True, False, Unknown. + minLength: 1 + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a node must be in a given status for, + after which the node is considered unhealthy. + For example, with a value of "3600", the node must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Node condition + minLength: 1 + type: string + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + remediation: + description: |- + remediation configures if and how remediations are triggered if a Machine is unhealthy. + + If remediation or remediation.triggerIf is not set, + remediation will always be triggered for unhealthy Machines. + + If remediation or remediation.templateRef is not set, + the OwnerRemediated condition will be set on unhealthy Machines to trigger remediation via + the owner of the Machines, for example a MachineSet or a KubeadmControlPlane. + minProperties: 1 + properties: + maxInFlight: + anyOf: + - type: integer + - type: string + description: |- + maxInFlight determines how many in flight remediations should happen at the same time. + + Remediation only happens on the MachineSet with the most current revision, while + older MachineSets (usually present during rollout operations) aren't allowed to remediate. + + Note: In general (independent of remediations), unhealthy machines are always + prioritized during scale down operations over healthy ones. + + MaxInFlight can be set to a fixed number or a percentage. + Example: when this is set to 20%, the MachineSet controller deletes at most 20% of + the desired replicas. + + If not set, remediation is limited to all machines (bounded by replicas) + under the active MachineSet's management. + x-kubernetes-int-or-string: true + templateRef: + description: |- + templateRef is a reference to a remediation template + provided by an infrastructure provider. + + This field is completely optional, when filled, the MachineHealthCheck controller + creates a new object from the template referenced and hands off remediation of the machine to + a controller that lives outside of Cluster API. + properties: + apiVersion: + description: |- + apiVersion of the remediation template. + apiVersion must be fully qualified domain name followed by / and a version. + NOTE: This field must be kept in sync with the APIVersion of the remediation template. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the remediation template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the remediation template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + triggerIf: + description: |- + triggerIf configures if remediations are triggered. + If this field is not set, remediations are always triggered. + minProperties: 1 + properties: + unhealthyInRange: + description: |- + unhealthyInRange specifies that remediations are only triggered if the number of + unhealthy Machines is in the configured range. + Takes precedence over unhealthyLessThanOrEqualTo. + Eg. "[3-5]" - This means that remediation will be allowed only when: + (a) there are at least 3 unhealthy Machines (and) + (b) there are at most 5 unhealthy Machines + maxLength: 32 + minLength: 1 + pattern: ^\[[0-9]+-[0-9]+\]$ + type: string + unhealthyLessThanOrEqualTo: + anyOf: + - type: integer + - type: string + description: |- + unhealthyLessThanOrEqualTo specifies that remediations are only triggered if the number of + unhealthy Machines is less than or equal to the configured value. + unhealthyInRange takes precedence if set. + x-kubernetes-int-or-string: true + type: object + type: object + type: object + infrastructure: + description: |- + infrastructure contains the infrastructure template reference to be used + for the creation of worker Machines. + properties: + templateRef: + description: templateRef is a required reference to + the InfrastructureTemplate for a MachineDeployment. + properties: + apiVersion: + description: |- + apiVersion of the template. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + required: + - templateRef + type: object + metadata: + description: |- + metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. + At runtime this metadata is merged with the corresponding metadata from the topology. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a newly created machine should + be ready. + Defaults to 0 (machine will be considered available as soon as it + is ready) + NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. + format: int32 + minimum: 0 + type: integer + naming: + description: naming allows changing the naming pattern used + when creating the MachineDeployment. + minProperties: 1 + properties: + template: + description: |- + template defines the template to use for generating the name of the MachineDeployment object. + If not defined, it will fallback to `{{ .cluster.name }}-{{ .machineDeployment.topologyName }}-{{ .random }}`. + If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will + get concatenated with a random suffix of length 5. + The templating mechanism provides the following arguments: + * `.cluster.name`: The name of the cluster object. + * `.random`: A random alphanumeric string, without vowels, of length 5. + * `.machineDeployment.topologyName`: The name of the MachineDeployment topology (Cluster.spec.topology.workers.machineDeployments[].name). + maxLength: 1024 + minLength: 1 + type: string + type: object + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready + computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine. + + NOTE: If a Cluster defines a custom list of readinessGates for a MachineDeployment using this MachineDeploymentClass, + such list overrides readinessGates defined in this field. + items: + description: MachineReadinessGate contains the type of + a Machine condition to be used as a readiness gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + rollout: + description: |- + rollout allows you to configure the behaviour of rolling updates to the MachineDeployment Machines. + It allows you to define the strategy used during rolling replacements. + minProperties: 1 + properties: + strategy: + description: strategy specifies how to roll out control + plane Machines. + minProperties: 1 + properties: + rollingUpdate: + description: |- + rollingUpdate is the rolling update config params. Present only if + type = RollingUpdate. + minProperties: 1 + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: |- + maxSurge is the maximum number of machines that can be scheduled above the + desired number of machines. + Value can be an absolute number (ex: 5) or a percentage of + desired machines (ex: 10%). + This can not be 0 if MaxUnavailable is 0. + Absolute number is calculated from percentage by rounding up. + Defaults to 1. + Example: when this is set to 30%, the new MachineSet can be scaled + up immediately when the rolling update starts, such that the total + number of old and new machines do not exceed 130% of desired + machines. Once old machines have been killed, new MachineSet can + be scaled up further, ensuring that total number of machines running + at any time during the update is at most 130% of desired machines. + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: |- + maxUnavailable is the maximum number of machines that can be unavailable during the update. + Value can be an absolute number (ex: 5) or a percentage of desired + machines (ex: 10%). + Absolute number is calculated from percentage by rounding down. + This can not be 0 if MaxSurge is 0. + Defaults to 0. + Example: when this is set to 30%, the old MachineSet can be scaled + down to 70% of desired machines immediately when the rolling update + starts. Once new machines are ready, old MachineSet can be scaled + down further, followed by scaling up the new MachineSet, ensuring + that the total number of machines available at all times + during the update is at least 70% of desired machines. + x-kubernetes-int-or-string: true + type: object + type: + description: |- + type of rollout. Allowed values are RollingUpdate and OnDelete. + Default is RollingUpdate. + enum: + - RollingUpdate + - OnDelete + type: string + required: + - type + type: object + type: object + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + required: + - bootstrap + - class + - infrastructure + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - class + x-kubernetes-list-type: map + machinePools: + description: |- + machinePools is a list of machine pool classes that can be used to create + a set of worker nodes. + items: + description: |- + MachinePoolClass serves as a template to define a pool of worker nodes of the cluster + provisioned using `ClusterClass`. + properties: + bootstrap: + description: |- + bootstrap contains the bootstrap template reference to be used + for the creation of the Machines in the MachinePool. + properties: + templateRef: + description: templateRef is a required reference to + the BootstrapTemplate for a MachinePool. + properties: + apiVersion: + description: |- + apiVersion of the template. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + required: + - templateRef + type: object + class: + description: |- + class denotes a type of machine pool present in the cluster, + this name MUST be unique within a ClusterClass and can be referenced + in the Cluster to create a managed MachinePool. + maxLength: 256 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for + Machine deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine Pool is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. + format: int32 + minimum: 0 + type: integer + type: object + failureDomains: + description: |- + failureDomains is the list of failure domains the MachinePool should be attached to. + Must match a key in the FailureDomains map stored on the cluster object. + NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + infrastructure: + description: |- + infrastructure contains the infrastructure template reference to be used + for the creation of the MachinePool. + properties: + templateRef: + description: templateRef is a required reference to + the InfrastructureTemplate for a MachinePool. + properties: + apiVersion: + description: |- + apiVersion of the template. + apiVersion must be fully qualified domain name followed by / and a version. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + required: + - templateRef + type: object + metadata: + description: |- + metadata is the metadata applied to the MachinePool. + At runtime this metadata is merged with the corresponding metadata from the topology. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a newly created machine pool should + be ready. + Defaults to 0 (machine will be considered available as soon as it + is ready) + NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. + format: int32 + minimum: 0 + type: integer + naming: + description: naming allows changing the naming pattern used + when creating the MachinePool. + minProperties: 1 + properties: + template: + description: |- + template defines the template to use for generating the name of the MachinePool object. + If not defined, it will fallback to `{{ .cluster.name }}-{{ .machinePool.topologyName }}-{{ .random }}`. + If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will + get concatenated with a random suffix of length 5. + The templating mechanism provides the following arguments: + * `.cluster.name`: The name of the cluster object. + * `.random`: A random alphanumeric string, without vowels, of length 5. + * `.machinePool.topologyName`: The name of the MachinePool topology (Cluster.spec.topology.workers.machinePools[].name). + maxLength: 1024 + minLength: 1 + type: string + type: object + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + required: + - bootstrap + - class + - infrastructure + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - class + x-kubernetes-list-type: map + type: object + required: + - controlPlane + - infrastructure + type: object + status: + description: status is the observed state of ClusterClass. + minProperties: 1 + properties: + conditions: + description: |- + conditions represents the observations of a ClusterClass's current state. + Known condition types are VariablesReady, RefVersionsUpToDate, Paused. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + conditions: + description: |- + conditions defines current observed state of the ClusterClass. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + type: object + type: object + observedGeneration: + description: observedGeneration is the latest generation observed + by the controller. + format: int64 + minimum: 1 + type: integer + variables: + description: variables is a list of ClusterClassStatusVariable that + are defined for the ClusterClass. + items: + description: ClusterClassStatusVariable defines a variable which + appears in the status of a ClusterClass. + properties: + definitions: + description: definitions is a list of definitions for a variable. + items: + description: ClusterClassStatusVariableDefinition defines + a variable which appears in the status of a ClusterClass. + properties: + deprecatedV1Beta1Metadata: + description: |- + deprecatedV1Beta1Metadata is the metadata of a variable. + It can be used to add additional data for higher level tools to + a ClusterClassVariable. + + Deprecated: This field is deprecated and will be removed when support for v1beta1 will be dropped. Please use XMetadata in JSONSchemaProps instead. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map that can be used to store and + retrieve arbitrary metadata. + They are not queryable. + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) variables. + type: object + type: object + from: + description: |- + from specifies the origin of the variable definition. + This will be `inline` for variables defined in the ClusterClass or the name of a patch defined in the ClusterClass + for variables discovered from a DiscoverVariables runtime extensions. + maxLength: 256 + minLength: 1 + type: string + required: + description: |- + required specifies if the variable is required. + Note: this applies to the variable as a whole and thus the + top-level object defined in the schema. If nested fields are + required, this will be specified inside the schema. + type: boolean + schema: + description: schema defines the schema of the variable. + properties: + openAPIV3Schema: + description: |- + openAPIV3Schema defines the schema of a variable via OpenAPI v3 + schema. The schema is a subset of the schema used in + Kubernetes CRDs. + minProperties: 1 + properties: + additionalProperties: + description: |- + additionalProperties specifies the schema of values in a map (keys are always strings). + NOTE: Can only be set if type is object. + NOTE: AdditionalProperties is mutually exclusive with Properties. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + allOf: + description: |- + allOf specifies that the variable must validate against all of the subschemas in the array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + anyOf: + description: |- + anyOf specifies that the variable must validate against one or more of the subschemas in the array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + default: + description: |- + default is the default value of the variable. + NOTE: Can be set for all types. + x-kubernetes-preserve-unknown-fields: true + description: + description: description is a human-readable description + of this variable. + maxLength: 4096 + minLength: 1 + type: string + enum: + description: |- + enum is the list of valid values of the variable. + NOTE: Can be set for all types. + items: + x-kubernetes-preserve-unknown-fields: true + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + example: + description: example is an example for this variable. + x-kubernetes-preserve-unknown-fields: true + exclusiveMaximum: + description: |- + exclusiveMaximum specifies if the Maximum is exclusive. + NOTE: Can only be set if type is integer or number. + type: boolean + exclusiveMinimum: + description: |- + exclusiveMinimum specifies if the Minimum is exclusive. + NOTE: Can only be set if type is integer or number. + type: boolean + format: + description: |- + format is an OpenAPI v3 format string. Unknown formats are ignored. + For a list of supported formats please see: (of the k8s.io/apiextensions-apiserver version we're currently using) + https://github.com/kubernetes/apiextensions-apiserver/blob/master/pkg/apiserver/validation/formats.go + NOTE: Can only be set if type is string. + maxLength: 32 + minLength: 1 + type: string + items: + description: |- + items specifies fields of an array. + NOTE: Can only be set if type is array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + maxItems: + description: |- + maxItems is the max length of an array variable. + NOTE: Can only be set if type is array. + format: int64 + type: integer + maxLength: + description: |- + maxLength is the max length of a string variable. + NOTE: Can only be set if type is string. + format: int64 + type: integer + maxProperties: + description: |- + maxProperties is the maximum amount of entries in a map or properties in an object. + NOTE: Can only be set if type is object. + format: int64 + type: integer + maximum: + description: |- + maximum is the maximum of an integer or number variable. + If ExclusiveMaximum is false, the variable is valid if it is lower than, or equal to, the value of Maximum. + If ExclusiveMaximum is true, the variable is valid if it is strictly lower than the value of Maximum. + NOTE: Can only be set if type is integer or number. + format: int64 + type: integer + minItems: + description: |- + minItems is the min length of an array variable. + NOTE: Can only be set if type is array. + format: int64 + type: integer + minLength: + description: |- + minLength is the min length of a string variable. + NOTE: Can only be set if type is string. + format: int64 + type: integer + minProperties: + description: |- + minProperties is the minimum amount of entries in a map or properties in an object. + NOTE: Can only be set if type is object. + format: int64 + type: integer + minimum: + description: |- + minimum is the minimum of an integer or number variable. + If ExclusiveMinimum is false, the variable is valid if it is greater than, or equal to, the value of Minimum. + If ExclusiveMinimum is true, the variable is valid if it is strictly greater than the value of Minimum. + NOTE: Can only be set if type is integer or number. + format: int64 + type: integer + not: + description: |- + not specifies that the variable must not validate against the subschema. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + oneOf: + description: |- + oneOf specifies that the variable must validate against exactly one of the subschemas in the array. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + pattern: + description: |- + pattern is the regex which a string variable must match. + NOTE: Can only be set if type is string. + maxLength: 512 + minLength: 1 + type: string + properties: + description: |- + properties specifies fields of an object. + NOTE: Can only be set if type is object. + NOTE: Properties is mutually exclusive with AdditionalProperties. + NOTE: This field uses PreserveUnknownFields and Schemaless, + because recursive validation is not possible. + x-kubernetes-preserve-unknown-fields: true + required: + description: |- + required specifies which fields of an object are required. + NOTE: Can only be set if type is object. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: + description: |- + type is the type of the variable. + Valid values are: object, array, string, integer, number or boolean. + enum: + - object + - array + - string + - integer + - number + - boolean + type: string + uniqueItems: + description: |- + uniqueItems specifies if items in an array must be unique. + NOTE: Can only be set if type is array. + type: boolean + x-kubernetes-int-or-string: + description: |- + x-kubernetes-int-or-string specifies that this value is + either an integer or a string. If this is true, an empty + type is allowed and type as child of anyOf is permitted + if following one of the following patterns: + + 1) anyOf: + - type: integer + - type: string + 2) allOf: + - anyOf: + - type: integer + - type: string + - ... zero or more + type: boolean + x-kubernetes-preserve-unknown-fields: + description: |- + x-kubernetes-preserve-unknown-fields allows setting fields in a variable object + which are not defined in the variable schema. This affects fields recursively, + except if nested properties or additionalProperties are specified in the schema. + type: boolean + x-kubernetes-validations: + description: x-kubernetes-validations describes + a list of validation rules written in the CEL + expression language. + items: + description: ValidationRule describes a validation + rule written in the CEL expression language. + properties: + fieldPath: + description: |- + fieldPath represents the field path returned when the validation fails. + It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. + e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` + If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` + It does not support list numeric index. + It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. + Numeric index of array is not supported. + For field name which contains special characters, use `['specialName']` to refer the field name. + e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` + maxLength: 512 + minLength: 1 + type: string + message: + description: |- + message represents the message displayed when validation fails. The message is required if the Rule contains + line breaks. The message must not contain line breaks. + If unset, the message is "failed rule: {Rule}". + e.g. "must be a URL with the host matching spec.host" + maxLength: 512 + minLength: 1 + type: string + messageExpression: + description: |- + messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + Since messageExpression is used as a failure message, it must evaluate to a string. + If both message and messageExpression are present on a rule, then messageExpression will be used if validation + fails. If messageExpression results in a runtime error, the validation failure message is produced + as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset. + messageExpression has access to all the same variables as the rule; the only difference is the return type. + Example: + "x must be less than max ("+string(self.max)+")" + maxLength: 1024 + minLength: 1 + type: string + reason: + default: FieldValueInvalid + description: |- + reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. + The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". + If not set, default to use "FieldValueInvalid". + All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. + enum: + - FieldValueInvalid + - FieldValueForbidden + - FieldValueRequired + - FieldValueDuplicate + type: string + rule: + description: "rule represents the expression + which will be evaluated by CEL.\nref: + https://github.com/google/cel-spec\nThe + Rule is scoped to the location of the + x-kubernetes-validations extension in + the schema.\nThe `self` variable in the + CEL expression is bound to the scoped + value.\nIf the Rule is scoped to an object + with properties, the accessible properties + of the object are field selectable\nvia + `self.field` and field presence can be + checked via `has(self.field)`.\nIf the + Rule is scoped to an object with additionalProperties + (i.e. a map) the value of the map\nare + accessible via `self[mapKey]`, map containment + can be checked via `mapKey in self` and + all entries of the map\nare accessible + via CEL macros and functions such as `self.all(...)`.\nIf + the Rule is scoped to an array, the elements + of the array are accessible via `self[i]` + and also by macros and\nfunctions.\nIf + the Rule is scoped to a scalar, `self` + is bound to the scalar value.\nExamples:\n- + Rule scoped to a map of objects: {\"rule\": + \"self.components['Widget'].priority < + 10\"}\n- Rule scoped to a list of integers: + {\"rule\": \"self.values.all(value, value + >= 0 && value < 100)\"}\n- Rule scoped + to a string value: {\"rule\": \"self.startsWith('kube')\"}\n\nUnknown + data preserved in custom resources via + x-kubernetes-preserve-unknown-fields is + not accessible in CEL\nexpressions. This + includes:\n- Unknown field values that + are preserved by object schemas with x-kubernetes-preserve-unknown-fields.\n- + Object properties where the property schema + is of an \"unknown type\". An \"unknown + type\" is recursively defined as:\n - + A schema with no type and x-kubernetes-preserve-unknown-fields + set to true\n - An array where the items + schema is of an \"unknown type\"\n - + An object where the additionalProperties + schema is of an \"unknown type\"\n\nOnly + property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` + are accessible.\nAccessible property names + are escaped according to the following + rules when accessed in the expression:\n- + '__' escapes to '__underscores__'\n- '.' + escapes to '__dot__'\n- '-' escapes to + '__dash__'\n- '/' escapes to '__slash__'\n- + Property names that exactly match a CEL + RESERVED keyword escape to '__{keyword}__'. + The keywords are:\n\t \"true\", \"false\", + \"null\", \"in\", \"as\", \"break\", \"const\", + \"continue\", \"else\", \"for\", \"function\", + \"if\",\n\t \"import\", \"let\", \"loop\", + \"package\", \"namespace\", \"return\".\nExamples:\n + \ - Rule accessing a property named \"namespace\": + {\"rule\": \"self.__namespace__ > 0\"}\n + \ - Rule accessing a property named \"x-prop\": + {\"rule\": \"self.x__dash__prop > 0\"}\n + \ - Rule accessing a property named \"redact__d\": + {\"rule\": \"self.redact__underscores__d + > 0\"}\n\nIf `rule` makes use of the `oldSelf` + variable it is implicitly a\n`transition + rule`.\n\nBy default, the `oldSelf` variable + is the same type as `self`.\n\nTransition + rules by default are applied only on UPDATE + requests and are\nskipped if an old value + could not be found." + maxLength: 4096 + minLength: 1 + type: string + required: + - rule + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - rule + x-kubernetes-list-type: map + x-metadata: + description: |- + x-metadata is the metadata of a variable or a nested field within a variable. + It can be used to add additional data for higher level tools. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map that can be used to store and + retrieve arbitrary metadata. + They are not queryable. + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) variables. + type: object + type: object + type: object + required: + - openAPIV3Schema + type: object + required: + - from + - required + - schema + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + definitionsConflict: + description: definitionsConflict specifies whether or not there + are conflicting definitions for a single variable name. + type: boolean + name: + description: name is the name of the variable. + maxLength: 256 + minLength: 1 + type: string + required: + - definitions + - name + type: object + maxItems: 1000 + type: array + x-kubernetes-list-type: atomic + type: object + required: + - spec + type: object + served: true storage: true subresources: status: {} @@ -2842,7 +5544,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: clusterresourcesetbindings.addons.cluster.x-k8s.io @@ -2857,7 +5559,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: addons.cluster.x-k8s.io names: categories: @@ -2868,194 +5569,12 @@ spec: singular: clusterresourcesetbinding scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - ClusterResourceSetBinding lists all matching ClusterResourceSets with the cluster it belongs to. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of ClusterResourceSetBinding. - properties: - bindings: - description: bindings is a list of ClusterResourceSets and their resources. - items: - description: ResourceSetBinding keeps info on all of the resources - in a ClusterResourceSet. - properties: - clusterResourceSetName: - description: clusterResourceSetName is the name of the ClusterResourceSet - that is applied to the owner cluster of the binding. - type: string - resources: - description: resources is a list of resources that the ClusterResourceSet - has. - items: - description: ResourceBinding shows the status of a resource - that belongs to a ClusterResourceSet matched by the owner - cluster of the ClusterResourceSetBinding object. - properties: - applied: - description: applied is to track if a resource is applied - to the cluster or not. - type: boolean - hash: - description: |- - hash is the hash of a resource's data. This can be used to decide if a resource is changed. - For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change. - type: string - kind: - description: 'kind of the resource. Supported kinds are: - Secrets and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - lastAppliedTime: - description: lastAppliedTime identifies when this resource - was last applied to the cluster. - format: date-time - type: string - name: - description: name of the resource that is in the same - namespace with ClusterResourceSet object. - minLength: 1 - type: string - required: - - applied - - kind - - name - type: object - type: array - required: - - clusterResourceSetName - type: object - type: array - type: object - type: object - served: false - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Time duration since creation of ClusterResourceSetBinding jsonPath: .metadata.creationTimestamp name: Age type: date deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - ClusterResourceSetBinding lists all matching ClusterResourceSets with the cluster it belongs to. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of ClusterResourceSetBinding. - properties: - bindings: - description: bindings is a list of ClusterResourceSets and their resources. - items: - description: ResourceSetBinding keeps info on all of the resources - in a ClusterResourceSet. - properties: - clusterResourceSetName: - description: clusterResourceSetName is the name of the ClusterResourceSet - that is applied to the owner cluster of the binding. - type: string - resources: - description: resources is a list of resources that the ClusterResourceSet - has. - items: - description: ResourceBinding shows the status of a resource - that belongs to a ClusterResourceSet matched by the owner - cluster of the ClusterResourceSetBinding object. - properties: - applied: - description: applied is to track if a resource is applied - to the cluster or not. - type: boolean - hash: - description: |- - hash is the hash of a resource's data. This can be used to decide if a resource is changed. - For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change. - type: string - kind: - description: 'kind of the resource. Supported kinds are: - Secrets and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - lastAppliedTime: - description: lastAppliedTime identifies when this resource - was last applied to the cluster. - format: date-time - type: string - name: - description: name of the resource that is in the same - namespace with ClusterResourceSet object. - minLength: 1 - type: string - required: - - applied - - kind - - name - type: object - type: array - required: - - clusterResourceSetName - type: object - type: array - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Time duration since creation of ClusterResourceSetBinding - jsonPath: .metadata.creationTimestamp - name: Age - type: date name: v1beta1 schema: openAPIV3Schema: @@ -3153,16 +5672,129 @@ spec: type: object type: object served: true - storage: true + storage: false subresources: status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Time duration since creation of ClusterResourceSetBinding + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: ClusterResourceSetBinding lists all matching ClusterResourceSets + with the cluster it belongs to. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of ClusterResourceSetBinding. + properties: + bindings: + description: bindings is a list of ClusterResourceSets and their resources. + items: + description: ResourceSetBinding keeps info on all of the resources + in a ClusterResourceSet. + properties: + clusterResourceSetName: + description: clusterResourceSetName is the name of the ClusterResourceSet + that is applied to the owner cluster of the binding. + maxLength: 253 + minLength: 1 + type: string + resources: + description: resources is a list of resources that the ClusterResourceSet + has. + items: + description: ResourceBinding shows the status of a resource + that belongs to a ClusterResourceSet matched by the owner + cluster of the ClusterResourceSetBinding object. + properties: + applied: + description: applied is to track if a resource is applied + to the cluster or not. + type: boolean + hash: + description: |- + hash is the hash of a resource's data. This can be used to decide if a resource is changed. + For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change. + maxLength: 256 + minLength: 1 + type: string + kind: + description: 'kind of the resource. Supported kinds are: + Secrets and ConfigMaps.' + enum: + - Secret + - ConfigMap + type: string + lastAppliedTime: + description: lastAppliedTime identifies when this resource + was last applied to the cluster. + format: date-time + type: string + name: + description: name of the resource that is in the same + namespace with ClusterResourceSet object. + maxLength: 253 + minLength: 1 + type: string + required: + - applied + - kind + - name + type: object + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + required: + - clusterResourceSetName + type: object + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + clusterName: + description: clusterName is the name of the Cluster this binding applies + to. + maxLength: 63 + minLength: 1 + type: string + required: + - clusterName + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: clusterresourcesets.addons.cluster.x-k8s.io @@ -3177,7 +5809,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: addons.cluster.x-k8s.io names: categories: @@ -3188,353 +5819,12 @@ spec: singular: clusterresourceset scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - ClusterResourceSet is the Schema for the clusterresourcesets API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of ClusterResourceSet. - properties: - clusterSelector: - description: |- - clusterSelector is the label selector for Clusters. The Clusters that are - selected by this will be the ones affected by this ClusterResourceSet. - It must match the Cluster labels. This field is immutable. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - resources: - description: resources is a list of Secrets/ConfigMaps where each - contains 1 or more resources to be applied to remote clusters. - items: - description: ResourceRef specifies a resource. - properties: - kind: - description: 'kind of the resource. Supported kinds are: Secrets - and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - name: - description: name of the resource that is in the same namespace - with ClusterResourceSet object. - minLength: 1 - type: string - required: - - kind - - name - type: object - type: array - strategy: - description: strategy is the strategy to be used during applying resources. - Defaults to ApplyOnce. This field is immutable. - enum: - - ApplyOnce - type: string - required: - - clusterSelector - type: object - status: - description: status is the observed state of ClusterResourceSet. - properties: - conditions: - description: conditions defines current state of the ClusterResourceSet. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - observedGeneration: - description: observedGeneration reflects the generation of the most - recently observed ClusterResourceSet. - format: int64 - type: integer - type: object - type: object - served: false - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Time duration since creation of ClusterResourceSet jsonPath: .metadata.creationTimestamp name: Age type: date deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - ClusterResourceSet is the Schema for the clusterresourcesets API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of ClusterResourceSet. - properties: - clusterSelector: - description: |- - clusterSelector is the label selector for Clusters. The Clusters that are - selected by this will be the ones affected by this ClusterResourceSet. - It must match the Cluster labels. This field is immutable. - Label selector cannot be empty. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - resources: - description: resources is a list of Secrets/ConfigMaps where each - contains 1 or more resources to be applied to remote clusters. - items: - description: ResourceRef specifies a resource. - properties: - kind: - description: 'kind of the resource. Supported kinds are: Secrets - and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - name: - description: name of the resource that is in the same namespace - with ClusterResourceSet object. - minLength: 1 - type: string - required: - - kind - - name - type: object - type: array - strategy: - description: strategy is the strategy to be used during applying resources. - Defaults to ApplyOnce. This field is immutable. - enum: - - ApplyOnce - type: string - required: - - clusterSelector - type: object - status: - description: status is the observed state of ClusterResourceSet. - properties: - conditions: - description: conditions defines current state of the ClusterResourceSet. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - observedGeneration: - description: observedGeneration reflects the generation of the most - recently observed ClusterResourceSet. - format: int64 - type: integer - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Time duration since creation of ClusterResourceSet - jsonPath: .metadata.creationTimestamp - name: Age - type: date name: v1beta1 schema: openAPIV3Schema: @@ -3779,6 +6069,284 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Resource applied + jsonPath: .status.conditions[?(@.type=="ResourcesApplied")].status + name: Applied + type: string + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: Time duration since creation of ClusterResourceSet + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: |- + ClusterResourceSet is the Schema for the clusterresourcesets API. + For advanced use cases an add-on provider should be used instead. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of ClusterResourceSet. + properties: + clusterSelector: + description: |- + clusterSelector is the label selector for Clusters. The Clusters that are + selected by this will be the ones affected by this ClusterResourceSet. + It must match the Cluster labels. This field is immutable. + Label selector cannot be empty. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: resources is a list of Secrets/ConfigMaps where each + contains 1 or more resources to be applied to remote clusters. + items: + description: ResourceRef specifies a resource. + properties: + kind: + description: 'kind of the resource. Supported kinds are: Secrets + and ConfigMaps.' + enum: + - Secret + - ConfigMap + type: string + name: + description: name of the resource that is in the same namespace + with ClusterResourceSet object. + maxLength: 253 + minLength: 1 + type: string + required: + - kind + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + strategy: + description: strategy is the strategy to be used during applying resources. + Defaults to ApplyOnce. This field is immutable. + enum: + - ApplyOnce + - Reconcile + type: string + required: + - clusterSelector + - resources + type: object + status: + description: status is the observed state of ClusterResourceSet. + minProperties: 1 + properties: + conditions: + description: |- + conditions represents the observations of a ClusterResourceSet's current state. + Known condition types are ResourcesApplied. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + conditions: + description: |- + conditions defines current state of the ClusterResourceSet. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + type: object + type: object + observedGeneration: + description: observedGeneration reflects the generation of the most + recently observed ClusterResourceSet. + format: int64 + minimum: 1 + type: integer + type: object + required: + - spec + type: object + served: true storage: true subresources: status: {} @@ -3788,7 +6356,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: clusters.cluster.x-k8s.io @@ -3803,7 +6371,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -3816,702 +6383,6 @@ spec: singular: cluster scope: Namespaced versions: - - additionalPrinterColumns: - - description: Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed - jsonPath: .status.phase - name: Phase - type: string - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: Cluster is the Schema for the clusters API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of Cluster. - properties: - clusterNetwork: - description: clusterNetwork is the cluster network configuration. - properties: - apiServerPort: - description: |- - apiServerPort specifies the port the API Server should bind to. - Defaults to 6443. - format: int32 - type: integer - pods: - description: pods is the network ranges from which Pod networks - are allocated. - properties: - cidrBlocks: - description: cidrBlocks is a list of CIDR blocks. - items: - type: string - type: array - required: - - cidrBlocks - type: object - serviceDomain: - description: serviceDomain is the domain name for services. - type: string - services: - description: services is the network ranges from which service - VIPs are allocated. - properties: - cidrBlocks: - description: cidrBlocks is a list of CIDR blocks. - items: - type: string - type: array - required: - - cidrBlocks - type: object - type: object - controlPlaneEndpoint: - description: controlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: host is the hostname on which the API server is serving. - type: string - port: - description: port is the port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - controlPlaneRef: - description: |- - controlPlaneRef is an optional reference to a provider-specific resource that holds - the details for provisioning the Control Plane for a Cluster. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - infrastructureRef: - description: |- - infrastructureRef is a reference to a provider-specific resource that holds the details - for provisioning infrastructure for a cluster in said provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - paused: - description: paused can be used to prevent controllers from processing - the Cluster and all its associated objects. - type: boolean - type: object - status: - description: status is the observed state of Cluster. - properties: - conditions: - description: conditions defines current service state of the cluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - controlPlaneInitialized: - description: controlPlaneInitialized defines if the control plane - has been initialized. - type: boolean - controlPlaneReady: - description: controlPlaneReady defines if the control plane is ready. - type: boolean - failureDomains: - additionalProperties: - description: |- - FailureDomainSpec is the Schema for Cluster API failure domains. - It allows controllers to understand how many failure domains a cluster can optionally span across. - properties: - attributes: - additionalProperties: - type: string - description: attributes is a free form map of attributes an - infrastructure provider might use or require. - type: object - controlPlane: - description: controlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean - type: object - description: failureDomains is a slice of failure domain objects synced - from the infrastructure provider. - type: object - failureMessage: - description: |- - failureMessage indicates that there is a fatal problem reconciling the - state, and will be set to a descriptive error message. - type: string - failureReason: - description: |- - failureReason indicates that there is a fatal problem reconciling the - state, and will be set to a token value suitable for - programmatic interpretation. - type: string - infrastructureReady: - description: infrastructureReady is the state of the infrastructure - provider. - type: boolean - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - phase: - description: |- - phase represents the current phase of cluster actuation. - E.g. Pending, Running, Terminating, Failed etc. - type: string - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Time duration since creation of Cluster - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed - jsonPath: .status.phase - name: Phase - type: string - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - Cluster is the Schema for the clusters API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of Cluster. - properties: - clusterNetwork: - description: clusterNetwork is the cluster network configuration. - properties: - apiServerPort: - description: |- - apiServerPort specifies the port the API Server should bind to. - Defaults to 6443. - format: int32 - type: integer - pods: - description: pods is the network ranges from which Pod networks - are allocated. - properties: - cidrBlocks: - description: cidrBlocks is a list of CIDR blocks. - items: - type: string - type: array - required: - - cidrBlocks - type: object - serviceDomain: - description: serviceDomain is the domain name for services. - type: string - services: - description: services is the network ranges from which service - VIPs are allocated. - properties: - cidrBlocks: - description: cidrBlocks is a list of CIDR blocks. - items: - type: string - type: array - required: - - cidrBlocks - type: object - type: object - controlPlaneEndpoint: - description: controlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: host is the hostname on which the API server is serving. - type: string - port: - description: port is the port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - controlPlaneRef: - description: |- - controlPlaneRef is an optional reference to a provider-specific resource that holds - the details for provisioning the Control Plane for a Cluster. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - infrastructureRef: - description: |- - infrastructureRef is a reference to a provider-specific resource that holds the details - for provisioning infrastructure for a cluster in said provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - paused: - description: paused can be used to prevent controllers from processing - the Cluster and all its associated objects. - type: boolean - topology: - description: |- - topology encapsulates the topology for the cluster. - NOTE: It is required to enable the ClusterTopology - feature gate flag to activate managed topologies support; - this feature is highly experimental, and parts of it might still be not implemented. - properties: - class: - description: class is the name of the ClusterClass object to create - the topology. - type: string - controlPlane: - description: controlPlane describes the cluster control plane. - properties: - metadata: - description: |- - metadata is the metadata applied to the machines of the ControlPlane. - At runtime this metadata is merged with the corresponding metadata from the ClusterClass. - - This field is supported if and only if the control plane provider template - referenced in the ClusterClass is Machine based. - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - type: object - replicas: - description: |- - replicas is the number of control plane nodes. - If the value is nil, the ControlPlane object is created without the number of Replicas - and it's assumed that the control plane controller does not implement support for this field. - When specified against a control plane provider that lacks support for this field, this value will be ignored. - format: int32 - type: integer - type: object - rolloutAfter: - description: |- - rolloutAfter performs a rollout of the entire cluster one component at a time, - control plane first and then machine deployments. - format: date-time - type: string - version: - description: version is the Kubernetes version of the cluster. - type: string - workers: - description: |- - workers encapsulates the different constructs that form the worker nodes - for the cluster. - properties: - machineDeployments: - description: machineDeployments is a list of machine deployments - in the cluster. - items: - description: |- - MachineDeploymentTopology specifies the different parameters for a set of worker nodes in the topology. - This set of nodes is managed by a MachineDeployment object whose lifecycle is managed by the Cluster controller. - properties: - class: - description: |- - class is the name of the MachineDeploymentClass used to create the set of worker nodes. - This should match one of the deployment classes defined in the ClusterClass object - mentioned in the `Cluster.Spec.Class` field. - type: string - metadata: - description: |- - metadata is the metadata applied to the machines of the MachineDeployment. - At runtime this metadata is merged with the corresponding metadata from the ClusterClass. - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - type: object - name: - description: |- - name is the unique identifier for this MachineDeploymentTopology. - The value is used with other unique identifiers to create a MachineDeployment's Name - (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, - the values are hashed together. - type: string - replicas: - description: |- - replicas is the number of worker nodes belonging to this set. - If the value is nil, the MachineDeployment is created without the number of Replicas (defaulting to zero) - and it's assumed that an external entity (like cluster autoscaler) is responsible for the management - of this value. - format: int32 - type: integer - required: - - class - - name - type: object - type: array - type: object - required: - - class - - version - type: object - type: object - status: - description: status is the observed state of Cluster. - properties: - conditions: - description: conditions defines current service state of the cluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - controlPlaneReady: - description: controlPlaneReady defines if the control plane is ready. - type: boolean - failureDomains: - additionalProperties: - description: |- - FailureDomainSpec is the Schema for Cluster API failure domains. - It allows controllers to understand how many failure domains a cluster can optionally span across. - properties: - attributes: - additionalProperties: - type: string - description: attributes is a free form map of attributes an - infrastructure provider might use or require. - type: object - controlPlane: - description: controlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean - type: object - description: failureDomains is a slice of failure domain objects synced - from the infrastructure provider. - type: object - failureMessage: - description: |- - failureMessage indicates that there is a fatal problem reconciling the - state, and will be set to a descriptive error message. - type: string - failureReason: - description: |- - failureReason indicates that there is a fatal problem reconciling the - state, and will be set to a token value suitable for - programmatic interpretation. - type: string - infrastructureReady: - description: infrastructureReady is the state of the infrastructure - provider. - type: boolean - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - phase: - description: |- - phase represents the current phase of cluster actuation. - E.g. Pending, Running, Terminating, Failed etc. - type: string - type: object - type: object - served: false - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: ClusterClass of this Cluster, empty if the Cluster is not using a ClusterClass @@ -4530,6 +6401,7 @@ spec: jsonPath: .spec.topology.version name: Version type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -4652,9 +6524,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneRef: description: |- @@ -4754,8 +6623,7 @@ spec: description: |- topology encapsulates the topology for the cluster. NOTE: It is required to enable the ClusterTopology - feature gate flag to activate managed topologies support; - this feature is highly experimental, and parts of it might still be not implemented. + feature gate flag to activate managed topologies support. properties: class: description: class is the name of the ClusterClass object to create @@ -4765,12 +6633,14 @@ spec: type: string classNamespace: description: |- - classNamespace is the namespace of the ClusterClass object to create the topology. - If the namespace is empty or not set, it is defaulted to the namespace of the cluster object. - Value must follow the DNS1123Subdomain syntax. - maxLength: 253 + classNamespace is the namespace of the ClusterClass that should be used for the topology. + If classNamespace is empty or not set, it is defaulted to the namespace of the Cluster object. + classNamespace must be a valid namespace name and because of that be at most 63 characters in length + and it must consist only of lower case alphanumeric characters or hyphens (-), and must start + and end with an alphanumeric character. + maxLength: 63 minLength: 1 - pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*$ + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string controlPlane: description: controlPlane describes the cluster control plane. @@ -4899,6 +6769,51 @@ spec: type: object maxItems: 100 type: array + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeout: + description: |- + timeout is the duration that a Machine must be in a given status for, + after which the Machine is considered unhealthy. + For example, with a value of "1h", the Machine must match the status + for at least 1 hour before being considered unhealthy. + type: string + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, + HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeout + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyRange: description: |- unhealthyRange specifies the range of unhealthy machines allowed. @@ -5007,6 +6922,84 @@ spec: When specified against a control plane provider that lacks support for this field, this value will be ignored. format: int32 type: integer + rollout: + description: rollout allows you to configure the behavior + of rolling updates to the control plane. + minProperties: 1 + properties: + after: + description: |- + after is a field to indicate a rollout should be performed + after the specified time even if no changes have been made to the ControlPlane. + Example: In the YAML the time can be specified in the RFC3339 format. + To specify the rolloutAfter target as March 9, 2023, at 9 am UTC + use "2023-03-09T09:00:00Z". + format: date-time + type: string + type: object + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map variables: description: variables can be used to customize the ControlPlane through patches. @@ -5258,6 +7251,52 @@ spec: type: object maxItems: 100 type: array + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one + of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeout: + description: |- + timeout is the duration that a Machine must be in a given status for, + after which the Machine is considered unhealthy. + For example, with a value of "1h", the Machine must match the status + for at least 1 hour before being considered unhealthy. + type: string + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, + Available, HealthCheckSucceeded, OwnerRemediated, + ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeout + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyRange: description: |- unhealthyRange specifies the range of unhealthy machines allowed. @@ -5380,6 +7419,23 @@ spec: of this value. format: int32 type: integer + rollout: + description: |- + rollout allows you to configure the behaviour of rolling updates to the MachineDeployment Machines. + It allows you to define the strategy used during rolling replacements. + minProperties: 1 + properties: + after: + description: |- + after is a field to indicate a rollout should be performed + after the specified time even if no changes have been made to the + MachineDeployment. + Example: In the YAML the time can be specified in the RFC3339 format. + To specify the rolloutAfter target as March 9, 2023, at 9 am UTC + use "2023-03-09T09:00:00Z". + format: date-time + type: string + type: object strategy: description: |- strategy is the deployment strategy to use to replace existing machines with @@ -5419,7 +7475,7 @@ spec: deletePolicy: description: |- deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. - Valid values are "Random, "Newest", "Oldest" + Valid values are "Random", "Newest", "Oldest" When no value is supplied, the default DeletePolicy of MachineSet is used enum: - Random @@ -5473,6 +7529,71 @@ spec: - OnDelete type: string type: object + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent + to corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. + Valid values are NoSchedule, PreferNoSchedule + and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map variables: description: variables can be used to customize the MachineDeployment through patches. @@ -5618,6 +7739,71 @@ spec: of this value. format: int32 type: integer + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent + to corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. + Valid values are NoSchedule, PreferNoSchedule + and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map variables: description: variables can be used to customize the MachinePool through patches. @@ -5765,7 +7951,7 @@ spec: failureMessage indicates that there is a fatal problem reconciling the state, and will be set to a descriptive error message. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. maxLength: 10240 minLength: 1 type: string @@ -5775,7 +7961,7 @@ spec: state, and will be set to a token value suitable for programmatic interpretation. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string infrastructureReady: description: infrastructureReady is the state of the infrastructure @@ -5899,6 +8085,56 @@ spec: up-to-date when Machine's UpToDate condition is true. format: int32 type: integer + upgradePlan: + description: |- + upgradePlan reports the list of versions that would be applied to the control plane object according to the upgrade plan. + Note: + - This field is set only when the Cluster topology is managed by Cluster API and a Cluster upgrade is in progress. + - Once a version is applied to the control plane object, it is removed from the list (after a version + is applied to a control plane object, it might take some time for the actual upgrade to complete) + - During a chained upgrade, the upgrade plan is continuously re-computed, and this field will + report only the last known upgrade plan. + items: + description: StatusUpgradePlanVersion groups upgrade plan + version-related status information. + properties: + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + versions: + description: versions is the aggregated Kubernetes versions + in this control plane. + items: + description: StatusVersion groups version-related status + information. + properties: + replicas: + description: replicas is the number of replicas at this + version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic type: object workers: description: workers groups all the observations about Cluster's @@ -5933,11 +8169,2091 @@ spec: up-to-date when Machine's UpToDate condition is true. format: int32 type: integer + upgradePlan: + description: |- + upgradePlan reports the list of versions that would be applied to the worker objects (all MachineDeployments and MachinePools). + Note: + - This field is set only when the Cluster topology is managed by Cluster API and a Cluster upgrade is in progress. + - Once a version is applied to the worker objects, it is removed from the list (after a version + is applied to a worker object, it might take some time for the actual upgrade to complete) + - During a chained upgrade, the upgrade plan is continuously re-computed, and this field will + report only the last known upgrade plan. + items: + description: StatusUpgradePlanVersion groups upgrade plan + version-related status information. + properties: + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + versions: + description: versions is the aggregated Kubernetes versions + in cluster workers. + items: + description: StatusVersion groups version-related status + information. + properties: + replicas: + description: replicas is the number of replicas at this + version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic type: object type: object type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: ClusterClass of this Cluster, empty if the Cluster is not using + a ClusterClass + jsonPath: .spec.topology.classRef.name + name: ClusterClass + type: string + - description: Cluster pass all availability checks + jsonPath: .status.conditions[?(@.type=="Available")].status + name: Available + type: string + - description: The desired number of control plane machines + jsonPath: .status.controlPlane.desiredReplicas + name: CP Desired + type: integer + - description: The number of control plane machines + jsonPath: .status.controlPlane.replicas + name: CP Current + priority: 10 + type: integer + - description: The number of control plane machines with Ready condition true + jsonPath: .status.controlPlane.readyReplicas + name: CP Ready + priority: 10 + type: integer + - description: The number of control plane machines with Available condition true + jsonPath: .status.controlPlane.availableReplicas + name: CP Available + type: integer + - description: The number of control plane machines with UpToDate condition true + jsonPath: .status.controlPlane.upToDateReplicas + name: CP Up-to-date + type: integer + - description: The desired number of worker machines + jsonPath: .status.workers.desiredReplicas + name: W Desired + type: integer + - description: The number of worker machines + jsonPath: .status.workers.replicas + name: W Current + priority: 10 + type: integer + - description: The number of worker machines with Ready condition true + jsonPath: .status.workers.readyReplicas + name: W Ready + priority: 10 + type: integer + - description: The number of worker machines with Available condition true + jsonPath: .status.workers.availableReplicas + name: W Available + type: integer + - description: The number of worker machines with UpToDate condition true + jsonPath: .status.workers.upToDateReplicas + name: W Up-to-date + type: integer + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed + jsonPath: .status.phase + name: Phase + type: string + - description: Time duration since creation of Cluster + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Kubernetes version associated with this Cluster + jsonPath: .spec.topology.version + name: Version + type: string + name: v1beta2 + schema: + openAPIV3Schema: + description: Cluster is the Schema for the clusters API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of Cluster. + minProperties: 1 + properties: + availabilityGates: + description: |- + availabilityGates specifies additional conditions to include when evaluating Cluster Available condition. + + If this field is not defined and the Cluster implements a managed topology, availabilityGates + from the corresponding ClusterClass will be used, if any. + items: + description: ClusterAvailabilityGate contains the type of a Cluster + condition to be used as availability gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Cluster's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as availability gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this availabilityGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + clusterNetwork: + description: clusterNetwork represents the cluster network configuration. + minProperties: 1 + properties: + apiServerPort: + description: |- + apiServerPort specifies the port the API Server should bind to. + Defaults to 6443. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + pods: + description: pods is the network ranges from which Pod networks + are allocated. + properties: + cidrBlocks: + description: cidrBlocks is a list of CIDR blocks. + items: + maxLength: 43 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + required: + - cidrBlocks + type: object + serviceDomain: + description: serviceDomain is the domain name for services. + maxLength: 253 + minLength: 1 + type: string + services: + description: services is the network ranges from which service + VIPs are allocated. + properties: + cidrBlocks: + description: cidrBlocks is a list of CIDR blocks. + items: + maxLength: 43 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + required: + - cidrBlocks + type: object + type: object + controlPlaneEndpoint: + description: controlPlaneEndpoint represents the endpoint used to + communicate with the control plane. + minProperties: 1 + properties: + host: + description: host is the hostname on which the API server is serving. + maxLength: 512 + minLength: 1 + type: string + port: + description: port is the port on which the API server is serving. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + type: object + controlPlaneRef: + description: |- + controlPlaneRef is an optional reference to a provider-specific resource that holds + the details for provisioning the Control Plane for a Cluster. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + infrastructureRef: + description: |- + infrastructureRef is a reference to a provider-specific resource that holds the details + for provisioning infrastructure for a cluster in said provider. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + paused: + description: paused can be used to prevent controllers from processing + the Cluster and all its associated objects. + type: boolean + topology: + description: |- + topology encapsulates the topology for the cluster. + NOTE: It is required to enable the ClusterTopology + feature gate flag to activate managed topologies support. + properties: + classRef: + description: classRef is the ref to the ClusterClass that should + be used for the topology. + properties: + name: + description: |- + name is the name of the ClusterClass that should be used for the topology. + name must be a valid ClusterClass name and because of that be at most 253 characters in length + and it must consist only of lower case alphanumeric characters, hyphens (-) and periods (.), and must start + and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + namespace: + description: |- + namespace is the namespace of the ClusterClass that should be used for the topology. + If namespace is empty or not set, it is defaulted to the namespace of the Cluster object. + namespace must be a valid namespace name and because of that be at most 63 characters in length + and it must consist only of lower case alphanumeric characters or hyphens (-), and must start + and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - name + type: object + controlPlane: + description: controlPlane describes the cluster control plane. + minProperties: 1 + properties: + deletion: + description: deletion contains configuration options for Machine + deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + format: int32 + minimum: 0 + type: integer + type: object + healthCheck: + description: |- + healthCheck allows to enable, disable and override control plane health check + configuration from the ClusterClass for this control plane. + minProperties: 1 + properties: + checks: + description: |- + checks are the checks that are used to evaluate if a Machine is healthy. + + If one of checks and remediation fields are set, the system assumes that an healthCheck override is defined, + and as a consequence the checks and remediation fields from Cluster will be used instead of the + corresponding fields in ClusterClass. + + Independent of this configuration the MachineHealthCheck controller will always + flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and + Machines with deleted Nodes as unhealthy. + + Furthermore, if checks.nodeStartupTimeoutSeconds is not set it + is defaulted to 10 minutes and evaluated accordingly. + minProperties: 1 + properties: + nodeStartupTimeoutSeconds: + description: |- + nodeStartupTimeoutSeconds allows to set the maximum time for MachineHealthCheck + to consider a Machine unhealthy if a corresponding Node isn't associated + through a `Spec.ProviderID` field. + + The duration set in this field is compared to the greatest of: + - Cluster's infrastructure ready condition timestamp (if and when available) + - Control Plane's initialized condition timestamp (if and when available) + - Machine's infrastructure ready condition timestamp (if and when available) + - Machine's metadata creation timestamp + + Defaults to 10 minutes. + If you wish to disable this feature, set the value explicitly to 0. + format: int32 + minimum: 0 + type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of + True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, + Available, HealthCheckSucceeded, OwnerRemediated, + ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + unhealthyNodeConditions: + description: |- + unhealthyNodeConditions contains a list of conditions that determine + whether a node is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the node is unhealthy. + items: + description: |- + UnhealthyNodeCondition represents a Node condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a node is considered unhealthy. + properties: + status: + description: status of the condition, one of + True, False, Unknown. + minLength: 1 + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a node must be in a given status for, + after which the node is considered unhealthy. + For example, with a value of "3600", the node must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Node condition + minLength: 1 + type: string + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + enabled: + description: |- + enabled controls if a MachineHealthCheck should be created for the target machines. + + If false: No MachineHealthCheck will be created. + + If not set(default): A MachineHealthCheck will be created if it is defined here or + in the associated ClusterClass. If no MachineHealthCheck is defined then none will be created. + + If true: A MachineHealthCheck is guaranteed to be created. Cluster validation will + block if `enable` is true and no MachineHealthCheck definition is available. + type: boolean + remediation: + description: |- + remediation configures if and how remediations are triggered if a Machine is unhealthy. + + If one of checks and remediation fields are set, the system assumes that an healthCheck override is defined, + and as a consequence the checks and remediation fields from cluster will be used instead of the + corresponding fields in ClusterClass. + + If an health check override is defined and remediation or remediation.triggerIf is not set, + remediation will always be triggered for unhealthy Machines. + + If an health check override is defined and remediation or remediation.templateRef is not set, + the OwnerRemediated condition will be set on unhealthy Machines to trigger remediation via + the owner of the Machines, for example a MachineSet or a KubeadmControlPlane. + minProperties: 1 + properties: + templateRef: + description: |- + templateRef is a reference to a remediation template + provided by an infrastructure provider. + + This field is completely optional, when filled, the MachineHealthCheck controller + creates a new object from the template referenced and hands off remediation of the machine to + a controller that lives outside of Cluster API. + properties: + apiVersion: + description: |- + apiVersion of the remediation template. + apiVersion must be fully qualified domain name followed by / and a version. + NOTE: This field must be kept in sync with the APIVersion of the remediation template. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the remediation template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the remediation template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + triggerIf: + description: |- + triggerIf configures if remediations are triggered. + If this field is not set, remediations are always triggered. + minProperties: 1 + properties: + unhealthyInRange: + description: |- + unhealthyInRange specifies that remediations are only triggered if the number of + unhealthy Machines is in the configured range. + Takes precedence over unhealthyLessThanOrEqualTo. + Eg. "[3-5]" - This means that remediation will be allowed only when: + (a) there are at least 3 unhealthy Machines (and) + (b) there are at most 5 unhealthy Machines + maxLength: 32 + minLength: 1 + pattern: ^\[[0-9]+-[0-9]+\]$ + type: string + unhealthyLessThanOrEqualTo: + anyOf: + - type: integer + - type: string + description: |- + unhealthyLessThanOrEqualTo specifies that remediations are only triggered if the number of + unhealthy Machines is less than or equal to the configured value. + unhealthyInRange takes precedence if set. + x-kubernetes-int-or-string: true + type: object + type: object + type: object + metadata: + description: |- + metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane + if the ControlPlaneTemplate referenced by the ClusterClass is machine based. If not, it + is applied only to the ControlPlane. + At runtime this metadata is merged with the corresponding metadata from the ClusterClass. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready + computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine. + + If this field is not defined, readinessGates from the corresponding ControlPlaneClass will be used, if any. + + NOTE: Specific control plane provider implementations might automatically extend the list of readinessGates; + e.g. the kubeadm control provider adds ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc. + items: + description: MachineReadinessGate contains the type of a + Machine condition to be used as a readiness gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + replicas: + description: |- + replicas is the number of control plane nodes. + If the value is not set, the ControlPlane object is created without the number of Replicas + and it's assumed that the control plane controller does not implement support for this field. + When specified against a control plane provider that lacks support for this field, this value will be ignored. + format: int32 + type: integer + rollout: + description: rollout allows you to configure the behavior + of rolling updates to the control plane. + minProperties: 1 + properties: + after: + description: |- + after is a field to indicate a rollout should be performed + after the specified time even if no changes have been made to the ControlPlane. + Example: In the YAML the time can be specified in the RFC3339 format. + To specify the rolloutAfter target as March 9, 2023, at 9 am UTC + use "2023-03-09T09:00:00Z". + format: date-time + type: string + type: object + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + variables: + description: variables can be used to customize the ControlPlane + through patches. + minProperties: 1 + properties: + overrides: + description: overrides can be used to override Cluster + level variables. + items: + description: |- + ClusterVariable can be used to customize the Cluster through patches. Each ClusterVariable is associated with a + Variable definition in the ClusterClass `status` variables. + properties: + name: + description: name of the variable. + maxLength: 256 + minLength: 1 + type: string + value: + description: |- + value of the variable. + Note: the value will be validated against the schema of the corresponding ClusterClassVariable + from the ClusterClass. + Note: We have to use apiextensionsv1.JSON instead of a custom JSON type, because controller-tools has a + hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type via controller-tools, + i.e. it is not possible to have no type field. + Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111 + x-kubernetes-preserve-unknown-fields: true + required: + - name + - value + type: object + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + type: object + variables: + description: |- + variables can be used to customize the Cluster through + patches. They must comply to the corresponding + VariableClasses defined in the ClusterClass. + items: + description: |- + ClusterVariable can be used to customize the Cluster through patches. Each ClusterVariable is associated with a + Variable definition in the ClusterClass `status` variables. + properties: + name: + description: name of the variable. + maxLength: 256 + minLength: 1 + type: string + value: + description: |- + value of the variable. + Note: the value will be validated against the schema of the corresponding ClusterClassVariable + from the ClusterClass. + Note: We have to use apiextensionsv1.JSON instead of a custom JSON type, because controller-tools has a + hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type via controller-tools, + i.e. it is not possible to have no type field. + Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111 + x-kubernetes-preserve-unknown-fields: true + required: + - name + - value + type: object + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + version: + description: version is the Kubernetes version of the cluster. + maxLength: 256 + minLength: 1 + type: string + workers: + description: |- + workers encapsulates the different constructs that form the worker nodes + for the cluster. + minProperties: 1 + properties: + machineDeployments: + description: machineDeployments is a list of machine deployments + in the cluster. + items: + description: |- + MachineDeploymentTopology specifies the different parameters for a set of worker nodes in the topology. + This set of nodes is managed by a MachineDeployment object whose lifecycle is managed by the Cluster controller. + properties: + class: + description: |- + class is the name of the MachineDeploymentClass used to create the set of worker nodes. + This should match one of the deployment classes defined in the ClusterClass object + mentioned in the `Cluster.Spec.Class` field. + maxLength: 256 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options + for Machine deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + format: int32 + minimum: 0 + type: integer + order: + description: |- + order defines the order in which Machines are deleted when downscaling. + Defaults to "Random". Valid values are "Random", "Newest", "Oldest" + enum: + - Random + - Newest + - Oldest + type: string + type: object + failureDomain: + description: |- + failureDomain is the failure domain the machines will be created in. + Must match a key in the FailureDomains map stored on the cluster object. + maxLength: 256 + minLength: 1 + type: string + healthCheck: + description: |- + healthCheck allows to enable, disable and override MachineDeployment health check + configuration from the ClusterClass for this MachineDeployment. + minProperties: 1 + properties: + checks: + description: |- + checks are the checks that are used to evaluate if a Machine is healthy. + + If one of checks and remediation fields are set, the system assumes that an healthCheck override is defined, + and as a consequence the checks and remediation fields from Cluster will be used instead of the + corresponding fields in ClusterClass. + + Independent of this configuration the MachineHealthCheck controller will always + flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and + Machines with deleted Nodes as unhealthy. + + Furthermore, if checks.nodeStartupTimeoutSeconds is not set it + is defaulted to 10 minutes and evaluated accordingly. + minProperties: 1 + properties: + nodeStartupTimeoutSeconds: + description: |- + nodeStartupTimeoutSeconds allows to set the maximum time for MachineHealthCheck + to consider a Machine unhealthy if a corresponding Node isn't associated + through a `Spec.ProviderID` field. + + The duration set in this field is compared to the greatest of: + - Cluster's infrastructure ready condition timestamp (if and when available) + - Control Plane's initialized condition timestamp (if and when available) + - Machine's infrastructure ready condition timestamp (if and when available) + - Machine's metadata creation timestamp + + Defaults to 10 minutes. + If you wish to disable this feature, set the value explicitly to 0. + format: int32 + minimum: 0 + type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, + one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, + Available, HealthCheckSucceeded, OwnerRemediated, + ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + unhealthyNodeConditions: + description: |- + unhealthyNodeConditions contains a list of conditions that determine + whether a node is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the node is unhealthy. + items: + description: |- + UnhealthyNodeCondition represents a Node condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a node is considered unhealthy. + properties: + status: + description: status of the condition, + one of True, False, Unknown. + minLength: 1 + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a node must be in a given status for, + after which the node is considered unhealthy. + For example, with a value of "3600", the node must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Node condition + minLength: 1 + type: string + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + enabled: + description: |- + enabled controls if a MachineHealthCheck should be created for the target machines. + + If false: No MachineHealthCheck will be created. + + If not set(default): A MachineHealthCheck will be created if it is defined here or + in the associated ClusterClass. If no MachineHealthCheck is defined then none will be created. + + If true: A MachineHealthCheck is guaranteed to be created. Cluster validation will + block if `enable` is true and no MachineHealthCheck definition is available. + type: boolean + remediation: + description: |- + remediation configures if and how remediations are triggered if a Machine is unhealthy. + + If one of checks and remediation fields are set, the system assumes that an healthCheck override is defined, + and as a consequence the checks and remediation fields from cluster will be used instead of the + corresponding fields in ClusterClass. + + If an health check override is defined and remediation or remediation.triggerIf is not set, + remediation will always be triggered for unhealthy Machines. + + If an health check override is defined and remediation or remediation.templateRef is not set, + the OwnerRemediated condition will be set on unhealthy Machines to trigger remediation via + the owner of the Machines, for example a MachineSet or a KubeadmControlPlane. + minProperties: 1 + properties: + maxInFlight: + anyOf: + - type: integer + - type: string + description: |- + maxInFlight determines how many in flight remediations should happen at the same time. + + Remediation only happens on the MachineSet with the most current revision, while + older MachineSets (usually present during rollout operations) aren't allowed to remediate. + + Note: In general (independent of remediations), unhealthy machines are always + prioritized during scale down operations over healthy ones. + + MaxInFlight can be set to a fixed number or a percentage. + Example: when this is set to 20%, the MachineSet controller deletes at most 20% of + the desired replicas. + + If not set, remediation is limited to all machines (bounded by replicas) + under the active MachineSet's management. + x-kubernetes-int-or-string: true + templateRef: + description: |- + templateRef is a reference to a remediation template + provided by an infrastructure provider. + + This field is completely optional, when filled, the MachineHealthCheck controller + creates a new object from the template referenced and hands off remediation of the machine to + a controller that lives outside of Cluster API. + properties: + apiVersion: + description: |- + apiVersion of the remediation template. + apiVersion must be fully qualified domain name followed by / and a version. + NOTE: This field must be kept in sync with the APIVersion of the remediation template. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the remediation template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the remediation template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + triggerIf: + description: |- + triggerIf configures if remediations are triggered. + If this field is not set, remediations are always triggered. + minProperties: 1 + properties: + unhealthyInRange: + description: |- + unhealthyInRange specifies that remediations are only triggered if the number of + unhealthy Machines is in the configured range. + Takes precedence over unhealthyLessThanOrEqualTo. + Eg. "[3-5]" - This means that remediation will be allowed only when: + (a) there are at least 3 unhealthy Machines (and) + (b) there are at most 5 unhealthy Machines + maxLength: 32 + minLength: 1 + pattern: ^\[[0-9]+-[0-9]+\]$ + type: string + unhealthyLessThanOrEqualTo: + anyOf: + - type: integer + - type: string + description: |- + unhealthyLessThanOrEqualTo specifies that remediations are only triggered if the number of + unhealthy Machines is less than or equal to the configured value. + unhealthyInRange takes precedence if set. + x-kubernetes-int-or-string: true + type: object + type: object + type: object + metadata: + description: |- + metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. + At runtime this metadata is merged with the corresponding metadata from the ClusterClass. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a newly created machine should + be ready. + Defaults to 0 (machine will be considered available as soon as it + is ready) + format: int32 + minimum: 0 + type: integer + name: + description: |- + name is the unique identifier for this MachineDeploymentTopology. + The value is used with other unique identifiers to create a MachineDeployment's Name + (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, + the values are hashed together. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready + computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine. + + If this field is not defined, readinessGates from the corresponding MachineDeploymentClass will be used, if any. + items: + description: MachineReadinessGate contains the type + of a Machine condition to be used as a readiness + gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + replicas: + description: |- + replicas is the number of worker nodes belonging to this set. + If the value is nil, the MachineDeployment is created without the number of Replicas (defaulting to 1) + and it's assumed that an external entity (like cluster autoscaler) is responsible for the management + of this value. + format: int32 + type: integer + rollout: + description: |- + rollout allows you to configure the behaviour of rolling updates to the MachineDeployment Machines. + It allows you to define the strategy used during rolling replacements. + minProperties: 1 + properties: + after: + description: |- + after is a field to indicate a rollout should be performed + after the specified time even if no changes have been made to the + MachineDeployment. + Example: In the YAML the time can be specified in the RFC3339 format. + To specify the rolloutAfter target as March 9, 2023, at 9 am UTC + use "2023-03-09T09:00:00Z". + format: date-time + type: string + strategy: + description: strategy specifies how to roll out + control plane Machines. + minProperties: 1 + properties: + rollingUpdate: + description: |- + rollingUpdate is the rolling update config params. Present only if + type = RollingUpdate. + minProperties: 1 + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: |- + maxSurge is the maximum number of machines that can be scheduled above the + desired number of machines. + Value can be an absolute number (ex: 5) or a percentage of + desired machines (ex: 10%). + This can not be 0 if MaxUnavailable is 0. + Absolute number is calculated from percentage by rounding up. + Defaults to 1. + Example: when this is set to 30%, the new MachineSet can be scaled + up immediately when the rolling update starts, such that the total + number of old and new machines do not exceed 130% of desired + machines. Once old machines have been killed, new MachineSet can + be scaled up further, ensuring that total number of machines running + at any time during the update is at most 130% of desired machines. + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: |- + maxUnavailable is the maximum number of machines that can be unavailable during the update. + Value can be an absolute number (ex: 5) or a percentage of desired + machines (ex: 10%). + Absolute number is calculated from percentage by rounding down. + This can not be 0 if MaxSurge is 0. + Defaults to 0. + Example: when this is set to 30%, the old MachineSet can be scaled + down to 70% of desired machines immediately when the rolling update + starts. Once new machines are ready, old MachineSet can be scaled + down further, followed by scaling up the new MachineSet, ensuring + that the total number of machines available at all times + during the update is at least 70% of desired machines. + x-kubernetes-int-or-string: true + type: object + type: + description: |- + type of rollout. Allowed values are RollingUpdate and OnDelete. + Default is RollingUpdate. + enum: + - RollingUpdate + - OnDelete + type: string + required: + - type + type: object + type: object + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent + to corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. + Valid values are NoSchedule, PreferNoSchedule + and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + variables: + description: variables can be used to customize the + MachineDeployment through patches. + minProperties: 1 + properties: + overrides: + description: overrides can be used to override Cluster + level variables. + items: + description: |- + ClusterVariable can be used to customize the Cluster through patches. Each ClusterVariable is associated with a + Variable definition in the ClusterClass `status` variables. + properties: + name: + description: name of the variable. + maxLength: 256 + minLength: 1 + type: string + value: + description: |- + value of the variable. + Note: the value will be validated against the schema of the corresponding ClusterClassVariable + from the ClusterClass. + Note: We have to use apiextensionsv1.JSON instead of a custom JSON type, because controller-tools has a + hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type via controller-tools, + i.e. it is not possible to have no type field. + Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111 + x-kubernetes-preserve-unknown-fields: true + required: + - name + - value + type: object + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - class + - name + type: object + maxItems: 2000 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + machinePools: + description: machinePools is a list of machine pools in the + cluster. + items: + description: |- + MachinePoolTopology specifies the different parameters for a pool of worker nodes in the topology. + This pool of nodes is managed by a MachinePool object whose lifecycle is managed by the Cluster controller. + properties: + class: + description: |- + class is the name of the MachinePoolClass used to create the pool of worker nodes. + This should match one of the deployment classes defined in the ClusterClass object + mentioned in the `Cluster.Spec.Class` field. + maxLength: 256 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options + for Machine deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the MachinePool + hosts after the MachinePool is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + format: int32 + minimum: 0 + type: integer + type: object + failureDomains: + description: |- + failureDomains is the list of failure domains the machine pool will be created in. + Must match a key in the FailureDomains map stored on the cluster object. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + metadata: + description: |- + metadata is the metadata applied to the MachinePool. + At runtime this metadata is merged with the corresponding metadata from the ClusterClass. + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a newly created machine pool should + be ready. + Defaults to 0 (machine will be considered available as soon as it + is ready) + format: int32 + minimum: 0 + type: integer + name: + description: |- + name is the unique identifier for this MachinePoolTopology. + The value is used with other unique identifiers to create a MachinePool's Name + (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, + the values are hashed together. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + replicas: + description: |- + replicas is the number of nodes belonging to this pool. + If the value is nil, the MachinePool is created without the number of Replicas (defaulting to 1) + and it's assumed that an external entity (like cluster autoscaler) is responsible for the management + of this value. + format: int32 + type: integer + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent + to corev1.Taint, but additionally having a propagation + field. + properties: + effect: + description: effect is the effect for the taint. + Valid values are NoSchedule, PreferNoSchedule + and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + variables: + description: variables can be used to customize the + MachinePool through patches. + minProperties: 1 + properties: + overrides: + description: overrides can be used to override Cluster + level variables. + items: + description: |- + ClusterVariable can be used to customize the Cluster through patches. Each ClusterVariable is associated with a + Variable definition in the ClusterClass `status` variables. + properties: + name: + description: name of the variable. + maxLength: 256 + minLength: 1 + type: string + value: + description: |- + value of the variable. + Note: the value will be validated against the schema of the corresponding ClusterClassVariable + from the ClusterClass. + Note: We have to use apiextensionsv1.JSON instead of a custom JSON type, because controller-tools has a + hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type via controller-tools, + i.e. it is not possible to have no type field. + Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111 + x-kubernetes-preserve-unknown-fields: true + required: + - name + - value + type: object + maxItems: 1000 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - class + - name + type: object + maxItems: 2000 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - classRef + - version + type: object + type: object + status: + description: status is the observed state of Cluster. + minProperties: 1 + properties: + conditions: + description: |- + conditions represents the observations of a Cluster's current state. + Known condition types are Available, InfrastructureReady, ControlPlaneInitialized, ControlPlaneAvailable, WorkersAvailable, MachinesReady + MachinesUpToDate, RemoteConnectionProbe, ScalingUp, ScalingDown, Remediating, Deleting, Paused. + Additionally, a TopologyReconciled condition will be added in case the Cluster is referencing a ClusterClass / defining a managed Topology. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + controlPlane: + description: controlPlane groups all the observations about Cluster's + ControlPlane current state. + properties: + availableReplicas: + description: availableReplicas is the total number of available + control plane machines in this cluster. A machine is considered + available when Machine's Available condition is true. + format: int32 + type: integer + desiredReplicas: + description: desiredReplicas is the total number of desired control + plane machines in this cluster. + format: int32 + type: integer + readyReplicas: + description: readyReplicas is the total number of ready control + plane machines in this cluster. A machine is considered ready + when Machine's Ready condition is true. + format: int32 + type: integer + replicas: + description: |- + replicas is the total number of control plane machines in this cluster. + NOTE: replicas also includes machines still being provisioned or being deleted. + format: int32 + type: integer + upToDateReplicas: + description: upToDateReplicas is the number of up-to-date control + plane machines in this cluster. A machine is considered up-to-date + when Machine's UpToDate condition is true. + format: int32 + type: integer + upgradePlan: + description: |- + upgradePlan reports the list of versions that would be applied to the control plane object according to the upgrade plan. + Note: + - This field is set only when the Cluster topology is managed by Cluster API and a Cluster upgrade is in progress. + - Once a version is applied to the control plane object, it is removed from the list (after a version + is applied to a control plane object, it might take some time for the actual upgrade to complete) + - During a chained upgrade, the upgrade plan is continuously re-computed, and this field will + report only the last known upgrade plan. + items: + description: StatusUpgradePlanVersion groups upgrade plan version-related + status information. + properties: + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + versions: + description: versions is the aggregated Kubernetes versions in + this control plane. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this + version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + conditions: + description: |- + conditions defines current service state of the cluster. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureMessage: + description: |- + failureMessage indicates that there is a fatal problem reconciling the + state, and will be set to a descriptive error message. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + maxLength: 10240 + minLength: 1 + type: string + failureReason: + description: |- + failureReason indicates that there is a fatal problem reconciling the + state, and will be set to a token value suitable for + programmatic interpretation. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + type: string + type: object + type: object + failureDomains: + description: failureDomains is a slice of failure domain objects synced + from the infrastructure provider. + items: + description: |- + FailureDomain is the Schema for Cluster API failure domains. + It allows controllers to understand how many failure domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: + type: string + description: attributes is a free form map of attributes an + infrastructure provider might use or require. + type: object + controlPlane: + description: controlPlane determines if this failure domain + is suitable for use by control plane machines. + type: boolean + name: + description: name is the name of the failure domain. + maxLength: 256 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + initialization: + description: |- + initialization provides observations of the Cluster initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning. + minProperties: 1 + properties: + controlPlaneInitialized: + description: |- + controlPlaneInitialized denotes when the control plane is functional enough to accept requests. + This information is usually used as a signal for starting all the provisioning operations that depends on + a functional API server, but do not require a full HA control plane to exists, like e.g. join worker Machines, + install core addons like CNI, CPI, CSI etc. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. + The value of this field is never updated after initialization is completed. + type: boolean + infrastructureProvisioned: + description: |- + infrastructureProvisioned is true when the infrastructure provider reports that Cluster's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object + observedGeneration: + description: observedGeneration is the latest generation observed + by the controller. + format: int64 + minimum: 1 + type: integer + phase: + description: phase represents the current phase of cluster actuation. + enum: + - Pending + - Provisioning + - Provisioned + - Deleting + - Failed + - Unknown + type: string + workers: + description: workers groups all the observations about Cluster's Workers + current state. + properties: + availableReplicas: + description: availableReplicas is the total number of available + worker machines in this cluster. A machine is considered available + when Machine's Available condition is true. + format: int32 + type: integer + desiredReplicas: + description: desiredReplicas is the total number of desired worker + machines in this cluster. + format: int32 + type: integer + readyReplicas: + description: readyReplicas is the total number of ready worker + machines in this cluster. A machine is considered ready when + Machine's Ready condition is true. + format: int32 + type: integer + replicas: + description: |- + replicas is the total number of worker machines in this cluster. + NOTE: replicas also includes machines still being provisioned or being deleted. + format: int32 + type: integer + upToDateReplicas: + description: upToDateReplicas is the number of up-to-date worker + machines in this cluster. A machine is considered up-to-date + when Machine's UpToDate condition is true. + format: int32 + type: integer + upgradePlan: + description: |- + upgradePlan reports the list of versions that would be applied to the worker objects (all MachineDeployments and MachinePools). + Note: + - This field is set only when the Cluster topology is managed by Cluster API and a Cluster upgrade is in progress. + - Once a version is applied to the worker objects, it is removed from the list (after a version + is applied to a worker object, it might take some time for the actual upgrade to complete) + - During a chained upgrade, the upgrade plan is continuously re-computed, and this field will + report only the last known upgrade plan. + items: + description: StatusUpgradePlanVersion groups upgrade plan version-related + status information. + properties: + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + versions: + description: versions is the aggregated Kubernetes versions in + cluster workers. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this + version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + required: + - spec + type: object + served: true storage: true subresources: status: {} @@ -5946,11 +10262,22 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: extensionconfigs.runtime.cluster.x-k8s.io spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /convert + conversionReviewVersions: + - v1 group: runtime.cluster.x-k8s.io names: categories: @@ -5968,6 +10295,7 @@ spec: jsonPath: .metadata.creationTimestamp name: Age type: date + deprecated: true name: v1alpha1 schema: openAPIV3Schema: @@ -6217,7 +10545,7 @@ spec: timeoutSeconds: description: |- timeoutSeconds defines the timeout duration for client calls to the ExtensionHandler. - Defaults to 10 is not set. + Defaults to 10 seconds if not set. format: int32 type: integer required: @@ -6301,6 +10629,375 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: ExtensionConfig discovered + jsonPath: .status.conditions[?(@.type=="Discovered")].status + name: Discovered + type: string + - description: Time duration since creation of ExtensionConfig + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: |- + ExtensionConfig is the Schema for the ExtensionConfig API. + NOTE: This CRD can only be used if the RuntimeSDK feature gate is enabled. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of the ExtensionConfig. + properties: + clientConfig: + description: clientConfig defines how to communicate with the Extension + server. + minProperties: 1 + properties: + caBundle: + description: caBundle is a PEM encoded CA bundle which will be + used to validate the Extension server's server certificate. + format: byte + maxLength: 51200 + minLength: 1 + type: string + service: + description: |- + service is a reference to the Kubernetes service for the Extension server. + Note: Exactly one of `url` or `service` must be specified. + + If the Extension server is running within a cluster, then you should use `service`. + properties: + name: + description: name is the name of the service. + maxLength: 63 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the service. + maxLength: 63 + minLength: 1 + type: string + path: + description: |- + path is an optional URL path and if present may be any string permissible in + a URL. If a path is set it will be used as prefix to the hook-specific path. + maxLength: 512 + minLength: 1 + type: string + port: + description: |- + port is the port on the service that's hosting the Extension server. + Defaults to 443. + Port should be a valid port number (1-65535, inclusive). + format: int32 + type: integer + required: + - name + - namespace + type: object + url: + description: |- + url gives the location of the Extension server, in standard URL form + (`scheme://host:port/path`). + Note: Exactly one of `url` or `service` must be specified. + + The scheme must be "https". + + The `host` should not refer to a service running in the cluster; use + the `service` field instead. + + A path is optional, and if present may be any string permissible in + a URL. If a path is set it will be used as prefix to the hook-specific path. + + Attempting to use a user or basic auth e.g. "user:password@" is not + allowed. Fragments ("#...") and query parameters ("?...") are not + allowed either. + maxLength: 512 + minLength: 1 + type: string + type: object + namespaceSelector: + description: |- + namespaceSelector decides whether to call the hook for an object based + on whether the namespace for that object matches the selector. + Defaults to the empty LabelSelector, which matches all objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + settings: + additionalProperties: + type: string + description: |- + settings defines key value pairs to be passed to all calls + to all supported RuntimeExtensions. + Note: Settings can be overridden on the ClusterClass. + type: object + required: + - clientConfig + type: object + status: + description: status is the current state of the ExtensionConfig + minProperties: 1 + properties: + conditions: + description: |- + conditions represents the observations of a ExtensionConfig's current state. + Known condition types are Discovered, Paused. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: |- + v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + conditions: + description: |- + conditions defines current service state of the ExtensionConfig. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + type: object + type: object + handlers: + description: handlers defines the current ExtensionHandlers supported + by an Extension. + items: + description: ExtensionHandler specifies the details of a handler + for a particular runtime hook registered by an Extension server. + properties: + failurePolicy: + description: |- + failurePolicy defines how failures in calls to the ExtensionHandler should be handled by a client. + Defaults to Fail if not set. + enum: + - Ignore + - Fail + type: string + name: + description: name is the unique name of the ExtensionHandler. + maxLength: 512 + minLength: 1 + type: string + requestHook: + description: requestHook defines the versioned runtime hook + which this ExtensionHandler serves. + properties: + apiVersion: + description: apiVersion is the group and version of the + Hook. + maxLength: 512 + minLength: 1 + type: string + hook: + description: hook is the name of the hook. + maxLength: 256 + minLength: 1 + type: string + required: + - apiVersion + - hook + type: object + timeoutSeconds: + description: |- + timeoutSeconds defines the timeout duration for client calls to the ExtensionHandler. + Defaults to 10 if not set. + format: int32 + minimum: 1 + type: integer + required: + - name + - requestHook + type: object + maxItems: 512 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true storage: true subresources: status: {} @@ -6309,11 +11006,22 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: ipaddressclaims.ipam.cluster.x-k8s.io spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /convert + conversionReviewVersions: + - v1 group: ipam.cluster.x-k8s.io names: categories: @@ -6333,7 +11041,7 @@ spec: jsonPath: .spec.poolRef.kind name: Pool Kind type: string - - description: Time duration since creation of IPAdressClaim + - description: Time duration since creation of IPAddressClaim jsonPath: .metadata.creationTimestamp name: Age type: date @@ -6471,10 +11179,11 @@ spec: jsonPath: .spec.poolRef.kind name: Pool Kind type: string - - description: Time duration since creation of IPAdressClaim + - description: Time duration since creation of IPAddressClaim jsonPath: .metadata.creationTimestamp name: Age type: date + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -6671,6 +11380,244 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Name of the pool to allocate an address from + jsonPath: .spec.poolRef.name + name: Pool Name + type: string + - description: Kind of the pool to allocate an address from + jsonPath: .spec.poolRef.kind + name: Pool Kind + type: string + - description: Time duration since creation of IPAddressClaim + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: IPAddressClaim is the Schema for the ipaddressclaim API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of IPAddressClaim. + properties: + clusterName: + description: clusterName is the name of the Cluster this object belongs + to. + maxLength: 63 + minLength: 1 + type: string + poolRef: + description: poolRef is a reference to the pool from which an IP address + should be created. + properties: + apiGroup: + description: |- + apiGroup of the IPPool. + apiGroup must be fully qualified domain name. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the IPPool. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the IPPool. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + required: + - poolRef + type: object + status: + description: status is the observed state of IPAddressClaim. + minProperties: 1 + properties: + addressRef: + description: addressRef is a reference to the address that was created + for this claim. + properties: + name: + description: |- + name of the IPAddress. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - name + type: object + conditions: + description: |- + conditions represents the observations of a IPAddressClaim's current state. + Known condition types are Ready. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + conditions: + description: |- + conditions summarises the current state of the IPAddressClaim + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + type: object + type: object + type: object + required: + - spec + type: object + served: true storage: true subresources: status: {} @@ -6679,11 +11626,22 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: ipaddresses.ipam.cluster.x-k8s.io spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /convert + conversionReviewVersions: + - v1 group: ipam.cluster.x-k8s.io names: categories: @@ -6707,7 +11665,7 @@ spec: jsonPath: .spec.poolRef.kind name: Pool Kind type: string - - description: Time duration since creation of IPAdress + - description: Time duration since creation of IPAddress jsonPath: .metadata.creationTimestamp name: Age type: date @@ -6809,10 +11767,11 @@ spec: jsonPath: .spec.poolRef.kind name: Pool Kind type: string - - description: Time duration since creation of IPAdress + - description: Time duration since creation of IPAddress jsonPath: .metadata.creationTimestamp name: Age type: date + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -6896,6 +11855,125 @@ spec: type: object type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Address + jsonPath: .spec.address + name: Address + type: string + - description: Name of the pool the address is from + jsonPath: .spec.poolRef.name + name: Pool Name + type: string + - description: Kind of the pool the address is from + jsonPath: .spec.poolRef.kind + name: Pool Kind + type: string + - description: Time duration since creation of IPAddress + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: IPAddress is the Schema for the ipaddress API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of IPAddress. + properties: + address: + description: address is the IP address. + maxLength: 39 + minLength: 1 + type: string + claimRef: + description: claimRef is a reference to the claim this IPAddress was + created for. + properties: + name: + description: |- + name of the IPAddressClaim. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - name + type: object + gateway: + description: gateway is the network gateway of the network the address + is from. + maxLength: 39 + minLength: 1 + type: string + poolRef: + description: poolRef is a reference to the pool that this IPAddress + was created from. + properties: + apiGroup: + description: |- + apiGroup of the IPPool. + apiGroup must be fully qualified domain name. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the IPPool. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the IPPool. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + prefix: + description: prefix is the prefix of the address. + format: int32 + maximum: 128 + minimum: 0 + type: integer + required: + - address + - claimRef + - poolRef + - prefix + type: object + required: + - spec + type: object + served: true storage: true subresources: {} --- @@ -6904,7 +11982,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: machinedeployments.cluster.x-k8s.io @@ -6919,7 +11997,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -6932,1043 +12009,6 @@ spec: singular: machinedeployment scope: Namespaced versions: - - additionalPrinterColumns: - - description: MachineDeployment status such as ScalingUp/ScalingDown/Running/Failed/Unknown - jsonPath: .status.phase - name: Phase - type: string - - description: Total number of non-terminated machines targeted by this MachineDeployment - jsonPath: .status.replicas - name: Replicas - type: integer - - description: Total number of ready machines targeted by this MachineDeployment - jsonPath: .status.readyReplicas - name: Ready - type: integer - - description: Total number of non-terminated machines targeted by this deployment - that have the desired template spec - jsonPath: .status.updatedReplicas - name: Updated - type: integer - - description: Total number of unavailable machines targeted by this MachineDeployment - jsonPath: .status.unavailableReplicas - name: Unavailable - type: integer - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - MachineDeployment is the Schema for the machinedeployments API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of MachineDeployment. - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - minReadySeconds: - description: |- - minReadySeconds is the minimum number of seconds for which a newly created machine should - be ready. - Defaults to 0 (machine will be considered available as soon as it - is ready) - format: int32 - type: integer - paused: - description: paused indicates that the deployment is paused. - type: boolean - progressDeadlineSeconds: - description: |- - progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it - is considered to be failed. The deployment controller will continue to - process failed deployments and a condition with a ProgressDeadlineExceeded - reason will be surfaced in the deployment status. Note that progress will - not be estimated during the time a deployment is paused. Defaults to 600s. - format: int32 - type: integer - replicas: - description: |- - replicas is the number of desired machines. Defaults to 1. - This is a pointer to distinguish between explicit zero and not specified. - format: int32 - type: integer - revisionHistoryLimit: - description: |- - revisionHistoryLimit is the number of old MachineSets to retain to allow rollback. - This is a pointer to distinguish between explicit zero and not specified. - Defaults to 1. - format: int32 - type: integer - selector: - description: |- - selector is the label selector for machines. Existing MachineSets whose machines are - selected by this will be the ones affected by this deployment. - It must match the machine template's labels. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - strategy: - description: |- - strategy is the deployment strategy to use to replace existing machines with - new ones. - properties: - rollingUpdate: - description: |- - rollingUpdate is the rolling update config params. Present only if - MachineDeploymentStrategyType = RollingUpdate. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - maxSurge is the maximum number of machines that can be scheduled above the - desired number of machines. - Value can be an absolute number (ex: 5) or a percentage of - desired machines (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 1. - Example: when this is set to 30%, the new MachineSet can be scaled - up immediately when the rolling update starts, such that the total - number of old and new machines do not exceed 130% of desired - machines. Once old machines have been killed, new MachineSet can - be scaled up further, ensuring that total number of machines running - at any time during the update is at most 130% of desired machines. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - maxUnavailable is the maximum number of machines that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired - machines (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 0. - Example: when this is set to 30%, the old MachineSet can be scaled - down to 70% of desired machines immediately when the rolling update - starts. Once new machines are ready, old MachineSet can be scaled - down further, followed by scaling up the new MachineSet, ensuring - that the total number of machines available at all times - during the update is at least 70% of desired machines. - x-kubernetes-int-or-string: true - type: object - type: - description: |- - type of deployment. Currently the only supported strategy is - "RollingUpdate". - Default is RollingUpdate. - type: string - type: object - template: - description: template describes the machines that will be created. - properties: - metadata: - description: |- - metadata is the standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - generateName: - description: |- - generateName is an optional prefix, used by the server, to generate a unique - name ONLY IF the Name field has not been provided. - If this field is used, the name returned to the client will be different - than the name passed. This value will also be combined with a unique suffix. - The provided value has the same validation rules as the Name field, - and may be truncated by the length of the suffix required to make the value - unique on the server. - - If this field is specified and the generated name exists, the server will - NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - ServerTimeout indicating a unique name could not be found in the time allotted, and the client - should retry (optionally after the time indicated in the Retry-After header). - - Applied only if Name is not specified. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - namespace: - description: |- - namespace defines the space within each name must be unique. An empty namespace is - equivalent to the "default" namespace, but "default" is the canonical representation. - Not all objects are required to be scoped to a namespace - the value of this field for - those objects will be empty. - - Must be a DNS_LABEL. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - ownerReferences: - description: |- - ownerReferences is the list of objects depended by this object. If ALL objects in the list have - been deleted, this object will be garbage collected. If this object is managed by a controller, - then an entry in this list will point to this controller, with the controller field set to true. - There cannot be more than one managing controller. - - Deprecated: This field has no function and is going to be removed in a next release. - items: - description: |- - OwnerReference contains enough information to let you identify an owning - object. An owning object must be in the same namespace as the dependent, or - be cluster-scoped, so there is no namespace field. - properties: - apiVersion: - description: API version of the referent. - type: string - blockOwnerDeletion: - description: |- - If true, AND if the owner has the "foregroundDeletion" finalizer, then - the owner cannot be deleted from the key-value store until this - reference is removed. - See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - for how the garbage collector interacts with this field and enforces the foreground deletion. - Defaults to false. - To set this field, a user needs "delete" permission of the owner, - otherwise 422 (Unprocessable Entity) will be returned. - type: boolean - controller: - description: If true, this reference points to the managing - controller. - type: boolean - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - type: string - required: - - apiVersion - - kind - - name - - uid - type: object - x-kubernetes-map-type: atomic - type: array - type: object - spec: - description: |- - spec is the specification of the desired behavior of the machine. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.Data without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - data: - description: |- - data contains the bootstrap data, such as cloud-init details scripts. - If nil, the Machine should remain in the Pending state. - - Deprecated: Switch to DataSecretName. - type: string - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object - belongs to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - type: object - required: - - clusterName - - selector - - template - type: object - status: - description: status is the observed state of MachineDeployment. - properties: - availableReplicas: - description: |- - availableReplicas is the total number of available machines (ready for at least minReadySeconds) - targeted by this deployment. - format: int32 - type: integer - observedGeneration: - description: observedGeneration is the generation observed by the - deployment controller. - format: int64 - type: integer - phase: - description: phase represents the current phase of a MachineDeployment - (ScalingUp, ScalingDown, Running, Failed, or Unknown). - type: string - readyReplicas: - description: readyReplicas is the total number of ready machines targeted - by this deployment. - format: int32 - type: integer - replicas: - description: |- - replicas is the total number of non-terminated machines targeted by this deployment - (their labels match the selector). - format: int32 - type: integer - selector: - description: |- - selector is the same as the label selector but in the string format to avoid introspection - by clients. The string will be in the same format as the query-param syntax. - More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - type: string - unavailableReplicas: - description: |- - unavailableReplicas is the total number of unavailable machines targeted by this deployment. - This is the total number of machines that are still required for - the deployment to have 100% available capacity. They may either - be machines that are running but not yet available or machines - that still have not been created. - format: int32 - type: integer - updatedReplicas: - description: |- - updatedReplicas is the total number of non-terminated machines targeted by this deployment - that have the desired template spec. - format: int32 - type: integer - type: object - type: object - served: false - storage: false - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - - additionalPrinterColumns: - - description: Cluster - jsonPath: .spec.clusterName - name: Cluster - type: string - - description: Time duration since creation of MachineDeployment - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: MachineDeployment status such as ScalingUp/ScalingDown/Running/Failed/Unknown - jsonPath: .status.phase - name: Phase - type: string - - description: Total number of non-terminated machines targeted by this MachineDeployment - jsonPath: .status.replicas - name: Replicas - type: integer - - description: Total number of ready machines targeted by this MachineDeployment - jsonPath: .status.readyReplicas - name: Ready - type: integer - - description: Total number of non-terminated machines targeted by this deployment - that have the desired template spec - jsonPath: .status.updatedReplicas - name: Updated - type: integer - - description: Total number of unavailable machines targeted by this MachineDeployment - jsonPath: .status.unavailableReplicas - name: Unavailable - type: integer - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - MachineDeployment is the Schema for the machinedeployments API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of MachineDeployment. - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - minReadySeconds: - description: |- - minReadySeconds is the minimum number of seconds for which a newly created machine should - be ready. - Defaults to 0 (machine will be considered available as soon as it - is ready) - format: int32 - type: integer - paused: - description: paused indicates that the deployment is paused. - type: boolean - progressDeadlineSeconds: - description: |- - progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it - is considered to be failed. The deployment controller will continue to - process failed deployments and a condition with a ProgressDeadlineExceeded - reason will be surfaced in the deployment status. Note that progress will - not be estimated during the time a deployment is paused. Defaults to 600s. - format: int32 - type: integer - replicas: - default: 1 - description: |- - replicas is the number of desired machines. Defaults to 1. - This is a pointer to distinguish between explicit zero and not specified. - format: int32 - type: integer - revisionHistoryLimit: - description: |- - revisionHistoryLimit is the number of old MachineSets to retain to allow rollback. - This is a pointer to distinguish between explicit zero and not specified. - Defaults to 1. - format: int32 - type: integer - selector: - description: |- - selector is the label selector for machines. Existing MachineSets whose machines are - selected by this will be the ones affected by this deployment. - It must match the machine template's labels. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - strategy: - description: |- - strategy is the deployment strategy to use to replace existing machines with - new ones. - properties: - rollingUpdate: - description: |- - rollingUpdate is the rolling update config params. Present only if - MachineDeploymentStrategyType = RollingUpdate. - properties: - deletePolicy: - description: |- - deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. - Valid values are "Random, "Newest", "Oldest" - When no value is supplied, the default DeletePolicy of MachineSet is used - enum: - - Random - - Newest - - Oldest - type: string - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - maxSurge is the maximum number of machines that can be scheduled above the - desired number of machines. - Value can be an absolute number (ex: 5) or a percentage of - desired machines (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 1. - Example: when this is set to 30%, the new MachineSet can be scaled - up immediately when the rolling update starts, such that the total - number of old and new machines do not exceed 130% of desired - machines. Once old machines have been killed, new MachineSet can - be scaled up further, ensuring that total number of machines running - at any time during the update is at most 130% of desired machines. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - maxUnavailable is the maximum number of machines that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired - machines (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 0. - Example: when this is set to 30%, the old MachineSet can be scaled - down to 70% of desired machines immediately when the rolling update - starts. Once new machines are ready, old MachineSet can be scaled - down further, followed by scaling up the new MachineSet, ensuring - that the total number of machines available at all times - during the update is at least 70% of desired machines. - x-kubernetes-int-or-string: true - type: object - type: - description: |- - type of deployment. - Default is RollingUpdate. - enum: - - RollingUpdate - - OnDelete - type: string - type: object - template: - description: template describes the machines that will be created. - properties: - metadata: - description: |- - metadata is the standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - type: object - spec: - description: |- - spec is the specification of the desired behavior of the machine. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.DataSecretName without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object - belongs to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - type: object - required: - - clusterName - - selector - - template - type: object - status: - description: status is the observed state of MachineDeployment. - properties: - availableReplicas: - description: |- - availableReplicas is the total number of available machines (ready for at least minReadySeconds) - targeted by this deployment. - format: int32 - type: integer - conditions: - description: conditions defines current service state of the MachineDeployment. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - observedGeneration: - description: observedGeneration is the generation observed by the - deployment controller. - format: int64 - type: integer - phase: - description: phase represents the current phase of a MachineDeployment - (ScalingUp, ScalingDown, Running, Failed, or Unknown). - type: string - readyReplicas: - description: readyReplicas is the total number of ready machines targeted - by this deployment. - format: int32 - type: integer - replicas: - description: |- - replicas is the total number of non-terminated machines targeted by this deployment - (their labels match the selector). - format: int32 - type: integer - selector: - description: |- - selector is the same as the label selector but in the string format to avoid introspection - by clients. The string will be in the same format as the query-param syntax. - More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - type: string - unavailableReplicas: - description: |- - unavailableReplicas is the total number of unavailable machines targeted by this deployment. - This is the total number of machines that are still required for - the deployment to have 100% available capacity. They may either - be machines that are running but not yet available or machines - that still have not been created. - format: int32 - type: integer - updatedReplicas: - description: |- - updatedReplicas is the total number of non-terminated machines targeted by this deployment - that have the desired template spec. - format: int32 - type: integer - type: object - type: object - served: false - storage: false - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - additionalPrinterColumns: - description: Cluster jsonPath: .spec.clusterName @@ -8008,6 +12048,7 @@ spec: jsonPath: .spec.template.spec.version name: Version type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -8214,7 +12255,7 @@ spec: deletePolicy: description: |- deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. - Valid values are "Random, "Newest", "Oldest" + Valid values are "Random", "Newest", "Oldest" When no value is supplied, the default DeletePolicy of MachineSet is used enum: - Random @@ -8357,7 +12398,7 @@ spec: dataSecretName is the name of the secret that stores the bootstrap data script. If nil, the Machine should remain in the Pending state. maxLength: 253 - minLength: 1 + minLength: 0 type: string type: object clusterName: @@ -8498,6 +12539,69 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. @@ -8619,7 +12723,7 @@ spec: be machines that are running but not yet available or machines that still have not been created. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. format: int32 type: integer updatedReplicas: @@ -8715,9 +12819,899 @@ spec: format: int32 type: integer type: object + versions: + description: versions is the aggregated Kubernetes versions in this + MachineDeployment. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - version + x-kubernetes-list-type: map type: object type: object served: true + storage: false + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Cluster pass all availability checks + jsonPath: .status.conditions[?(@.type=="Available")].status + name: Available + type: string + - description: The desired number of machines + jsonPath: .spec.replicas + name: Desired + type: integer + - description: The number of machines + jsonPath: .status.replicas + name: Current + type: integer + - description: The number of machines with Ready condition true + jsonPath: .status.readyReplicas + name: Ready + type: integer + - description: The number of machines with Available condition true + jsonPath: .status.availableReplicas + name: Available + type: integer + - description: The number of machines with UpToDate condition true + jsonPath: .status.upToDateReplicas + name: Up-to-date + type: integer + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: MachineDeployment status such as ScalingUp/ScalingDown/Running/Failed/Unknown + jsonPath: .status.phase + name: Phase + type: string + - description: Time duration since creation of MachineDeployment + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Kubernetes version associated with this MachineDeployment + jsonPath: .spec.template.spec.version + name: Version + type: string + name: v1beta2 + schema: + openAPIV3Schema: + description: MachineDeployment is the Schema for the machinedeployments API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of MachineDeployment. + properties: + clusterName: + description: clusterName is the name of the Cluster this object belongs + to. + maxLength: 63 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for MachineDeployment + deletion. + minProperties: 1 + properties: + order: + description: |- + order defines the order in which Machines are deleted when downscaling. + Defaults to "Random". Valid values are "Random", "Newest", "Oldest" + enum: + - Random + - Newest + - Oldest + type: string + type: object + machineNaming: + description: |- + machineNaming allows changing the naming pattern used when creating Machines. + Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines. + minProperties: 1 + properties: + template: + description: |- + template defines the template to use for generating the names of the + Machine objects. + If not defined, it will fallback to `{{ .machineSet.name }}-{{ .random }}`. + If the generated name string exceeds 63 characters, it will be trimmed to + 58 characters and will + get concatenated with a random suffix of length 5. + Length of the template string must not exceed 256 characters. + The template allows the following variables `.cluster.name`, + `.machineSet.name` and `.random`. + The variable `.cluster.name` retrieves the name of the cluster object + that owns the Machines being created. + The variable `.machineSet.name` retrieves the name of the MachineSet + object that owns the Machines being created. + The variable `.random` is substituted with random alphanumeric string, + without vowels, of length 5. This variable is required part of the + template. If not provided, validation will fail. + maxLength: 256 + minLength: 1 + type: string + type: object + paused: + description: paused indicates that the deployment is paused. + type: boolean + remediation: + description: remediation controls how unhealthy Machines are remediated. + minProperties: 1 + properties: + maxInFlight: + anyOf: + - type: integer + - type: string + description: |- + maxInFlight determines how many in flight remediations should happen at the same time. + + Remediation only happens on the MachineSet with the most current revision, while + older MachineSets (usually present during rollout operations) aren't allowed to remediate. + + Note: In general (independent of remediations), unhealthy machines are always + prioritized during scale down operations over healthy ones. + + MaxInFlight can be set to a fixed number or a percentage. + Example: when this is set to 20%, the MachineSet controller deletes at most 20% of + the desired replicas. + + If not set, remediation is limited to all machines (bounded by replicas) + under the active MachineSet's management. + x-kubernetes-int-or-string: true + type: object + replicas: + description: |- + replicas is the number of desired machines. + This is a pointer to distinguish between explicit zero and not specified. + + Defaults to: + * if the Kubernetes autoscaler min size and max size annotations are set: + - if it's a new MachineDeployment, use min size + - if the replicas field of the old MachineDeployment is < min size, use min size + - if the replicas field of the old MachineDeployment is > max size, use max size + - if the replicas field of the old MachineDeployment is in the (min size, max size) range, keep the value from the oldMD + * otherwise use 1 + Note: Defaulting will be run whenever the replicas field is not set: + * A new MachineDeployment is created with replicas not set. + * On an existing MachineDeployment the replicas field was first set and is now unset. + Those cases are especially relevant for the following Kubernetes autoscaler use cases: + * A new MachineDeployment is created and replicas should be managed by the autoscaler + * An existing MachineDeployment which initially wasn't controlled by the autoscaler + should be later controlled by the autoscaler + format: int32 + type: integer + rollout: + description: |- + rollout allows you to configure the behaviour of rolling updates to the MachineDeployment Machines. + It allows you to require that all Machines are replaced after a certain time, + and allows you to define the strategy used during rolling replacements. + minProperties: 1 + properties: + after: + description: |- + after is a field to indicate a rollout should be performed + after the specified time even if no changes have been made to the + MachineDeployment. + Example: In the YAML the time can be specified in the RFC3339 format. + To specify the rolloutAfter target as March 9, 2023, at 9 am UTC + use "2023-03-09T09:00:00Z". + format: date-time + type: string + strategy: + description: strategy specifies how to roll out control plane + Machines. + minProperties: 1 + properties: + rollingUpdate: + description: |- + rollingUpdate is the rolling update config params. Present only if + type = RollingUpdate. + minProperties: 1 + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: |- + maxSurge is the maximum number of machines that can be scheduled above the + desired number of machines. + Value can be an absolute number (ex: 5) or a percentage of + desired machines (ex: 10%). + This can not be 0 if MaxUnavailable is 0. + Absolute number is calculated from percentage by rounding up. + Defaults to 1. + Example: when this is set to 30%, the new MachineSet can be scaled + up immediately when the rolling update starts, such that the total + number of old and new machines do not exceed 130% of desired + machines. Once old machines have been killed, new MachineSet can + be scaled up further, ensuring that total number of machines running + at any time during the update is at most 130% of desired machines. + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: |- + maxUnavailable is the maximum number of machines that can be unavailable during the update. + Value can be an absolute number (ex: 5) or a percentage of desired + machines (ex: 10%). + Absolute number is calculated from percentage by rounding down. + This can not be 0 if MaxSurge is 0. + Defaults to 0. + Example: when this is set to 30%, the old MachineSet can be scaled + down to 70% of desired machines immediately when the rolling update + starts. Once new machines are ready, old MachineSet can be scaled + down further, followed by scaling up the new MachineSet, ensuring + that the total number of machines available at all times + during the update is at least 70% of desired machines. + x-kubernetes-int-or-string: true + type: object + type: + description: |- + type of rollout. Allowed values are RollingUpdate and OnDelete. + Default is RollingUpdate. + enum: + - RollingUpdate + - OnDelete + type: string + required: + - type + type: object + type: object + selector: + description: |- + selector is the label selector for machines. Existing MachineSets whose machines are + selected by this will be the ones affected by this deployment. + It must match the machine template's labels. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + template: + description: template describes the machines that will be created. + properties: + metadata: + description: |- + metadata is the standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + spec: + description: |- + spec is the specification of the desired behavior of the machine. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + bootstrap: + description: |- + bootstrap is a reference to a local struct which encapsulates + fields to configure the Machine’s bootstrapping mechanism. + properties: + configRef: + description: |- + configRef is a reference to a bootstrap provider-specific resource + that holds configuration details. The reference is optional to + allow users/operators to specify Bootstrap.DataSecretName without + the need of a controller. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + dataSecretName: + description: |- + dataSecretName is the name of the secret that stores the bootstrap data script. + If nil, the Machine should remain in the Pending state. + maxLength: 253 + minLength: 0 + type: string + type: object + clusterName: + description: clusterName is the name of the Cluster this object + belongs to. + maxLength: 63 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for Machine + deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + format: int32 + minimum: 0 + type: integer + type: object + failureDomain: + description: |- + failureDomain is the failure domain the machine will be created in. + Must match the name of a FailureDomain from the Cluster status. + maxLength: 256 + minLength: 1 + type: string + infrastructureRef: + description: |- + infrastructureRef is a required reference to a custom resource + offered by an infrastructure provider. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a Machine should be ready before considering it available. + Defaults to 0 (Machine will be considered available as soon as the Machine is ready) + format: int32 + minimum: 0 + type: integer + providerID: + description: |- + providerID is the identification ID of the machine provided by the provider. + This field must match the provider ID as seen on the node object corresponding to this machine. + This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler + with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out + machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a + generic out-of-tree provider for autoscaler, this field is required by autoscaler to be + able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver + and then a comparison is done to find out unregistered machines and are marked for delete. + This field will be set by the actuators and consumed by higher level entities like autoscaler that will + be interfacing with cluster-api as generic provider. + maxLength: 512 + minLength: 1 + type: string + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. by Cluster API control plane providers to extend the semantic of the + Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates + for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc. + + Another example are external controllers, e.g. responsible to install special software/hardware on the Machines; + they can include the status of those components with a new condition and add this condition to ReadinessGates. + + NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those + readiness gates condition are reporting the same message, when computing the Machine's Ready condition those + readinessGates will be replaced by a single entry reporting "Control plane components: " + message. + This helps to improve readability of conditions bubbling up to the Machine's owner resource / to the Cluster). + items: + description: MachineReadinessGate contains the type of a + Machine condition to be used as a readiness gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + version: + description: |- + version defines the desired Kubernetes version. + This field is meant to be optionally used by bootstrap providers. + maxLength: 256 + minLength: 1 + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + required: + - spec + type: object + required: + - clusterName + - selector + - template + type: object + status: + description: status is the observed state of MachineDeployment. + minProperties: 1 + properties: + availableReplicas: + description: availableReplicas is the number of available replicas + for this MachineDeployment. A machine is considered available when + Machine's Available condition is true. + format: int32 + type: integer + conditions: + description: |- + conditions represents the observations of a MachineDeployment's current state. + Known condition types are Available, MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + availableReplicas: + description: |- + availableReplicas is the total number of available machines (ready for at least minReadySeconds) + targeted by this deployment. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + conditions: + description: |- + conditions defines current service state of the MachineDeployment. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + readyReplicas: + description: |- + readyReplicas is the total number of ready machines targeted by this deployment. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + unavailableReplicas: + description: |- + unavailableReplicas is the total number of unavailable machines targeted by this deployment. + This is the total number of machines that are still required for + the deployment to have 100% available capacity. They may either + be machines that are running but not yet available or machines + that still have not been created. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + updatedReplicas: + description: |- + updatedReplicas is the total number of non-terminated machines targeted by this deployment + that have the desired template spec. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + type: object + type: object + observedGeneration: + description: observedGeneration is the generation observed by the + deployment controller. + format: int64 + minimum: 1 + type: integer + phase: + description: phase represents the current phase of a MachineDeployment + (ScalingUp, ScalingDown, Running, Failed, or Unknown). + enum: + - ScalingUp + - ScalingDown + - Running + - Failed + - Unknown + type: string + readyReplicas: + description: readyReplicas is the number of ready replicas for this + MachineDeployment. A machine is considered ready when Machine's + Ready condition is true. + format: int32 + type: integer + replicas: + description: |- + replicas is the total number of non-terminated machines targeted by this deployment + (their labels match the selector). + format: int32 + type: integer + selector: + description: |- + selector is the same as the label selector but in the string format to avoid introspection + by clients. The string will be in the same format as the query-param syntax. + More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors + maxLength: 4096 + minLength: 1 + type: string + upToDateReplicas: + description: upToDateReplicas is the number of up-to-date replicas + targeted by this deployment. A machine is considered up-to-date + when Machine's UpToDate condition is true. + format: int32 + type: integer + versions: + description: versions is the aggregated Kubernetes versions in this + MachineDeployment. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - version + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true storage: true subresources: scale: @@ -8731,7 +13725,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: machinedrainrules.cluster.x-k8s.io @@ -8746,7 +13740,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -8770,6 +13763,7 @@ spec: jsonPath: .metadata.creationTimestamp name: Age type: date + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -9133,6 +14127,384 @@ spec: - spec type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Drain behavior + jsonPath: .spec.drain.behavior + name: Behavior + type: string + - description: Drain order + jsonPath: .spec.drain.order + name: Order + type: string + - description: Time duration since creation of the MachineDrainRule + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: MachineDrainRule is the Schema for the MachineDrainRule API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec defines the spec of a MachineDrainRule. + properties: + drain: + description: drain configures if and how Pods are drained. + properties: + behavior: + description: |- + behavior defines the drain behavior. + Can be either "Drain", "Skip", or "WaitCompleted". + "Drain" means that the Pods to which this MachineDrainRule applies will be drained. + If behavior is set to "Drain" the order in which Pods are drained can be configured + with the order field. When draining Pods of a Node the Pods will be grouped by order + and one group after another will be drained (by increasing order). Cluster API will + wait until all Pods of a group are terminated / removed from the Node before starting + with the next group. + "Skip" means that the Pods to which this MachineDrainRule applies will be skipped during drain. + "WaitCompleted" means that the pods to which this MachineDrainRule applies will never be evicted + and we wait for them to be completed, it is enforced that pods marked with this behavior always have Order=0. + enum: + - Drain + - Skip + - WaitCompleted + type: string + order: + description: |- + order defines the order in which Pods are drained. + Pods with higher order are drained after Pods with lower order. + order can only be set if behavior is set to "Drain". + If order is not set, 0 will be used. + Valid values for order are from -2147483648 to 2147483647 (inclusive). + format: int32 + type: integer + required: + - behavior + type: object + machines: + description: |- + machines defines to which Machines this MachineDrainRule should be applied. + + If machines is not set, the MachineDrainRule applies to all Machines in the Namespace. + If machines contains multiple selectors, the results are ORed. + Within a single Machine selector the results of selector and clusterSelector are ANDed. + Machines will be selected from all Clusters in the Namespace unless otherwise + restricted with the clusterSelector. + + Example: Selects control plane Machines in all Clusters or + Machines with label "os" == "linux" in Clusters with label + "stage" == "production". + + - selector: + matchExpressions: + - key: cluster.x-k8s.io/control-plane + operator: Exists + - selector: + matchLabels: + os: linux + clusterSelector: + matchExpressions: + - key: stage + operator: In + values: + - production + items: + description: MachineDrainRuleMachineSelector defines to which Machines + this MachineDrainRule should be applied. + minProperties: 1 + properties: + clusterSelector: + description: |- + clusterSelector is a label selector which selects Machines by the labels of + their Clusters. + This field follows standard label selector semantics; if not present or + empty, it selects Machines of all Clusters. + + If selector is also set, then the selector as a whole selects + Machines matching selector belonging to Clusters selected by clusterSelector. + If selector is not set, it selects all Machines belonging to Clusters + selected by clusterSelector. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + selector: + description: |- + selector is a label selector which selects Machines by their labels. + This field follows standard label selector semantics; if not present or + empty, it selects all Machines. + + If clusterSelector is also set, then the selector as a whole selects + Machines matching selector belonging to Clusters selected by clusterSelector. + If clusterSelector is not set, it selects all Machines matching selector in + all Clusters. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: entries in machines must be unique + rule: self.all(x, self.exists_one(y, x == y)) + pods: + description: |- + pods defines to which Pods this MachineDrainRule should be applied. + + If pods is not set, the MachineDrainRule applies to all Pods in all Namespaces. + If pods contains multiple selectors, the results are ORed. + Within a single Pod selector the results of selector and namespaceSelector are ANDed. + Pods will be selected from all Namespaces unless otherwise + restricted with the namespaceSelector. + + Example: Selects Pods with label "app" == "logging" in all Namespaces or + Pods with label "app" == "prometheus" in the "monitoring" + Namespace. + + - selector: + matchExpressions: + - key: app + operator: In + values: + - logging + - selector: + matchLabels: + app: prometheus + namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: monitoring + items: + description: MachineDrainRulePodSelector defines to which Pods this + MachineDrainRule should be applied. + minProperties: 1 + properties: + namespaceSelector: + description: |- + namespaceSelector is a label selector which selects Pods by the labels of + their Namespaces. + This field follows standard label selector semantics; if not present or + empty, it selects Pods of all Namespaces. + + If selector is also set, then the selector as a whole selects + Pods matching selector in Namespaces selected by namespaceSelector. + If selector is not set, it selects all Pods in Namespaces selected by + namespaceSelector. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + selector: + description: |- + selector is a label selector which selects Pods by their labels. + This field follows standard label selector semantics; if not present or + empty, it selects all Pods. + + If namespaceSelector is also set, then the selector as a whole selects + Pods matching selector in Namespaces selected by namespaceSelector. + If namespaceSelector is not set, it selects all Pods matching selector in + all Namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: entries in pods must be unique + rule: self.all(x, self.exists_one(y, x == y)) + required: + - drain + type: object + required: + - metadata + - spec + type: object + served: true storage: true subresources: {} --- @@ -9141,7 +14513,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: machinehealthchecks.cluster.x-k8s.io @@ -9156,7 +14528,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -9170,584 +14541,6 @@ spec: singular: machinehealthcheck scope: Namespaced versions: - - additionalPrinterColumns: - - description: Maximum number of unhealthy machines allowed - jsonPath: .spec.maxUnhealthy - name: MaxUnhealthy - type: string - - description: Number of machines currently monitored - jsonPath: .status.expectedMachines - name: ExpectedMachines - type: integer - - description: Current observed healthy machines - jsonPath: .status.currentHealthy - name: CurrentHealthy - type: integer - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - MachineHealthCheck is the Schema for the machinehealthchecks API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the specification of machine health check policy - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - maxUnhealthy: - anyOf: - - type: integer - - type: string - description: |- - maxUnhealthy specifies the maximum number of unhealthy machines allowed. - Any further remediation is only allowed if at most "maxUnhealthy" machines selected by - "selector" are not healthy. - x-kubernetes-int-or-string: true - nodeStartupTimeout: - description: |- - nodeStartupTimeout is the duration after which machines without a node will be considered to - have failed and will be remediated. - type: string - remediationTemplate: - description: |- - remediationTemplate is a reference to a remediation template - provided by an infrastructure provider. - - This field is completely optional, when filled, the MachineHealthCheck controller - creates a new object from the template referenced and hands off remediation of the machine to - a controller that lives outside of Cluster API. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - selector: - description: selector is the label selector to match machines whose - health will be exercised - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - unhealthyConditions: - description: |- - unhealthyConditions contains a list of the conditions that determine - whether a node is considered unhealthy. The conditions are combined in a - logical OR, i.e. if any of the conditions is met, the node is unhealthy. - items: - description: |- - UnhealthyCondition represents a Node condition type and value with a timeout - specified as a duration. When the named condition has been in the given - status for at least the timeout value, a node is considered unhealthy. - properties: - status: - description: status of the condition, one of True, False, Unknown. - minLength: 1 - type: string - timeout: - description: |- - timeout is the duration that a node must be in a given status for, - after which the node is considered unhealthy. - For example, with a value of "1h", the node must match the status - for at least 1 hour before being considered unhealthy. - type: string - type: - description: type of Node condition - minLength: 1 - type: string - required: - - status - - timeout - - type - type: object - minItems: 1 - type: array - required: - - clusterName - - selector - - unhealthyConditions - type: object - status: - description: status is the most recently observed status of MachineHealthCheck - resource - properties: - conditions: - description: conditions defines current service state of the MachineHealthCheck. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - currentHealthy: - description: currentHealthy is the total number of healthy machines - counted by this machine health check - format: int32 - minimum: 0 - type: integer - expectedMachines: - description: expectedMachines is the total number of machines counted - by this machine health check - format: int32 - minimum: 0 - type: integer - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - remediationsAllowed: - description: |- - remediationsAllowed is the number of further remediations allowed by this machine health check before - maxUnhealthy short circuiting will be applied - format: int32 - minimum: 0 - type: integer - targets: - description: targets shows the current list of machines the machine - health check is watching - items: - type: string - type: array - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster - jsonPath: .spec.clusterName - name: Cluster - type: string - - description: Time duration since creation of MachineHealthCheck - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Maximum number of unhealthy machines allowed - jsonPath: .spec.maxUnhealthy - name: MaxUnhealthy - type: string - - description: Number of machines currently monitored - jsonPath: .status.expectedMachines - name: ExpectedMachines - type: integer - - description: Current observed healthy machines - jsonPath: .status.currentHealthy - name: CurrentHealthy - type: integer - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - MachineHealthCheck is the Schema for the machinehealthchecks API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the specification of machine health check policy - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - maxUnhealthy: - anyOf: - - type: integer - - type: string - description: |- - maxUnhealthy specifies the maximum number of unhealthy machines allowed. - Any further remediation is only allowed if at most "maxUnhealthy" machines selected by - "selector" are not healthy. - x-kubernetes-int-or-string: true - nodeStartupTimeout: - description: |- - nodeStartupTimeout is the duration after which machines without a node will be considered to - have failed and will be remediated. - If not set, this value is defaulted to 10 minutes. - If you wish to disable this feature, set the value explicitly to 0. - type: string - remediationTemplate: - description: |- - remediationTemplate is a reference to a remediation template - provided by an infrastructure provider. - - This field is completely optional, when filled, the MachineHealthCheck controller - creates a new object from the template referenced and hands off remediation of the machine to - a controller that lives outside of Cluster API. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - selector: - description: selector is the label selector to match machines whose - health will be exercised - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - unhealthyConditions: - description: |- - unhealthyConditions contains a list of the conditions that determine - whether a node is considered unhealthy. The conditions are combined in a - logical OR, i.e. if any of the conditions is met, the node is unhealthy. - items: - description: |- - UnhealthyCondition represents a Node condition type and value with a timeout - specified as a duration. When the named condition has been in the given - status for at least the timeout value, a node is considered unhealthy. - properties: - status: - description: status of the condition, one of True, False, Unknown. - minLength: 1 - type: string - timeout: - description: |- - timeout is the duration that a node must be in a given status for, - after which the node is considered unhealthy. - For example, with a value of "1h", the node must match the status - for at least 1 hour before being considered unhealthy. - type: string - type: - description: type of Node condition - minLength: 1 - type: string - required: - - status - - timeout - - type - type: object - minItems: 1 - type: array - unhealthyRange: - description: |- - unhealthyRange specifies the range of unhealthy machines allowed. - Any further remediation is only allowed if the number of machines selected by "selector" as not healthy - is within the range of "unhealthyRange". Takes precedence over maxUnhealthy. - Eg. "[3-5]" - This means that remediation will be allowed only when: - (a) there are at least 3 unhealthy machines (and) - (b) there are at most 5 unhealthy machines - pattern: ^\[[0-9]+-[0-9]+\]$ - type: string - required: - - clusterName - - selector - - unhealthyConditions - type: object - status: - description: status is the most recently observed status of MachineHealthCheck - resource - properties: - conditions: - description: conditions defines current service state of the MachineHealthCheck. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - currentHealthy: - description: currentHealthy is the total number of healthy machines - counted by this machine health check - format: int32 - minimum: 0 - type: integer - expectedMachines: - description: expectedMachines is the total number of machines counted - by this machine health check - format: int32 - minimum: 0 - type: integer - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - remediationsAllowed: - description: |- - remediationsAllowed is the number of further remediations allowed by this machine health check before - maxUnhealthy short circuiting will be applied - format: int32 - minimum: 0 - type: integer - targets: - description: targets shows the current list of machines the machine - health check is watching - items: - type: string - type: array - type: object - type: object - served: false - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Cluster jsonPath: .spec.clusterName @@ -9769,6 +14562,7 @@ spec: jsonPath: .metadata.creationTimestamp name: Age type: date + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -9956,6 +14750,50 @@ spec: type: object maxItems: 100 type: array + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeout: + description: |- + timeout is the duration that a Machine must be in a given status for, + after which the Machine is considered unhealthy. + For example, with a value of "1h", the Machine must match the status + for at least 1 hour before being considered unhealthy. + type: string + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, HealthCheckSucceeded, + OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeout + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyRange: description: |- unhealthyRange specifies the range of unhealthy machines allowed. @@ -10135,6 +14973,485 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Number of machines currently monitored + jsonPath: .status.expectedMachines + name: Replicas + type: integer + - description: Current observed healthy machines + jsonPath: .status.currentHealthy + name: Healthy + type: integer + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: Time duration since creation of MachineHealthCheck + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: MachineHealthCheck is the Schema for the machinehealthchecks + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the specification of machine health check policy + properties: + checks: + description: |- + checks are the checks that are used to evaluate if a Machine is healthy. + + Independent of this configuration the MachineHealthCheck controller will always + flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and + Machines with deleted Nodes as unhealthy. + + Furthermore, if checks.nodeStartupTimeoutSeconds is not set it + is defaulted to 10 minutes and evaluated accordingly. + minProperties: 1 + properties: + nodeStartupTimeoutSeconds: + description: |- + nodeStartupTimeoutSeconds allows to set the maximum time for MachineHealthCheck + to consider a Machine unhealthy if a corresponding Node isn't associated + through a `Spec.ProviderID` field. + + The duration set in this field is compared to the greatest of: + - Cluster's infrastructure ready condition timestamp (if and when available) + - Control Plane's initialized condition timestamp (if and when available) + - Machine's infrastructure ready condition timestamp (if and when available) + - Machine's metadata creation timestamp + + Defaults to 10 minutes. + If you wish to disable this feature, set the value explicitly to 0. + format: int32 + minimum: 0 + type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, HealthCheckSucceeded, + OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + unhealthyNodeConditions: + description: |- + unhealthyNodeConditions contains a list of conditions that determine + whether a node is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the node is unhealthy. + items: + description: |- + UnhealthyNodeCondition represents a Node condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a node is considered unhealthy. + properties: + status: + description: status of the condition, one of True, False, + Unknown. + minLength: 1 + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a node must be in a given status for, + after which the node is considered unhealthy. + For example, with a value of "3600", the node must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Node condition + minLength: 1 + type: string + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + type: object + clusterName: + description: clusterName is the name of the Cluster this object belongs + to. + maxLength: 63 + minLength: 1 + type: string + remediation: + description: |- + remediation configures if and how remediations are triggered if a Machine is unhealthy. + + If remediation or remediation.triggerIf is not set, + remediation will always be triggered for unhealthy Machines. + + If remediation or remediation.templateRef is not set, + the OwnerRemediated condition will be set on unhealthy Machines to trigger remediation via + the owner of the Machines, for example a MachineSet or a KubeadmControlPlane. + minProperties: 1 + properties: + templateRef: + description: |- + templateRef is a reference to a remediation template + provided by an infrastructure provider. + + This field is completely optional, when filled, the MachineHealthCheck controller + creates a new object from the template referenced and hands off remediation of the machine to + a controller that lives outside of Cluster API. + properties: + apiVersion: + description: |- + apiVersion of the remediation template. + apiVersion must be fully qualified domain name followed by / and a version. + NOTE: This field must be kept in sync with the APIVersion of the remediation template. + maxLength: 317 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[a-z]([-a-z0-9]*[a-z0-9])?$ + type: string + kind: + description: |- + kind of the remediation template. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the remediation template. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiVersion + - kind + - name + type: object + triggerIf: + description: |- + triggerIf configures if remediations are triggered. + If this field is not set, remediations are always triggered. + minProperties: 1 + properties: + unhealthyInRange: + description: |- + unhealthyInRange specifies that remediations are only triggered if the number of + unhealthy Machines is in the configured range. + Takes precedence over unhealthyLessThanOrEqualTo. + Eg. "[3-5]" - This means that remediation will be allowed only when: + (a) there are at least 3 unhealthy Machines (and) + (b) there are at most 5 unhealthy Machines + maxLength: 32 + minLength: 1 + pattern: ^\[[0-9]+-[0-9]+\]$ + type: string + unhealthyLessThanOrEqualTo: + anyOf: + - type: integer + - type: string + description: |- + unhealthyLessThanOrEqualTo specifies that remediations are only triggered if the number of + unhealthy Machines is less than or equal to the configured value. + unhealthyInRange takes precedence if set. + x-kubernetes-int-or-string: true + type: object + type: object + selector: + description: selector is a label selector to match machines whose + health will be exercised + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - clusterName + - selector + type: object + status: + description: status is the most recently observed status of MachineHealthCheck + resource + minProperties: 1 + properties: + conditions: + description: |- + conditions represents the observations of a MachineHealthCheck's current state. + Known condition types are RemediationAllowed, Paused. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentHealthy: + description: currentHealthy is the total number of healthy machines + counted by this machine health check + format: int32 + minimum: 0 + type: integer + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + conditions: + description: |- + conditions defines current service state of the MachineHealthCheck. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + type: object + type: object + expectedMachines: + description: expectedMachines is the total number of machines counted + by this machine health check + format: int32 + minimum: 0 + type: integer + observedGeneration: + description: observedGeneration is the latest generation observed + by the controller. + format: int64 + minimum: 1 + type: integer + remediationsAllowed: + description: |- + remediationsAllowed is the number of further remediations allowed by this machine health check before + maxUnhealthy short circuiting will be applied + format: int32 + minimum: 0 + type: integer + targets: + description: targets shows the current list of machines the machine + health check is watching + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 10000 + type: array + x-kubernetes-list-type: atomic + type: object + required: + - spec + type: object + served: true storage: true subresources: status: {} @@ -10144,7 +15461,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: machinepools.cluster.x-k8s.io @@ -10159,7 +15476,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -10172,989 +15488,6 @@ spec: singular: machinepool scope: Namespaced versions: - - additionalPrinterColumns: - - description: MachinePool replicas count - jsonPath: .status.replicas - name: Replicas - type: string - - description: MachinePool status such as Terminating/Pending/Provisioning/Running/Failed - etc - jsonPath: .status.phase - name: Phase - type: string - - description: Kubernetes version associated with this MachinePool - jsonPath: .spec.template.spec.version - name: Version - type: string - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - MachinePool is the Schema for the machinepools API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of MachinePool. - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - failureDomains: - description: failureDomains is the list of failure domains this MachinePool - should be attached to. - items: - type: string - type: array - minReadySeconds: - description: |- - minReadySeconds is the minimum number of seconds for which a newly created machine instances should - be ready. - Defaults to 0 (machine instance will be considered available as soon as it - is ready) - format: int32 - type: integer - providerIDList: - description: |- - providerIDList are the identification IDs of machine instances provided by the provider. - This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. - items: - type: string - type: array - replicas: - description: |- - replicas is the number of desired machines. Defaults to 1. - This is a pointer to distinguish between explicit zero and not specified. - format: int32 - type: integer - strategy: - description: |- - strategy is the deployment strategy to use to replace existing machine instances with - new ones. - properties: - rollingUpdate: - description: |- - rollingUpdate is the rolling update config params. Present only if - MachineDeploymentStrategyType = RollingUpdate. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - maxSurge is the maximum number of machines that can be scheduled above the - desired number of machines. - Value can be an absolute number (ex: 5) or a percentage of - desired machines (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 1. - Example: when this is set to 30%, the new MachineSet can be scaled - up immediately when the rolling update starts, such that the total - number of old and new machines do not exceed 130% of desired - machines. Once old machines have been killed, new MachineSet can - be scaled up further, ensuring that total number of machines running - at any time during the update is at most 130% of desired machines. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - maxUnavailable is the maximum number of machines that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired - machines (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 0. - Example: when this is set to 30%, the old MachineSet can be scaled - down to 70% of desired machines immediately when the rolling update - starts. Once new machines are ready, old MachineSet can be scaled - down further, followed by scaling up the new MachineSet, ensuring - that the total number of machines available at all times - during the update is at least 70% of desired machines. - x-kubernetes-int-or-string: true - type: object - type: - description: |- - type of deployment. Currently the only supported strategy is - "RollingUpdate". - Default is RollingUpdate. - type: string - type: object - template: - description: template describes the machines that will be created. - properties: - metadata: - description: |- - metadata is the standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - generateName: - description: |- - generateName is an optional prefix, used by the server, to generate a unique - name ONLY IF the Name field has not been provided. - If this field is used, the name returned to the client will be different - than the name passed. This value will also be combined with a unique suffix. - The provided value has the same validation rules as the Name field, - and may be truncated by the length of the suffix required to make the value - unique on the server. - - If this field is specified and the generated name exists, the server will - NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - ServerTimeout indicating a unique name could not be found in the time allotted, and the client - should retry (optionally after the time indicated in the Retry-After header). - - Applied only if Name is not specified. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - namespace: - description: |- - namespace defines the space within each name must be unique. An empty namespace is - equivalent to the "default" namespace, but "default" is the canonical representation. - Not all objects are required to be scoped to a namespace - the value of this field for - those objects will be empty. - - Must be a DNS_LABEL. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - ownerReferences: - description: |- - ownerReferences is the list of objects depended by this object. If ALL objects in the list have - been deleted, this object will be garbage collected. If this object is managed by a controller, - then an entry in this list will point to this controller, with the controller field set to true. - There cannot be more than one managing controller. - - Deprecated: This field has no function and is going to be removed in a next release. - items: - description: |- - OwnerReference contains enough information to let you identify an owning - object. An owning object must be in the same namespace as the dependent, or - be cluster-scoped, so there is no namespace field. - properties: - apiVersion: - description: API version of the referent. - type: string - blockOwnerDeletion: - description: |- - If true, AND if the owner has the "foregroundDeletion" finalizer, then - the owner cannot be deleted from the key-value store until this - reference is removed. - See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - for how the garbage collector interacts with this field and enforces the foreground deletion. - Defaults to false. - To set this field, a user needs "delete" permission of the owner, - otherwise 422 (Unprocessable Entity) will be returned. - type: boolean - controller: - description: If true, this reference points to the managing - controller. - type: boolean - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - type: string - required: - - apiVersion - - kind - - name - - uid - type: object - x-kubernetes-map-type: atomic - type: array - type: object - spec: - description: |- - spec is the specification of the desired behavior of the machine. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.Data without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - data: - description: |- - data contains the bootstrap data, such as cloud-init details scripts. - If nil, the Machine should remain in the Pending state. - - Deprecated: Switch to DataSecretName. - type: string - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object - belongs to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - type: object - required: - - clusterName - - template - type: object - status: - description: status is the observed state of MachinePool. - properties: - availableReplicas: - description: availableReplicas is the number of available replicas - (ready for at least minReadySeconds) for this MachinePool. - format: int32 - type: integer - bootstrapReady: - description: bootstrapReady is the state of the bootstrap provider. - type: boolean - conditions: - description: conditions define the current service state of the MachinePool. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: |- - failureMessage indicates that there is a problem reconciling the state, - and will be set to a descriptive error message. - type: string - failureReason: - description: |- - failureReason indicates that there is a problem reconciling the state, and - will be set to a token value suitable for programmatic interpretation. - type: string - infrastructureReady: - description: infrastructureReady is the state of the infrastructure - provider. - type: boolean - nodeRefs: - description: nodeRefs will point to the corresponding Nodes if it - they exist. - items: - description: ObjectReference contains enough information to let - you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - phase: - description: |- - phase represents the current phase of cluster actuation. - E.g. Pending, Running, Terminating, Failed etc. - type: string - readyReplicas: - description: readyReplicas is the number of ready replicas for this - MachinePool. A machine is considered ready when the node has been - created and is "Ready". - format: int32 - type: integer - replicas: - description: replicas is the most recently observed number of replicas. - format: int32 - type: integer - unavailableReplicas: - description: |- - unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. - This is the total number of machine instances that are still required for - the machine pool to have 100% available capacity. They may either - be machine instances that are running but not yet available or machine instances - that still have not been created. - format: int32 - type: integer - type: object - type: object - served: false - storage: false - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - - additionalPrinterColumns: - - description: Time duration since creation of MachinePool - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: MachinePool replicas count - jsonPath: .status.replicas - name: Replicas - type: string - - description: MachinePool status such as Terminating/Pending/Provisioning/Running/Failed - etc - jsonPath: .status.phase - name: Phase - type: string - - description: Kubernetes version associated with this MachinePool - jsonPath: .spec.template.spec.version - name: Version - type: string - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - MachinePool is the Schema for the machinepools API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of MachinePool. - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - failureDomains: - description: failureDomains is the list of failure domains this MachinePool - should be attached to. - items: - type: string - type: array - minReadySeconds: - description: |- - minReadySeconds is the minimum number of seconds for which a newly created machine instances should - be ready. - Defaults to 0 (machine instance will be considered available as soon as it - is ready) - format: int32 - type: integer - providerIDList: - description: |- - providerIDList are the identification IDs of machine instances provided by the provider. - This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. - items: - type: string - type: array - replicas: - description: |- - replicas is the number of desired machines. Defaults to 1. - This is a pointer to distinguish between explicit zero and not specified. - format: int32 - type: integer - template: - description: template describes the machines that will be created. - properties: - metadata: - description: |- - metadata is the standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - type: object - spec: - description: |- - spec is the specification of the desired behavior of the machine. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.DataSecretName without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object - belongs to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - type: object - required: - - clusterName - - template - type: object - status: - description: status is the observed state of MachinePool. - properties: - availableReplicas: - description: availableReplicas is the number of available replicas - (ready for at least minReadySeconds) for this MachinePool. - format: int32 - type: integer - bootstrapReady: - description: bootstrapReady is the state of the bootstrap provider. - type: boolean - conditions: - description: conditions define the current service state of the MachinePool. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: |- - failureMessage indicates that there is a problem reconciling the state, - and will be set to a descriptive error message. - type: string - failureReason: - description: |- - failureReason indicates that there is a problem reconciling the state, and - will be set to a token value suitable for programmatic interpretation. - type: string - infrastructureReady: - description: infrastructureReady is the state of the infrastructure - provider. - type: boolean - nodeRefs: - description: nodeRefs will point to the corresponding Nodes if it - they exist. - items: - description: ObjectReference contains enough information to let - you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - phase: - description: |- - phase represents the current phase of cluster actuation. - E.g. Pending, Running, Terminating, Failed etc. - type: string - readyReplicas: - description: readyReplicas is the number of ready replicas for this - MachinePool. A machine is considered ready when the node has been - created and is "Ready". - format: int32 - type: integer - replicas: - description: replicas is the most recently observed number of replicas. - format: int32 - type: integer - unavailableReplicas: - description: |- - unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. - This is the total number of machine instances that are still required for - the machine pool to have 100% available capacity. They may either - be machine instances that are running but not yet available or machine instances - that still have not been created. - format: int32 - type: integer - type: object - type: object - served: false - storage: false - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - additionalPrinterColumns: - description: Cluster jsonPath: .spec.clusterName @@ -11182,6 +15515,7 @@ spec: jsonPath: .spec.template.spec.version name: Version type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -11335,7 +15669,7 @@ spec: dataSecretName is the name of the secret that stores the bootstrap data script. If nil, the Machine should remain in the Pending state. maxLength: 253 - minLength: 1 + minLength: 0 type: string type: object clusterName: @@ -11476,6 +15810,69 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. @@ -11561,7 +15958,7 @@ spec: failureMessage indicates that there is a problem reconciling the state, and will be set to a descriptive error message. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. maxLength: 10240 minLength: 1 type: string @@ -11570,15 +15967,15 @@ spec: failureReason indicates that there is a problem reconciling the state, and will be set to a token value suitable for programmatic interpretation. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string infrastructureReady: description: infrastructureReady is the state of the infrastructure provider. type: boolean nodeRefs: - description: nodeRefs will point to the corresponding Nodes if it - they exist. + description: nodeRefs will point to the corresponding Nodes if they + exist. items: description: ObjectReference contains enough information to let you inspect or modify the referred object. @@ -11662,7 +16059,7 @@ spec: be machine instances that are running but not yet available or machine instances that still have not been created. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. format: int32 type: integer v1beta2: @@ -11753,9 +16150,775 @@ spec: format: int32 type: integer type: object + versions: + description: versions is the aggregated Kubernetes versions in this + MachinePool. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - version + x-kubernetes-list-type: map type: object type: object served: true + storage: false + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: The desired number of machines + jsonPath: .spec.replicas + name: Desired + type: integer + - description: The number of machines + jsonPath: .status.replicas + name: Current + type: integer + - description: The number of machines with Ready condition true + jsonPath: .status.readyReplicas + name: Ready + type: integer + - description: The number of machines with Available condition true + jsonPath: .status.availableReplicas + name: Available + type: integer + - description: The number of machines with UpToDate condition true + jsonPath: .status.upToDateReplicas + name: Up-to-date + type: integer + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: MachinePool status such as Terminating/Pending/Provisioning/Running/Failed + etc + jsonPath: .status.phase + name: Phase + type: string + - description: Time duration since creation of MachinePool + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Kubernetes version associated with this MachinePool + jsonPath: .spec.template.spec.version + name: Version + type: string + name: v1beta2 + schema: + openAPIV3Schema: + description: |- + MachinePool is the Schema for the machinepools API. + NOTE: This CRD can only be used if the MachinePool feature gate is enabled. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of MachinePool. + properties: + clusterName: + description: clusterName is the name of the Cluster this object belongs + to. + maxLength: 63 + minLength: 1 + type: string + failureDomains: + description: failureDomains is the list of failure domains this MachinePool + should be attached to. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + type: array + x-kubernetes-list-type: atomic + providerIDList: + description: |- + providerIDList are the identification IDs of machine instances provided by the provider. + This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. + items: + maxLength: 512 + minLength: 1 + type: string + maxItems: 10000 + type: array + x-kubernetes-list-type: atomic + replicas: + description: |- + replicas is the number of desired machines. Defaults to 1. + This is a pointer to distinguish between explicit zero and not specified. + format: int32 + type: integer + template: + description: template describes the machines that will be created. + properties: + metadata: + description: |- + metadata is the standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + spec: + description: |- + spec is the specification of the desired behavior of the machine. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + bootstrap: + description: |- + bootstrap is a reference to a local struct which encapsulates + fields to configure the Machine’s bootstrapping mechanism. + properties: + configRef: + description: |- + configRef is a reference to a bootstrap provider-specific resource + that holds configuration details. The reference is optional to + allow users/operators to specify Bootstrap.DataSecretName without + the need of a controller. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + dataSecretName: + description: |- + dataSecretName is the name of the secret that stores the bootstrap data script. + If nil, the Machine should remain in the Pending state. + maxLength: 253 + minLength: 0 + type: string + type: object + clusterName: + description: clusterName is the name of the Cluster this object + belongs to. + maxLength: 63 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for Machine + deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + format: int32 + minimum: 0 + type: integer + type: object + failureDomain: + description: |- + failureDomain is the failure domain the machine will be created in. + Must match the name of a FailureDomain from the Cluster status. + maxLength: 256 + minLength: 1 + type: string + infrastructureRef: + description: |- + infrastructureRef is a required reference to a custom resource + offered by an infrastructure provider. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a Machine should be ready before considering it available. + Defaults to 0 (Machine will be considered available as soon as the Machine is ready) + format: int32 + minimum: 0 + type: integer + providerID: + description: |- + providerID is the identification ID of the machine provided by the provider. + This field must match the provider ID as seen on the node object corresponding to this machine. + This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler + with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out + machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a + generic out-of-tree provider for autoscaler, this field is required by autoscaler to be + able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver + and then a comparison is done to find out unregistered machines and are marked for delete. + This field will be set by the actuators and consumed by higher level entities like autoscaler that will + be interfacing with cluster-api as generic provider. + maxLength: 512 + minLength: 1 + type: string + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. by Cluster API control plane providers to extend the semantic of the + Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates + for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc. + + Another example are external controllers, e.g. responsible to install special software/hardware on the Machines; + they can include the status of those components with a new condition and add this condition to ReadinessGates. + + NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those + readiness gates condition are reporting the same message, when computing the Machine's Ready condition those + readinessGates will be replaced by a single entry reporting "Control plane components: " + message. + This helps to improve readability of conditions bubbling up to the Machine's owner resource / to the Cluster). + items: + description: MachineReadinessGate contains the type of a + Machine condition to be used as a readiness gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + version: + description: |- + version defines the desired Kubernetes version. + This field is meant to be optionally used by bootstrap providers. + maxLength: 256 + minLength: 1 + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + required: + - spec + type: object + required: + - clusterName + - template + type: object + status: + description: status is the observed state of MachinePool. + minProperties: 1 + properties: + availableReplicas: + description: availableReplicas is the number of available replicas + for this MachinePool. A machine is considered available when Machine's + Available condition is true. + format: int32 + type: integer + conditions: + description: |- + conditions represents the observations of a MachinePool's current state. + Known condition types are Available, BootstrapConfigReady, InfrastructureReady, MachinesReady, MachinesUpToDate, + ScalingUp, ScalingDown, Remediating, Deleting, Paused. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + availableReplicas: + description: |- + availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + conditions: + description: |- + conditions define the current service state of the MachinePool. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureMessage: + description: |- + failureMessage indicates that there is a problem reconciling the state, + and will be set to a descriptive error message. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + maxLength: 10240 + minLength: 1 + type: string + failureReason: + description: |- + failureReason indicates that there is a problem reconciling the state, and + will be set to a token value suitable for programmatic interpretation. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + type: string + readyReplicas: + description: |- + readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + unavailableReplicas: + description: |- + unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. + This is the total number of machine instances that are still required for + the machine pool to have 100% available capacity. They may either + be machine instances that are running but not yet available or machine instances + that still have not been created. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + type: object + type: object + initialization: + description: |- + initialization provides observations of the MachinePool initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning. + minProperties: 1 + properties: + bootstrapDataSecretCreated: + description: |- + bootstrapDataSecretCreated is true when the bootstrap provider reports that the MachinePool's boostrap secret is created. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. + The value of this field is never updated after provisioning is completed. + type: boolean + infrastructureProvisioned: + description: |- + infrastructureProvisioned is true when the infrastructure provider reports that MachinePool's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object + nodeRefs: + description: nodeRefs will point to the corresponding Nodes if they + exist. + items: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + maxItems: 10000 + type: array + x-kubernetes-list-type: atomic + observedGeneration: + description: observedGeneration is the latest generation observed + by the controller. + format: int64 + minimum: 1 + type: integer + phase: + description: phase represents the current phase of cluster actuation. + enum: + - Pending + - Provisioning + - Provisioned + - Running + - ScalingUp + - ScalingDown + - Scaling + - Deleting + - Failed + - Unknown + type: string + readyReplicas: + description: readyReplicas is the number of ready replicas for this + MachinePool. A machine is considered ready when Machine's Ready + condition is true. + format: int32 + type: integer + replicas: + description: replicas is the most recently observed number of replicas. + format: int32 + type: integer + upToDateReplicas: + description: upToDateReplicas is the number of up-to-date replicas + targeted by this MachinePool. A machine is considered up-to-date + when Machine's UpToDate condition is true. + format: int32 + type: integer + versions: + description: versions is the aggregated Kubernetes versions in this + MachinePool. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - version + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true storage: true subresources: scale: @@ -11768,7 +16931,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: machines.cluster.x-k8s.io @@ -11783,7 +16946,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -11796,821 +16958,6 @@ spec: singular: machine scope: Namespaced versions: - - additionalPrinterColumns: - - description: Provider ID - jsonPath: .spec.providerID - name: ProviderID - type: string - - description: Machine status such as Terminating/Pending/Running/Failed etc - jsonPath: .status.phase - name: Phase - type: string - - description: Kubernetes version associated with this Machine - jsonPath: .spec.version - name: Version - type: string - - description: Node name associated with this machine - jsonPath: .status.nodeRef.name - name: NodeName - priority: 1 - type: string - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - Machine is the Schema for the machines API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of Machine. - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.Data without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - data: - description: |- - data contains the bootstrap data, such as cloud-init details scripts. - If nil, the Machine should remain in the Pending state. - - Deprecated: Switch to DataSecretName. - type: string - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - status: - description: status is the observed state of Machine. - properties: - addresses: - description: |- - addresses is a list of addresses assigned to the machine. - This field is copied from the infrastructure provider reference. - items: - description: MachineAddress contains information for the node's - address. - properties: - address: - description: address is the machine address. - type: string - type: - description: type is the machine address type, one of Hostname, - ExternalIP or InternalIP. - type: string - required: - - address - - type - type: object - type: array - bootstrapReady: - description: bootstrapReady is the state of the bootstrap provider. - type: boolean - conditions: - description: conditions defines current service state of the Machine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: |- - failureMessage will be set in the event that there is a terminal problem - reconciling the Machine and will contain a more verbose string suitable - for logging and human consumption. - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - failureReason will be set in the event that there is a terminal problem - reconciling the Machine and will contain a succinct value suitable - for machine interpretation. - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - infrastructureReady: - description: infrastructureReady is the state of the infrastructure - provider. - type: boolean - lastUpdated: - description: lastUpdated identifies when the phase of the Machine - last transitioned. - format: date-time - type: string - nodeRef: - description: nodeRef will point to the corresponding Node if it exists. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - phase: - description: |- - phase represents the current phase of machine actuation. - E.g. Pending, Running, Terminating, Failed etc. - type: string - version: - description: |- - version specifies the current version of Kubernetes running - on the corresponding Node. This is meant to be a means of bubbling - up status from the Node to the Machine. - It is entirely optional, but useful for end-user UX if it’s present. - type: string - type: object - type: object - served: false - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster - jsonPath: .spec.clusterName - name: Cluster - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Provider ID - jsonPath: .spec.providerID - name: ProviderID - type: string - - description: Machine status such as Terminating/Pending/Running/Failed etc - jsonPath: .status.phase - name: Phase - type: string - - description: Kubernetes version associated with this Machine - jsonPath: .spec.version - name: Version - type: string - - description: Node name associated with this machine - jsonPath: .status.nodeRef.name - name: NodeName - priority: 1 - type: string - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - Machine is the Schema for the machines API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of Machine. - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.DataSecretName without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - status: - description: status is the observed state of Machine. - properties: - addresses: - description: |- - addresses is a list of addresses assigned to the machine. - This field is copied from the infrastructure provider reference. - items: - description: MachineAddress contains information for the node's - address. - properties: - address: - description: address is the machine address. - type: string - type: - description: type is the machine address type, one of Hostname, - ExternalIP or InternalIP. - type: string - required: - - address - - type - type: object - type: array - bootstrapReady: - description: bootstrapReady is the state of the bootstrap provider. - type: boolean - conditions: - description: conditions defines current service state of the Machine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: |- - failureMessage will be set in the event that there is a terminal problem - reconciling the Machine and will contain a more verbose string suitable - for logging and human consumption. - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - failureReason: - description: |- - failureReason will be set in the event that there is a terminal problem - reconciling the Machine and will contain a succinct value suitable - for machine interpretation. - - This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the Machine's spec or the configuration of - the controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the controller, or the - responsible controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. - type: string - infrastructureReady: - description: infrastructureReady is the state of the infrastructure - provider. - type: boolean - lastUpdated: - description: lastUpdated identifies when the phase of the Machine - last transitioned. - format: date-time - type: string - nodeInfo: - description: |- - nodeInfo is a set of ids/uuids to uniquely identify the node. - More info: https://kubernetes.io/docs/concepts/nodes/node/#info - properties: - architecture: - description: The Architecture reported by the node - type: string - bootID: - description: Boot ID reported by the node. - type: string - containerRuntimeVersion: - description: ContainerRuntime Version reported by the node through - runtime remote API (e.g. containerd://1.4.2). - type: string - kernelVersion: - description: Kernel Version reported by the node from 'uname -r' - (e.g. 3.16.0-0.bpo.4-amd64). - type: string - kubeProxyVersion: - description: 'Deprecated: KubeProxy Version reported by the node.' - type: string - kubeletVersion: - description: Kubelet Version reported by the node. - type: string - machineID: - description: |- - MachineID reported by the node. For unique machine identification - in the cluster this field is preferred. Learn more from man(5) - machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - type: string - operatingSystem: - description: The Operating System reported by the node - type: string - osImage: - description: OS Image reported by the node from /etc/os-release - (e.g. Debian GNU/Linux 7 (wheezy)). - type: string - systemUUID: - description: |- - SystemUUID reported by the node. For unique machine identification - MachineID is preferred. This field is specific to Red Hat hosts - https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid - type: string - required: - - architecture - - bootID - - containerRuntimeVersion - - kernelVersion - - kubeProxyVersion - - kubeletVersion - - machineID - - operatingSystem - - osImage - - systemUUID - type: object - nodeRef: - description: nodeRef will point to the corresponding Node if it exists. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - observedGeneration: - description: observedGeneration is the latest generation observed - by the controller. - format: int64 - type: integer - phase: - description: |- - phase represents the current phase of machine actuation. - E.g. Pending, Running, Terminating, Failed etc. - type: string - version: - description: |- - version specifies the current version of Kubernetes running - on the corresponding Node. This is meant to be a means of bubbling - up status from the Node to the Machine. - It is entirely optional, but useful for end-user UX if it’s present. - type: string - type: object - type: object - served: false - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Cluster jsonPath: .spec.clusterName @@ -12636,6 +16983,7 @@ spec: jsonPath: .spec.version name: Version type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -12718,7 +17066,7 @@ spec: dataSecretName is the name of the secret that stores the bootstrap data script. If nil, the Machine should remain in the Pending state. maxLength: 253 - minLength: 1 + minLength: 0 type: string type: object clusterName: @@ -12859,6 +17207,69 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to corev1.Taint, + but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid values + are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. @@ -12984,6 +17395,20 @@ spec: Only present when the Machine has a deletionTimestamp and waiting for volume detachments had been started. format: date-time type: string + waitForPreDrainHookStartTime: + description: |- + waitForPreDrainHookStartTime is the time when waiting for pre-drain hooks started + and is used to determine if the pre-drain hooks are taking too long. + Only present when the Machine has a deletionTimestamp and waiting for pre-drain hooks had been started. + format: date-time + type: string + waitForPreTerminateHookStartTime: + description: |- + waitForPreTerminateHookStartTime is the time when waiting for pre-terminate hooks started + and is used to determine if the pre-terminate hooks are taking too long. + Only present when the Machine has a deletionTimestamp and waiting for pre-terminate hooks had been started. + format: date-time + type: string type: object failureMessage: description: |- @@ -13004,7 +17429,7 @@ spec: can be added as events to the Machine object and/or logged in the controller's output. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. maxLength: 10240 minLength: 1 type: string @@ -13027,7 +17452,7 @@ spec: can be added as events to the Machine object and/or logged in the controller's output. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string infrastructureReady: description: infrastructureReady is the state of the infrastructure @@ -13076,6 +17501,14 @@ spec: description: OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). type: string + swap: + description: Swap Info reported by the node. + properties: + capacity: + description: Total amount of swap memory in bytes. + format: int64 + type: integer + type: object systemUUID: description: |- SystemUUID reported by the node. For unique machine identification @@ -13230,6 +17663,759 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Node name associated with this machine + jsonPath: .status.nodeRef.name + name: Node Name + type: string + - description: Provider ID + jsonPath: .spec.providerID + name: Provider ID + priority: 10 + type: string + - description: The failure domain where the Machine has been scheduled + jsonPath: .status.failureDomain + name: Failure domain + type: string + - description: Machine pass all readiness checks + jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - description: Machine is Ready for at least MinReadySeconds + jsonPath: .status.conditions[?(@.type=="Available")].status + name: Available + type: string + - description: ' Machine spec matches the spec of the Machine''s owner resource, + e.g. MachineDeployment' + jsonPath: .status.conditions[?(@.type=="UpToDate")].status + name: Up-to-date + type: string + - description: Internal IP of the machine + jsonPath: .status.addresses[?(@.type=="InternalIP")].address + name: Internal-IP + priority: 10 + type: string + - description: External IP of the machine + jsonPath: .status.addresses[?(@.type=="ExternalIP")].address + name: External-IP + priority: 10 + type: string + - description: OS Image reported by the node + jsonPath: .status.nodeInfo.osImage + name: OS-Image + priority: 10 + type: string + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: Machine status such as Terminating/Pending/Running/Failed etc + jsonPath: .status.phase + name: Phase + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Kubernetes version associated with this Machine + jsonPath: .spec.version + name: Version + type: string + name: v1beta2 + schema: + openAPIV3Schema: + description: Machine is the Schema for the machines API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of Machine. + properties: + bootstrap: + description: |- + bootstrap is a reference to a local struct which encapsulates + fields to configure the Machine’s bootstrapping mechanism. + properties: + configRef: + description: |- + configRef is a reference to a bootstrap provider-specific resource + that holds configuration details. The reference is optional to + allow users/operators to specify Bootstrap.DataSecretName without + the need of a controller. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + dataSecretName: + description: |- + dataSecretName is the name of the secret that stores the bootstrap data script. + If nil, the Machine should remain in the Pending state. + maxLength: 253 + minLength: 0 + type: string + type: object + clusterName: + description: clusterName is the name of the Cluster this object belongs + to. + maxLength: 63 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for Machine deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + format: int32 + minimum: 0 + type: integer + type: object + failureDomain: + description: |- + failureDomain is the failure domain the machine will be created in. + Must match the name of a FailureDomain from the Cluster status. + maxLength: 256 + minLength: 1 + type: string + infrastructureRef: + description: |- + infrastructureRef is a required reference to a custom resource + offered by an infrastructure provider. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a Machine should be ready before considering it available. + Defaults to 0 (Machine will be considered available as soon as the Machine is ready) + format: int32 + minimum: 0 + type: integer + providerID: + description: |- + providerID is the identification ID of the machine provided by the provider. + This field must match the provider ID as seen on the node object corresponding to this machine. + This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler + with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out + machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a + generic out-of-tree provider for autoscaler, this field is required by autoscaler to be + able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver + and then a comparison is done to find out unregistered machines and are marked for delete. + This field will be set by the actuators and consumed by higher level entities like autoscaler that will + be interfacing with cluster-api as generic provider. + maxLength: 512 + minLength: 1 + type: string + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. by Cluster API control plane providers to extend the semantic of the + Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates + for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc. + + Another example are external controllers, e.g. responsible to install special software/hardware on the Machines; + they can include the status of those components with a new condition and add this condition to ReadinessGates. + + NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those + readiness gates condition are reporting the same message, when computing the Machine's Ready condition those + readinessGates will be replaced by a single entry reporting "Control plane components: " + message. + This helps to improve readability of conditions bubbling up to the Machine's owner resource / to the Cluster). + items: + description: MachineReadinessGate contains the type of a Machine + condition to be used as a readiness gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to corev1.Taint, + but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid values + are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + version: + description: |- + version defines the desired Kubernetes version. + This field is meant to be optionally used by bootstrap providers. + maxLength: 256 + minLength: 1 + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + status: + description: status is the observed state of Machine. + minProperties: 1 + properties: + addresses: + description: |- + addresses is a list of addresses assigned to the machine. + This field is copied from the infrastructure provider reference. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: address is the machine address. + maxLength: 256 + minLength: 1 + type: string + type: + description: type is the machine address type, one of Hostname, + ExternalIP, InternalIP, ExternalDNS or InternalDNS. + enum: + - Hostname + - ExternalIP + - InternalIP + - ExternalDNS + - InternalDNS + type: string + required: + - address + - type + type: object + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + certificatesExpiryDate: + description: |- + certificatesExpiryDate is the expiry date of the machine certificates. + This value is only set for control plane machines. + format: date-time + type: string + conditions: + description: |- + conditions represents the observations of a Machine's current state. + Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, + NodeHealthy, Updating, Deleting, Paused. + If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. + Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: + APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy, NodeKubeadmLabelsAndTaintsSet. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deletion: + description: |- + deletion contains information relating to removal of the Machine. + Only present when the Machine has a deletionTimestamp and drain or wait for volume detach started. + properties: + nodeDrainStartTime: + description: |- + nodeDrainStartTime is the time when the drain of the node started and is used to determine + if the nodeDrainTimeoutSeconds is exceeded. + Only present when the Machine has a deletionTimestamp and draining the node had been started. + format: date-time + type: string + waitForNodeVolumeDetachStartTime: + description: |- + waitForNodeVolumeDetachStartTime is the time when waiting for volume detachment started + and is used to determine if the nodeVolumeDetachTimeoutSeconds is exceeded. + Detaching volumes from nodes is usually done by CSI implementations and the current state + is observed from the node's `.Status.VolumesAttached` field. + Only present when the Machine has a deletionTimestamp and waiting for volume detachments had been started. + format: date-time + type: string + waitForPreDrainHookStartTime: + description: |- + waitForPreDrainHookStartTime is the time when waiting for pre-drain hooks started + and is used to determine if the pre-drain hooks are taking too long. + Only present when the Machine has a deletionTimestamp and waiting for pre-drain hooks had been started. + format: date-time + type: string + waitForPreTerminateHookStartTime: + description: |- + waitForPreTerminateHookStartTime is the time when waiting for pre-terminate hooks started + and is used to determine if the pre-terminate hooks are taking too long. + Only present when the Machine has a deletionTimestamp and waiting for pre-terminate hooks had been started. + format: date-time + type: string + type: object + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: |- + v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + conditions: + description: |- + conditions defines current service state of the Machine. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureMessage: + description: |- + failureMessage will be set in the event that there is a terminal problem + reconciling the Machine and will contain a more verbose string suitable + for logging and human consumption. + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + maxLength: 10240 + minLength: 1 + type: string + failureReason: + description: |- + failureReason will be set in the event that there is a terminal problem + reconciling the Machine and will contain a succinct value suitable + for machine interpretation. + + This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the Machine's spec or the configuration of + the controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the controller, or the + responsible controller itself being critically misconfigured. + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the Machine object and/or logged in the + controller's output. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + type: string + type: object + type: object + failureDomain: + description: failureDomain is the failure domain where the Machine + has been scheduled. + maxLength: 256 + minLength: 1 + type: string + initialization: + description: |- + initialization provides observations of the Machine initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning. + minProperties: 1 + properties: + bootstrapDataSecretCreated: + description: |- + bootstrapDataSecretCreated is true when the bootstrap provider reports that the Machine's boostrap secret is created. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. + The value of this field is never updated after provisioning is completed. + type: boolean + infrastructureProvisioned: + description: |- + infrastructureProvisioned is true when the infrastructure provider reports that Machine's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object + lastUpdated: + description: lastUpdated identifies when the phase of the Machine + last transitioned. + format: date-time + type: string + nodeInfo: + description: |- + nodeInfo is a set of ids/uuids to uniquely identify the node. + More info: https://kubernetes.io/docs/concepts/nodes/node/#info + properties: + architecture: + description: The Architecture reported by the node + type: string + bootID: + description: Boot ID reported by the node. + type: string + containerRuntimeVersion: + description: ContainerRuntime Version reported by the node through + runtime remote API (e.g. containerd://1.4.2). + type: string + kernelVersion: + description: Kernel Version reported by the node from 'uname -r' + (e.g. 3.16.0-0.bpo.4-amd64). + type: string + kubeProxyVersion: + description: 'Deprecated: KubeProxy Version reported by the node.' + type: string + kubeletVersion: + description: Kubelet Version reported by the node. + type: string + machineID: + description: |- + MachineID reported by the node. For unique machine identification + in the cluster this field is preferred. Learn more from man(5) + machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html + type: string + operatingSystem: + description: The Operating System reported by the node + type: string + osImage: + description: OS Image reported by the node from /etc/os-release + (e.g. Debian GNU/Linux 7 (wheezy)). + type: string + swap: + description: Swap Info reported by the node. + properties: + capacity: + description: Total amount of swap memory in bytes. + format: int64 + type: integer + type: object + systemUUID: + description: |- + SystemUUID reported by the node. For unique machine identification + MachineID is preferred. This field is specific to Red Hat hosts + https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid + type: string + required: + - architecture + - bootID + - containerRuntimeVersion + - kernelVersion + - kubeProxyVersion + - kubeletVersion + - machineID + - operatingSystem + - osImage + - systemUUID + type: object + nodeRef: + description: nodeRef will point to the corresponding Node if it exists. + properties: + name: + description: |- + name of the node. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - name + type: object + observedGeneration: + description: observedGeneration is the latest generation observed + by the controller. + format: int64 + minimum: 1 + type: integer + phase: + description: phase represents the current phase of machine actuation. + enum: + - Pending + - Provisioning + - Provisioned + - Running + - Updating + - Deleting + - Deleted + - Failed + - Unknown + type: string + type: object + required: + - spec + type: object + served: true storage: true subresources: status: {} @@ -13239,7 +18425,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: capi-system/capi-serving-cert - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.21.0 labels: cluster.x-k8s.io/provider: cluster-api name: machinesets.cluster.x-k8s.io @@ -13254,7 +18440,6 @@ spec: path: /convert conversionReviewVersions: - v1 - - v1beta1 group: cluster.x-k8s.io names: categories: @@ -13267,917 +18452,6 @@ spec: singular: machineset scope: Namespaced versions: - - additionalPrinterColumns: - - description: Total number of non-terminated machines targeted by this machineset - jsonPath: .status.replicas - name: Replicas - type: integer - - description: Total number of available machines (ready for at least minReadySeconds) - jsonPath: .status.availableReplicas - name: Available - type: integer - - description: Total number of ready machines targeted by this machineset. - jsonPath: .status.readyReplicas - name: Ready - type: integer - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: |- - MachineSet is the Schema for the machinesets API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of MachineSet. - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - deletePolicy: - description: |- - deletePolicy defines the policy used to identify nodes to delete when downscaling. - Defaults to "Random". Valid values are "Random, "Newest", "Oldest" - enum: - - Random - - Newest - - Oldest - type: string - minReadySeconds: - description: |- - minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. - Defaults to 0 (machine will be considered available as soon as it is ready) - format: int32 - type: integer - replicas: - description: |- - replicas is the number of desired replicas. - This is a pointer to distinguish between explicit zero and unspecified. - Defaults to 1. - format: int32 - type: integer - selector: - description: |- - selector is a label query over machines that should match the replica count. - Label keys and values that must match in order to be controlled by this MachineSet. - It must match the machine template's labels. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - template: - description: |- - template is the object that describes the machine that will be created if - insufficient replicas are detected. - Object references to custom resources are treated as templates. - properties: - metadata: - description: |- - metadata is the standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - generateName: - description: |- - generateName is an optional prefix, used by the server, to generate a unique - name ONLY IF the Name field has not been provided. - If this field is used, the name returned to the client will be different - than the name passed. This value will also be combined with a unique suffix. - The provided value has the same validation rules as the Name field, - and may be truncated by the length of the suffix required to make the value - unique on the server. - - If this field is specified and the generated name exists, the server will - NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - ServerTimeout indicating a unique name could not be found in the time allotted, and the client - should retry (optionally after the time indicated in the Retry-After header). - - Applied only if Name is not specified. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - namespace: - description: |- - namespace defines the space within each name must be unique. An empty namespace is - equivalent to the "default" namespace, but "default" is the canonical representation. - Not all objects are required to be scoped to a namespace - the value of this field for - those objects will be empty. - - Must be a DNS_LABEL. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces - - Deprecated: This field has no function and is going to be removed in a next release. - type: string - ownerReferences: - description: |- - ownerReferences is the list of objects depended by this object. If ALL objects in the list have - been deleted, this object will be garbage collected. If this object is managed by a controller, - then an entry in this list will point to this controller, with the controller field set to true. - There cannot be more than one managing controller. - - Deprecated: This field has no function and is going to be removed in a next release. - items: - description: |- - OwnerReference contains enough information to let you identify an owning - object. An owning object must be in the same namespace as the dependent, or - be cluster-scoped, so there is no namespace field. - properties: - apiVersion: - description: API version of the referent. - type: string - blockOwnerDeletion: - description: |- - If true, AND if the owner has the "foregroundDeletion" finalizer, then - the owner cannot be deleted from the key-value store until this - reference is removed. - See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - for how the garbage collector interacts with this field and enforces the foreground deletion. - Defaults to false. - To set this field, a user needs "delete" permission of the owner, - otherwise 422 (Unprocessable Entity) will be returned. - type: boolean - controller: - description: If true, this reference points to the managing - controller. - type: boolean - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - type: string - required: - - apiVersion - - kind - - name - - uid - type: object - x-kubernetes-map-type: atomic - type: array - type: object - spec: - description: |- - spec is the specification of the desired behavior of the machine. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.Data without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - data: - description: |- - data contains the bootstrap data, such as cloud-init details scripts. - If nil, the Machine should remain in the Pending state. - - Deprecated: Switch to DataSecretName. - type: string - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object - belongs to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - type: object - required: - - clusterName - - selector - type: object - status: - description: status is the observed state of MachineSet. - properties: - availableReplicas: - description: availableReplicas is the number of available replicas - (ready for at least minReadySeconds) for this MachineSet. - format: int32 - type: integer - failureMessage: - description: |- - failureMessage will be set in the event that there is a terminal problem - reconciling the Machine and will contain a more verbose string suitable - for logging and human consumption. - type: string - failureReason: - description: |- - failureReason will be set in the event that there is a terminal problem - reconciling the Machine and will contain a succinct value suitable - for machine interpretation. - - In the event that there is a terminal problem reconciling the - replicas, both FailureReason and FailureMessage will be set. FailureReason - will be populated with a succinct value suitable for machine - interpretation, while FailureMessage will contain a more verbose - string suitable for logging and human consumption. - - These fields should not be set for transitive errors that a - controller faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the MachineTemplate's spec or the configuration of - the machine controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the machine controller, or the - responsible machine controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the MachineSet object and/or logged in the - controller's output. - type: string - fullyLabeledReplicas: - description: fullyLabeledReplicas is the number of replicas that have - labels matching the labels of the machine template of the MachineSet. - format: int32 - type: integer - observedGeneration: - description: observedGeneration reflects the generation of the most - recently observed MachineSet. - format: int64 - type: integer - readyReplicas: - description: readyReplicas is the number of ready replicas for this - MachineSet. A machine is considered ready when the node has been - created and is "Ready". - format: int32 - type: integer - replicas: - description: replicas is the most recently observed number of replicas. - format: int32 - type: integer - selector: - description: |- - selector is the same as the label selector but in the string format to avoid introspection - by clients. The string will be in the same format as the query-param syntax. - More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - type: string - type: object - type: object - served: false - storage: false - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - - additionalPrinterColumns: - - description: Cluster - jsonPath: .spec.clusterName - name: Cluster - type: string - - description: Time duration since creation of MachineSet - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Total number of non-terminated machines targeted by this machineset - jsonPath: .status.replicas - name: Replicas - type: integer - - description: Total number of available machines (ready for at least minReadySeconds) - jsonPath: .status.availableReplicas - name: Available - type: integer - - description: Total number of ready machines targeted by this machineset. - jsonPath: .status.readyReplicas - name: Ready - type: integer - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: |- - MachineSet is the Schema for the machinesets API. - - Deprecated: This type will be removed in one of the next releases. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec is the desired state of MachineSet. - properties: - clusterName: - description: clusterName is the name of the Cluster this object belongs - to. - minLength: 1 - type: string - deletePolicy: - description: |- - deletePolicy defines the policy used to identify nodes to delete when downscaling. - Defaults to "Random". Valid values are "Random, "Newest", "Oldest" - enum: - - Random - - Newest - - Oldest - type: string - minReadySeconds: - description: |- - minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. - Defaults to 0 (machine will be considered available as soon as it is ready) - format: int32 - type: integer - replicas: - default: 1 - description: |- - replicas is the number of desired replicas. - This is a pointer to distinguish between explicit zero and unspecified. - Defaults to 1. - format: int32 - type: integer - selector: - description: |- - selector is a label query over machines that should match the replica count. - Label keys and values that must match in order to be controlled by this MachineSet. - It must match the machine template's labels. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - template: - description: |- - template is the object that describes the machine that will be created if - insufficient replicas are detected. - Object references to custom resources are treated as templates. - properties: - metadata: - description: |- - metadata is the standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - properties: - annotations: - additionalProperties: - type: string - description: |- - annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - labels is a map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - type: object - spec: - description: |- - spec is the specification of the desired behavior of the machine. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - bootstrap: - description: |- - bootstrap is a reference to a local struct which encapsulates - fields to configure the Machine’s bootstrapping mechanism. - properties: - configRef: - description: |- - configRef is a reference to a bootstrap provider-specific resource - that holds configuration details. The reference is optional to - allow users/operators to specify Bootstrap.DataSecretName without - the need of a controller. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - dataSecretName: - description: |- - dataSecretName is the name of the secret that stores the bootstrap data script. - If nil, the Machine should remain in the Pending state. - type: string - type: object - clusterName: - description: clusterName is the name of the Cluster this object - belongs to. - minLength: 1 - type: string - failureDomain: - description: |- - failureDomain is the failure domain the machine will be created in. - Must match a key in the FailureDomains map stored on the cluster object. - type: string - infrastructureRef: - description: |- - infrastructureRef is a required reference to a custom resource - offered by an infrastructure provider. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - nodeDrainTimeout: - description: |- - nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - The default value is 0, meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - type: string - providerID: - description: |- - providerID is the identification ID of the machine provided by the provider. - This field must match the provider ID as seen on the node object corresponding to this machine. - This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - and then a comparison is done to find out unregistered machines and are marked for delete. - This field will be set by the actuators and consumed by higher level entities like autoscaler that will - be interfacing with cluster-api as generic provider. - type: string - version: - description: |- - version defines the desired Kubernetes version. - This field is meant to be optionally used by bootstrap providers. - type: string - required: - - bootstrap - - clusterName - - infrastructureRef - type: object - type: object - required: - - clusterName - - selector - type: object - status: - description: status is the observed state of MachineSet. - properties: - availableReplicas: - description: availableReplicas is the number of available replicas - (ready for at least minReadySeconds) for this MachineSet. - format: int32 - type: integer - conditions: - description: conditions defines current service state of the MachineSet. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when - the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This field may be empty. - type: string - reason: - description: |- - reason is the reason for the condition's last transition in CamelCase. - The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. - type: string - severity: - description: |- - severity provides an explicit classification of Reason code, so the users or machines can immediately - understand the current situation and act accordingly. - The Severity field MUST be set only when Status=False. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - can be useful (see .node.status.conditions), the ability to deconflict is important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: |- - failureMessage will be set in the event that there is a terminal problem - reconciling the Machine and will contain a more verbose string suitable - for logging and human consumption. - type: string - failureReason: - description: |- - failureReason will be set in the event that there is a terminal problem - reconciling the Machine and will contain a succinct value suitable - for machine interpretation. - - In the event that there is a terminal problem reconciling the - replicas, both FailureReason and FailureMessage will be set. FailureReason - will be populated with a succinct value suitable for machine - interpretation, while FailureMessage will contain a more verbose - string suitable for logging and human consumption. - - These fields should not be set for transitive errors that a - controller faces that are expected to be fixed automatically over - time (like service outages), but instead indicate that something is - fundamentally wrong with the MachineTemplate's spec or the configuration of - the machine controller, and that manual intervention is required. Examples - of terminal errors would be invalid combinations of settings in the - spec, values that are unsupported by the machine controller, or the - responsible machine controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the MachineSet object and/or logged in the - controller's output. - type: string - fullyLabeledReplicas: - description: fullyLabeledReplicas is the number of replicas that have - labels matching the labels of the machine template of the MachineSet. - format: int32 - type: integer - observedGeneration: - description: observedGeneration reflects the generation of the most - recently observed MachineSet. - format: int64 - type: integer - readyReplicas: - description: readyReplicas is the number of ready replicas for this - MachineSet. A machine is considered ready when the node has been - created and is "Ready". - format: int32 - type: integer - replicas: - description: replicas is the most recently observed number of replicas. - format: int32 - type: integer - selector: - description: |- - selector is the same as the label selector but in the string format to avoid introspection - by clients. The string will be in the same format as the query-param syntax. - More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - type: string - type: object - type: object - served: false - storage: false - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - additionalPrinterColumns: - description: Cluster jsonPath: .spec.clusterName @@ -14208,6 +18482,7 @@ spec: jsonPath: .spec.template.spec.version name: Version type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: @@ -14242,7 +18517,7 @@ spec: deletePolicy: description: |- deletePolicy defines the policy used to identify nodes to delete when downscaling. - Defaults to "Random". Valid values are "Random, "Newest", "Oldest" + Defaults to "Random". Valid values are "Random", "Newest", "Oldest" enum: - Random - Newest @@ -14444,7 +18719,7 @@ spec: dataSecretName is the name of the secret that stores the bootstrap data script. If nil, the Machine should remain in the Pending state. maxLength: 253 - minLength: 1 + minLength: 0 type: string type: object clusterName: @@ -14585,6 +18860,69 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. @@ -14668,7 +19006,7 @@ spec: reconciling the Machine and will contain a more verbose string suitable for logging and human consumption. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. maxLength: 10240 minLength: 1 type: string @@ -14697,13 +19035,13 @@ spec: can be added as events to the MachineSet object and/or logged in the controller's output. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string fullyLabeledReplicas: description: |- fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet. - Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. format: int32 type: integer observedGeneration: @@ -14816,9 +19154,801 @@ spec: format: int32 type: integer type: object + versions: + description: versions is the aggregated Kubernetes versions in this + MachineSet. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - version + x-kubernetes-list-type: map type: object type: object served: true + storage: false + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: The desired number of machines + jsonPath: .spec.replicas + name: Desired + type: integer + - description: The number of machines + jsonPath: .status.replicas + name: Current + type: integer + - description: The number of machines with Ready condition true + jsonPath: .status.readyReplicas + name: Ready + type: integer + - description: The number of machines with Available condition true + jsonPath: .status.availableReplicas + name: Available + type: integer + - description: The number of machines with UpToDate condition true + jsonPath: .status.upToDateReplicas + name: Up-to-date + type: integer + - description: Reconciliation paused + jsonPath: .status.conditions[?(@.type=="Paused")].status + name: Paused + priority: 10 + type: string + - description: Time duration since creation of MachineSet + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Kubernetes version associated with this MachineSet + jsonPath: .spec.template.spec.version + name: Version + type: string + name: v1beta2 + schema: + openAPIV3Schema: + description: MachineSet is the Schema for the machinesets API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec is the desired state of MachineSet. + properties: + clusterName: + description: clusterName is the name of the Cluster this object belongs + to. + maxLength: 63 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for MachineSet + deletion. + minProperties: 1 + properties: + order: + description: |- + order defines the order in which Machines are deleted when downscaling. + Defaults to "Random". Valid values are "Random", "Newest", "Oldest" + enum: + - Random + - Newest + - Oldest + type: string + type: object + machineNaming: + description: |- + machineNaming allows changing the naming pattern used when creating Machines. + Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines. + minProperties: 1 + properties: + template: + description: |- + template defines the template to use for generating the names of the + Machine objects. + If not defined, it will fallback to `{{ .machineSet.name }}-{{ .random }}`. + If the generated name string exceeds 63 characters, it will be trimmed to + 58 characters and will + get concatenated with a random suffix of length 5. + Length of the template string must not exceed 256 characters. + The template allows the following variables `.cluster.name`, + `.machineSet.name` and `.random`. + The variable `.cluster.name` retrieves the name of the cluster object + that owns the Machines being created. + The variable `.machineSet.name` retrieves the name of the MachineSet + object that owns the Machines being created. + The variable `.random` is substituted with random alphanumeric string, + without vowels, of length 5. This variable is required part of the + template. If not provided, validation will fail. + maxLength: 256 + minLength: 1 + type: string + type: object + replicas: + description: |- + replicas is the number of desired replicas. + This is a pointer to distinguish between explicit zero and unspecified. + + Defaults to: + * if the Kubernetes autoscaler min size and max size annotations are set: + - if it's a new MachineSet, use min size + - if the replicas field of the old MachineSet is < min size, use min size + - if the replicas field of the old MachineSet is > max size, use max size + - if the replicas field of the old MachineSet is in the (min size, max size) range, keep the value from the oldMS + * otherwise use 1 + Note: Defaulting will be run whenever the replicas field is not set: + * A new MachineSet is created with replicas not set. + * On an existing MachineSet the replicas field was first set and is now unset. + Those cases are especially relevant for the following Kubernetes autoscaler use cases: + * A new MachineSet is created and replicas should be managed by the autoscaler + * An existing MachineSet which initially wasn't controlled by the autoscaler + should be later controlled by the autoscaler + format: int32 + type: integer + selector: + description: |- + selector is a label query over machines that should match the replica count. + Label keys and values that must match in order to be controlled by this MachineSet. + It must match the machine template's labels. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + template: + description: |- + template is the object that describes the machine that will be created if + insufficient replicas are detected. + Object references to custom resources are treated as templates. + properties: + metadata: + description: |- + metadata is the standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + minProperties: 1 + properties: + annotations: + additionalProperties: + type: string + description: |- + annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + type: object + labels: + additionalProperties: + type: string + description: |- + labels is a map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + type: object + type: object + spec: + description: |- + spec is the specification of the desired behavior of the machine. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + bootstrap: + description: |- + bootstrap is a reference to a local struct which encapsulates + fields to configure the Machine’s bootstrapping mechanism. + properties: + configRef: + description: |- + configRef is a reference to a bootstrap provider-specific resource + that holds configuration details. The reference is optional to + allow users/operators to specify Bootstrap.DataSecretName without + the need of a controller. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + dataSecretName: + description: |- + dataSecretName is the name of the secret that stores the bootstrap data script. + If nil, the Machine should remain in the Pending state. + maxLength: 253 + minLength: 0 + type: string + type: object + clusterName: + description: clusterName is the name of the Cluster this object + belongs to. + maxLength: 63 + minLength: 1 + type: string + deletion: + description: deletion contains configuration options for Machine + deletion. + minProperties: 1 + properties: + nodeDeletionTimeoutSeconds: + description: |- + nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine + hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. + Defaults to 10 seconds. + format: int32 + minimum: 0 + type: integer + nodeDrainTimeoutSeconds: + description: |- + nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node. + The default value is 0, meaning that the node can be drained without any time limitations. + NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout` + format: int32 + minimum: 0 + type: integer + nodeVolumeDetachTimeoutSeconds: + description: |- + nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes + to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + format: int32 + minimum: 0 + type: integer + type: object + failureDomain: + description: |- + failureDomain is the failure domain the machine will be created in. + Must match the name of a FailureDomain from the Cluster status. + maxLength: 256 + minLength: 1 + type: string + infrastructureRef: + description: |- + infrastructureRef is a required reference to a custom resource + offered by an infrastructure provider. + properties: + apiGroup: + description: |- + apiGroup is the group of the resource being referenced. + apiGroup must be fully qualified domain name. + The corresponding version for this reference will be looked up from the contract + labels of the corresponding CRD of the resource being referenced. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: |- + kind of the resource being referenced. + kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: |- + name of the resource being referenced. + name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - apiGroup + - kind + - name + type: object + minReadySeconds: + description: |- + minReadySeconds is the minimum number of seconds for which a Machine should be ready before considering it available. + Defaults to 0 (Machine will be considered available as soon as the Machine is ready) + format: int32 + minimum: 0 + type: integer + providerID: + description: |- + providerID is the identification ID of the machine provided by the provider. + This field must match the provider ID as seen on the node object corresponding to this machine. + This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler + with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out + machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a + generic out-of-tree provider for autoscaler, this field is required by autoscaler to be + able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver + and then a comparison is done to find out unregistered machines and are marked for delete. + This field will be set by the actuators and consumed by higher level entities like autoscaler that will + be interfacing with cluster-api as generic provider. + maxLength: 512 + minLength: 1 + type: string + readinessGates: + description: |- + readinessGates specifies additional conditions to include when evaluating Machine Ready condition. + + This field can be used e.g. by Cluster API control plane providers to extend the semantic of the + Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates + for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc. + + Another example are external controllers, e.g. responsible to install special software/hardware on the Machines; + they can include the status of those components with a new condition and add this condition to ReadinessGates. + + NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those + readiness gates condition are reporting the same message, when computing the Machine's Ready condition those + readinessGates will be replaced by a single entry reporting "Control plane components: " + message. + This helps to improve readability of conditions bubbling up to the Machine's owner resource / to the Cluster). + items: + description: MachineReadinessGate contains the type of a + Machine condition to be used as a readiness gate. + properties: + conditionType: + description: |- + conditionType refers to a condition with matching type in the Machine's condition list. + If the conditions doesn't exist, it will be treated as unknown. + Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates. + maxLength: 316 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + polarity: + description: |- + polarity of the conditionType specified in this readinessGate. + Valid values are Positive, Negative and omitted. + When omitted, the default behaviour will be Positive. + A positive polarity means that the condition should report a true status under normal conditions. + A negative polarity means that the condition should report a false status under normal conditions. + enum: + - Positive + - Negative + type: string + required: + - conditionType + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - conditionType + x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + type: string + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map + version: + description: |- + version defines the desired Kubernetes version. + This field is meant to be optionally used by bootstrap providers. + maxLength: 256 + minLength: 1 + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + required: + - spec + type: object + required: + - clusterName + - selector + - template + type: object + status: + description: status is the observed state of MachineSet. + minProperties: 1 + properties: + availableReplicas: + description: availableReplicas is the number of available replicas + for this MachineSet. A machine is considered available when Machine's + Available condition is true. + format: int32 + type: integer + conditions: + description: |- + conditions represents the observations of a MachineSet's current state. + Known condition types are MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + deprecated: + description: deprecated groups all the status fields that are deprecated + and will be removed when all the nested field are removed. + properties: + v1beta1: + description: v1beta1 groups all the status fields that are deprecated + and will be removed when support for v1beta1 will be dropped. + properties: + availableReplicas: + description: |- + availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + conditions: + description: |- + conditions defines current service state of the MachineSet. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + items: + description: |- + Condition defines an observation of a Cluster API resource operational state. + + Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of True, False, + Unknown. + type: string + type: + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureMessage: + description: |- + failureMessage will be set in the event that there is a terminal problem + reconciling the Machine and will contain a more verbose string suitable + for logging and human consumption. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + maxLength: 10240 + minLength: 1 + type: string + failureReason: + description: |- + failureReason will be set in the event that there is a terminal problem + reconciling the Machine and will contain a succinct value suitable + for machine interpretation. + + In the event that there is a terminal problem reconciling the + replicas, both FailureReason and FailureMessage will be set. FailureReason + will be populated with a succinct value suitable for machine + interpretation, while FailureMessage will contain a more verbose + string suitable for logging and human consumption. + + These fields should not be set for transitive errors that a + controller faces that are expected to be fixed automatically over + time (like service outages), but instead indicate that something is + fundamentally wrong with the MachineTemplate's spec or the configuration of + the machine controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in the + spec, values that are unsupported by the machine controller, or the + responsible machine controller itself being critically misconfigured. + + Any transient errors that occur during the reconciliation of Machines + can be added as events to the MachineSet object and/or logged in the + controller's output. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + type: string + fullyLabeledReplicas: + description: |- + fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet. + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + readyReplicas: + description: |- + readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". + + Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + format: int32 + type: integer + type: object + type: object + observedGeneration: + description: observedGeneration reflects the generation of the most + recently observed MachineSet. + format: int64 + minimum: 1 + type: integer + readyReplicas: + description: readyReplicas is the number of ready replicas for this + MachineSet. A machine is considered ready when Machine's Ready condition + is true. + format: int32 + type: integer + replicas: + description: replicas is the most recently observed number of replicas. + format: int32 + type: integer + selector: + description: |- + selector is the same as the label selector but in the string format to avoid introspection + by clients. The string will be in the same format as the query-param syntax. + More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors + maxLength: 4096 + minLength: 1 + type: string + upToDateReplicas: + description: upToDateReplicas is the number of up-to-date replicas + for this MachineSet. A machine is considered up-to-date when Machine's + UpToDate condition is true. + format: int32 + type: integer + versions: + description: versions is the aggregated Kubernetes versions in this + MachineSet. + items: + description: StatusVersion groups version-related status information. + properties: + replicas: + description: replicas is the number of replicas at this version. + format: int32 + minimum: 1 + type: integer + version: + description: version is the Kubernetes version. + maxLength: 256 + minLength: 1 + type: string + required: + - version + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - version + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true storage: true subresources: scale: @@ -14872,7 +20002,6 @@ metadata: labels: cluster.x-k8s.io/provider: cluster-api name: capi-aggregated-manager-role -rules: [] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -14887,6 +20016,7 @@ rules: resources: - configmaps verbs: + - delete - get - list - patch @@ -15126,7 +20256,7 @@ spec: - --leader-elect - --diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443} - --insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false} - - --feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterResourceSet=${EXP_CLUSTER_RESOURCE_SET:=true},ClusterTopology=${CLUSTER_TOPOLOGY:=false},RuntimeSDK=${EXP_RUNTIME_SDK:=false},MachineSetPreflightChecks=${EXP_MACHINE_SET_PREFLIGHT_CHECKS:=true},MachineWaitForVolumeDetachConsiderVolumeAttachments=${EXP_MACHINE_WAITFORVOLUMEDETACH_CONSIDER_VOLUMEATTACHMENTS:=true},PriorityQueue=${EXP_PRIORITY_QUEUE:=false} + - --feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterTopology=${CLUSTER_TOPOLOGY:=false},RuntimeSDK=${EXP_RUNTIME_SDK:=false},MachineSetPreflightChecks=${EXP_MACHINE_SET_PREFLIGHT_CHECKS:=true},MachineWaitForVolumeDetachConsiderVolumeAttachments=${EXP_MACHINE_WAITFORVOLUMEDETACH_CONSIDER_VOLUMEATTACHMENTS:=true},PriorityQueue=${EXP_PRIORITY_QUEUE:=true},ReconcilerRateLimiting=${EXP_RECONCILER_RATE_LIMITING:=true},InPlaceUpdates=${EXP_IN_PLACE_UPDATES:=false},MachineTaintPropagation=${EXP_MACHINE_TAINT_PROPAGATION:=false} command: - /manager env: @@ -15142,7 +20272,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.uid - image: registry.k8s.io/cluster-api/cluster-api-controller:v1.10.1 + image: registry.k8s.io/cluster-api/cluster-api-controller:v1.14.4 imagePullPolicy: IfNotPresent startupProbe: httpGet: @@ -15238,12 +20368,11 @@ metadata: webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /mutate-cluster-x-k8s-io-v1beta1-cluster + path: /mutate-cluster-x-k8s-io-v1beta2-cluster failurePolicy: Fail matchPolicy: Equivalent name: default.cluster.cluster.x-k8s.io @@ -15251,7 +20380,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15260,34 +20389,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /mutate-cluster-x-k8s-io-v1beta1-clusterclass - failurePolicy: Fail - matchPolicy: Equivalent - name: default.clusterclass.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - clusterclasses - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /mutate-addons-cluster-x-k8s-io-v1beta1-clusterresourceset + path: /mutate-addons-cluster-x-k8s-io-v1beta2-clusterresourceset failurePolicy: Fail matchPolicy: Equivalent name: default.clusterresourceset.addons.cluster.x-k8s.io @@ -15295,7 +20401,7 @@ webhooks: - apiGroups: - addons.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15304,100 +20410,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /mutate-cluster-x-k8s-io-v1beta1-machine - failurePolicy: Fail - matchPolicy: Equivalent - name: default.machine.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machines - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /mutate-cluster-x-k8s-io-v1beta1-machinedeployment - failurePolicy: Fail - matchPolicy: Equivalent - name: default.machinedeployment.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinedeployments - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /mutate-cluster-x-k8s-io-v1beta1-machinehealthcheck - failurePolicy: Fail - matchPolicy: Equivalent - name: default.machinehealthcheck.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinehealthchecks - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /mutate-cluster-x-k8s-io-v1beta1-machineset - failurePolicy: Fail - matchPolicy: Equivalent - name: default.machineset.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinesets - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /mutate-runtime-cluster-x-k8s-io-v1alpha1-extensionconfig + path: /mutate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig failurePolicy: Fail matchPolicy: Equivalent name: default.extensionconfig.runtime.addons.cluster.x-k8s.io @@ -15405,7 +20422,7 @@ webhooks: - apiGroups: - runtime.cluster.x-k8s.io apiVersions: - - v1alpha1 + - v1beta2 operations: - CREATE - UPDATE @@ -15414,12 +20431,74 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /mutate-cluster-x-k8s-io-v1beta1-machinepool + path: /mutate-cluster-x-k8s-io-v1beta2-machine + failurePolicy: Fail + matchPolicy: Equivalent + name: default.machine.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machines + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /mutate-cluster-x-k8s-io-v1beta2-machinedeployment + failurePolicy: Fail + matchPolicy: Equivalent + name: default.machinedeployment.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinedeployments + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /mutate-cluster-x-k8s-io-v1beta2-machinehealthcheck + failurePolicy: Fail + matchPolicy: Equivalent + name: default.machinehealthcheck.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinehealthchecks + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /mutate-cluster-x-k8s-io-v1beta2-machinepool failurePolicy: Fail matchPolicy: Equivalent name: default.machinepool.cluster.x-k8s.io @@ -15427,13 +20506,34 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE resources: - machinepools sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /mutate-cluster-x-k8s-io-v1beta2-machineset + failurePolicy: Fail + matchPolicy: Equivalent + name: default.machineset.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinesets + sideEffects: None --- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration @@ -15446,12 +20546,11 @@ metadata: webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-cluster + path: /validate-cluster-x-k8s-io-v1beta2-cluster failurePolicy: Fail matchPolicy: Equivalent name: validation.cluster.cluster.x-k8s.io @@ -15459,7 +20558,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15469,12 +20568,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-clusterclass + path: /validate-cluster-x-k8s-io-v1beta2-clusterclass failurePolicy: Fail matchPolicy: Equivalent name: validation.clusterclass.cluster.x-k8s.io @@ -15482,7 +20580,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15492,12 +20590,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /validate-addons-cluster-x-k8s-io-v1beta1-clusterresourceset + path: /validate-addons-cluster-x-k8s-io-v1beta2-clusterresourceset failurePolicy: Fail matchPolicy: Equivalent name: validation.clusterresourceset.addons.cluster.x-k8s.io @@ -15505,7 +20602,7 @@ webhooks: - apiGroups: - addons.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15514,12 +20611,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /validate-addons-cluster-x-k8s-io-v1beta1-clusterresourcesetbinding + path: /validate-addons-cluster-x-k8s-io-v1beta2-clusterresourcesetbinding failurePolicy: Fail matchPolicy: Equivalent name: validation.clusterresourcesetbinding.addons.cluster.x-k8s.io @@ -15527,7 +20623,7 @@ webhooks: - apiGroups: - addons.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15536,122 +20632,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-machine - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.machine.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machines - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-machinedeployment - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.machinedeployment.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinedeployments - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-machinedrainrule - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.machinedrainrule.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinedrainrules - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-machinehealthcheck - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.machinehealthcheck.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinehealthchecks - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-machineset - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.machineset.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinesets - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /validate-runtime-cluster-x-k8s-io-v1alpha1-extensionconfig + path: /validate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig failurePolicy: Fail matchPolicy: Equivalent name: validation.extensionconfig.runtime.cluster.x-k8s.io @@ -15659,7 +20644,7 @@ webhooks: - apiGroups: - runtime.cluster.x-k8s.io apiVersions: - - v1alpha1 + - v1beta2 operations: - CREATE - UPDATE @@ -15668,34 +20653,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /validate-cluster-x-k8s-io-v1beta1-machinepool - failurePolicy: Fail - matchPolicy: Equivalent - name: validation.machinepool.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - machinepools - sideEffects: None -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: capi-webhook-service - namespace: capi-system - path: /validate-ipam-cluster-x-k8s-io-v1beta1-ipaddress + path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddress failurePolicy: Fail matchPolicy: Equivalent name: validation.ipaddress.ipam.cluster.x-k8s.io @@ -15703,7 +20665,7 @@ webhooks: - apiGroups: - ipam.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15713,12 +20675,11 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: capi-webhook-service namespace: capi-system - path: /validate-ipam-cluster-x-k8s-io-v1beta1-ipaddressclaim + path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddressclaim failurePolicy: Fail matchPolicy: Equivalent name: validation.ipaddressclaim.ipam.cluster.x-k8s.io @@ -15726,7 +20687,7 @@ webhooks: - apiGroups: - ipam.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -15734,3 +20695,129 @@ webhooks: resources: - ipaddressclaims sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /validate-cluster-x-k8s-io-v1beta2-machine + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.machine.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machines + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /validate-cluster-x-k8s-io-v1beta2-machinedeployment + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.machinedeployment.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinedeployments + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /validate-cluster-x-k8s-io-v1beta2-machinedrainrule + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.machinedrainrule.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinedrainrules + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /validate-cluster-x-k8s-io-v1beta2-machinehealthcheck + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.machinehealthcheck.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinehealthchecks + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /validate-cluster-x-k8s-io-v1beta2-machinepool + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.machinepool.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinepools + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: capi-webhook-service + namespace: capi-system + path: /validate-cluster-x-k8s-io-v1beta2-machineset + failurePolicy: Fail + matchPolicy: Equivalent + name: validation.machineset.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta2 + operations: + - CREATE + - UPDATE + resources: + - machinesets + sideEffects: None diff --git a/packages/system/capi-providers-core/files/metadata.yaml b/packages/system/capi-providers-core/files/metadata.yaml index 5d25cb466..523591366 100644 --- a/packages/system/capi-providers-core/files/metadata.yaml +++ b/packages/system/capi-providers-core/files/metadata.yaml @@ -6,6 +6,18 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 14 + contract: v1beta2 + - major: 1 + minor: 13 + contract: v1beta2 + - major: 1 + minor: 12 + contract: v1beta2 + - major: 1 + minor: 11 + contract: v1beta2 - major: 1 minor: 10 contract: v1beta1 diff --git a/packages/system/capi-providers-core/files/upgrade-providers.sh b/packages/system/capi-providers-core/files/upgrade-providers.sh new file mode 100644 index 000000000..d5d56709e --- /dev/null +++ b/packages/system/capi-providers-core/files/upgrade-providers.sh @@ -0,0 +1,181 @@ +#!/usr/bin/env bash +set -euo pipefail + +: "${KUBE_CONTEXT:?}" "${NAMESPACE:?}" "${BRIDGE_VERSION:?}" "${TARGET_VERSION:?}" + +fail() { + printf 'CAPI upgrade: %s\n' "$*" >&2 + exit 1 +} + +kube() { + local remaining=$((deadline - SECONDS)) status=0 + ((remaining > 0)) || fail "timed out before an API request" + timeout "$remaining" kubectl --context "$KUBE_CONTEXT" --namespace "$NAMESPACE" --request-timeout=10s "$@" || status=$? + ((SECONDS < deadline)) || fail "timed out during an API request" + return "$status" +} + +minor_version() { + local version="$1" kind="$2" + if [[ ! "$version" =~ ^v?1\.([0-9]+)\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then + fail "invalid $kind version: $version" + fi + local minor="${BASH_REMATCH[1]}" + [[ "$minor" =~ ^(0|[1-9][0-9]?)$ ]] || fail "invalid $kind version: $version" + printf '%s\n' "$minor" +} + +command -v timeout >/dev/null || fail "timeout command is required" + +timeout_seconds="${CAPI_UPGRADE_TIMEOUT_SECONDS:-480}" +[[ "$timeout_seconds" =~ ^[1-9][0-9]{0,3}$ ]] || fail "invalid upgrade timeout" +deadline=$((SECONDS + timeout_seconds)) +poll_seconds="${CAPI_UPGRADE_POLL_SECONDS:-2}" +[[ "$poll_seconds" =~ ^[0-9]+$ ]] || fail "invalid poll interval" +bridge_minor="$(minor_version "$BRIDGE_VERSION" intermediate)" +target_minor="$(minor_version "$TARGET_VERSION" target)" +((target_minor >= bridge_minor && target_minor - bridge_minor <= 3)) || fail "invalid intermediate release" + +core="$(kube get coreproviders.operator.cluster.x-k8s.io cluster-api --ignore-not-found --output json)" +bootstrap="$(kube get bootstrapproviders.operator.cluster.x-k8s.io kubeadm --ignore-not-found --output json)" +installed_version() { + jq --raw-output '.status.installedVersion // empty' <<< "$1" +} +if [[ -z "$core" || -z "$(installed_version "$core")" ]]; then + [[ -z "$bootstrap" || -z "$(installed_version "$bootstrap")" ]] || fail "kubeadm is installed without an installed core provider" + printf 'No installed providers need an intermediate upgrade.\n' + exit 0 +fi + +upgrade_version() { + # An unfinished install can complete at its old requested version while core upgrades. + jq --raw-output '(.status.installedVersion | select(. != null and . != "")) // .spec.version // empty' <<< "$1" +} + +validate_provider() { + local object="$1" suffix="$2" installed requested uid minor requested_minor newer + requested="$(jq --raw-output '.spec.version // empty' <<< "$object")" + requested_minor="$(minor_version "$requested" requested)" + installed="$(upgrade_version "$object")" + minor="$(minor_version "$installed" installed)" + newer="$(jq --null-input --arg installed "$installed" --arg target "$TARGET_VERSION" ' + def base: ltrimstr("v") | split("-")[0] | split("+")[0] | split(".") | map(tonumber); + ($installed | base) > ($target | base)')" + [[ "$newer" == false ]] || fail "$suffix provider downgrades are not supported" + ((bridge_minor - minor <= 3)) || fail "$suffix is outside the intermediate upgrade window" + uid="$(jq --raw-output '.metadata.uid // empty' <<< "$object")" + [[ -n "$uid" ]] || fail "$suffix provider UID is missing" + if [[ "$requested" != "$installed" && "$requested" != "$BRIDGE_VERSION-$suffix" && "$requested" != "$TARGET_VERSION-$suffix" ]]; then + # A failed Helm action can restore the old spec after the bridge installed. + [[ "$installed" == "$BRIDGE_VERSION-$suffix" && "$requested_minor" -lt "$bridge_minor" ]] \ + || fail "$suffix: another upgrade is in progress" + fi +} + +validate_provider "$core" core +core_minor="$(minor_version "$(jq --raw-output '.status.installedVersion' <<< "$core")" installed)" +bootstrap_minor="$target_minor" +if [[ -n "$bootstrap" ]]; then + validate_provider "$bootstrap" bootstrap + bootstrap_minor="$(minor_version "$(upgrade_version "$bootstrap")" installed)" +fi +bridge_selector_needs_repair() { + jq --exit-status --arg version "$BRIDGE_VERSION-$2" ' + .spec.version == $version and + .spec.fetchConfig.selector != {matchLabels: {"provider.cluster.x-k8s.io/version": $version}}' <<< "$1" >/dev/null +} + +if ((target_minor - core_minor <= 3 && target_minor - bootstrap_minor <= 3)) && + ! bridge_selector_needs_repair "$core" core && + { [[ -z "$bootstrap" ]] || ! bridge_selector_needs_repair "$bootstrap" bootstrap; }; then + printf 'Installed providers are within the supported upgrade window.\n' + exit 0 +fi + +wait_provider() { + local resource="$1" name="$2" deployment="$3" expected="$4" uid="$5" + local object ready rollout + while ((SECONDS < deadline)); do + object="$(kube get "$resource" "$name" --output json)" + [[ "$(jq --raw-output '.metadata.uid' <<< "$object")" == "$uid" ]] || fail "$name was replaced during the upgrade" + [[ "$(jq --raw-output '.spec.version' <<< "$object")" == "$expected" ]] || fail "$name requested version changed during the upgrade" + ready="$(jq --raw-output --arg expected "$expected" ' + .status.installedVersion == $expected and + .status.observedGeneration == .metadata.generation and + any(.status.conditions[]?; .type == "Ready" and .status == "True")' <<< "$object")" + if [[ "$ready" == true ]]; then + rollout="$(kube get deployments.apps "$deployment" --ignore-not-found --output json)" + if [[ -n "$rollout" ]]; then + ready="$(jq --raw-output ' + (.spec.replicas // 1) as $replicas | + $replicas > 0 and + .status.observedGeneration == .metadata.generation and + .status.replicas == $replicas and + .status.updatedReplicas == $replicas and + .status.readyReplicas == $replicas and + .status.availableReplicas == $replicas' <<< "$rollout")" + if [[ "$ready" == true ]]; then + printf '%s is ready at %s.\n' "$name" "$expected" + return + fi + fi + fi + sleep "$poll_seconds" + done + fail "$name timed out waiting for $expected" +} + +stage_provider() { + local resource="$1" name="$2" deployment="$3" suffix="$4" object="$5" + local installed requested uid minor requested_minor expected patch + installed="$(upgrade_version "$object")" + requested="$(jq --raw-output '.spec.version' <<< "$object")" + uid="$(jq --raw-output '.metadata.uid' <<< "$object")" + minor="$(minor_version "$installed" installed)" + requested_minor="$(minor_version "$requested" requested)" + expected="$requested" + if ((minor < bridge_minor)); then + if [[ "$requested" == "$installed" || "$requested" == "$BRIDGE_VERSION-$suffix" ]] || ((target_minor - minor > 3)); then + expected="$BRIDGE_VERSION-$suffix" + fi + elif [[ "$installed" == "$BRIDGE_VERSION-$suffix" ]] && ((requested_minor < bridge_minor)); then + expected="$BRIDGE_VERSION-$suffix" + fi + if [[ "$requested" != "$expected" ]] || bridge_selector_needs_repair "$object" "$suffix"; then + # The bridge bundles carry only the version label, so a selector keeping a + # legacy label would match nothing. + patch="$(jq --compact-output --arg uid "$uid" --arg old "$requested" --arg next "$expected" ' + .spec as $spec | + ($spec.fetchConfig // {} | .selector = {matchLabels: {"provider.cluster.x-k8s.io/version": $next}}) as $fetch | + [ + {op: "test", path: "/metadata/uid", value: $uid}, + {op: "test", path: "/spec/version", value: $old}, + (if $spec | has("fetchConfig") then + {op: "test", path: "/spec/fetchConfig", value: $spec.fetchConfig} + else + {op: "test", path: "/spec", value: $spec} + end), + {op: "replace", path: "/spec/version", value: $next}, + {op: (if $spec | has("fetchConfig") then "replace" else "add" end), path: "/spec/fetchConfig", value: $fetch} + ]' <<< "$object")" + kube patch "$resource" "$name" --type=json --patch "$patch" >/dev/null + fi + wait_provider "$resource" "$name" "$deployment" "$expected" "$uid" +} + +stage_provider coreproviders.operator.cluster.x-k8s.io cluster-api capi-controller-manager core "$core" +bootstrap_uid="$(jq --raw-output '.metadata.uid // empty' <<< "$bootstrap")" +bootstrap="$(kube get bootstrapproviders.operator.cluster.x-k8s.io kubeadm --ignore-not-found --output json)" +if [[ -n "$bootstrap_uid" ]]; then + [[ "$(jq --raw-output '.metadata.uid // empty' <<< "$bootstrap")" == "$bootstrap_uid" ]] || fail "kubeadm was replaced during the upgrade" +fi +if [[ -n "$bootstrap" ]]; then + validate_provider "$bootstrap" bootstrap + bootstrap_minor="$(minor_version "$(upgrade_version "$bootstrap")" requested)" + # Unfinished supported requests may need repositories from the dependent bootstrap chart. + if [[ -n "$(installed_version "$bootstrap")" ]] || ((target_minor - bootstrap_minor > 3)); then + stage_provider bootstrapproviders.operator.cluster.x-k8s.io kubeadm capi-kubeadm-bootstrap-controller-manager bootstrap "$bootstrap" + fi +fi +printf 'Intermediate provider upgrade completed.\n' diff --git a/packages/system/capi-providers-core/patches/0001-add-startup-probe.diff b/packages/system/capi-providers-core/patches/0001-add-startup-probe.diff new file mode 100644 index 000000000..8f5c7f2fa --- /dev/null +++ b/packages/system/capi-providers-core/patches/0001-add-startup-probe.diff @@ -0,0 +1,13 @@ +--- core-components.yaml ++++ core-components.yaml +@@ -20276,4 +20276,10 @@ + imagePullPolicy: IfNotPresent ++ startupProbe: ++ httpGet: ++ path: /healthz ++ port: healthz ++ failureThreshold: 30 ++ periodSeconds: 10 + livenessProbe: + httpGet: + path: /healthz diff --git a/packages/system/capi-providers-core/templates/configmaps.yaml b/packages/system/capi-providers-core/templates/configmaps.yaml index 123f062ec..2f391e1f8 100644 --- a/packages/system/capi-providers-core/templates/configmaps.yaml +++ b/packages/system/capi-providers-core/templates/configmaps.yaml @@ -1,8 +1,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: v1.10.1-core + name: {{ .Chart.AppVersion }}-core labels: + provider.cluster.x-k8s.io/version: {{ .Chart.AppVersion }}-core core-components: cozy annotations: provider.cluster.x-k8s.io/compressed: "true" diff --git a/packages/system/capi-providers-core/templates/providers.yaml b/packages/system/capi-providers-core/templates/providers.yaml index 280397ede..89ad393f1 100644 --- a/packages/system/capi-providers-core/templates/providers.yaml +++ b/packages/system/capi-providers-core/templates/providers.yaml @@ -5,10 +5,11 @@ metadata: name: cluster-api spec: # https://github.com/kubernetes-sigs/cluster-api - version: v1.10.1-core + version: {{ .Chart.AppVersion }}-core fetchConfig: selector: matchLabels: + provider.cluster.x-k8s.io/version: {{ .Chart.AppVersion }}-core core-components: cozy deployment: containers: diff --git a/packages/system/capi-providers-core/templates/upgrade-hook.yaml b/packages/system/capi-providers-core/templates/upgrade-hook.yaml new file mode 100644 index 000000000..d6e86cf77 --- /dev/null +++ b/packages/system/capi-providers-core/templates/upgrade-hook.yaml @@ -0,0 +1,151 @@ +{{- $bridge := required "intermediate provider version is missing" (.Files.Get "files/bridge-version" | trim) -}} +{{- $name := printf "%s-upgrade" .Release.Name -}} +{{- $timeout := 480 -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-20" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded +data: + upgrade-providers.sh: | + {{- required "provider upgrade script is missing" (.Files.Get "files/upgrade-providers.sh") | nindent 4 }} + kubeconfig: | + apiVersion: v1 + kind: Config + current-context: capi-upgrade + clusters: + - name: in-cluster + cluster: + server: https://kubernetes.default.svc + certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + contexts: + - name: capi-upgrade + context: + cluster: in-cluster + user: upgrade + users: + - name: upgrade + user: + tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ $name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-10" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ $name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-10" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded +rules: + - apiGroups: [operator.cluster.x-k8s.io] + resources: [coreproviders] + resourceNames: [cluster-api] + verbs: [get, patch] + - apiGroups: [operator.cluster.x-k8s.io] + resources: [bootstrapproviders] + resourceNames: [kubeadm] + verbs: [get, patch] + - apiGroups: [apps] + resources: [deployments] + resourceNames: [capi-controller-manager, capi-kubeadm-bootstrap-controller-manager] + verbs: [get] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ $name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-10" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ $name }} +subjects: + - kind: ServiceAccount + name: {{ $name }} + namespace: {{ .Release.Namespace | quote }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ $name }} + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "0" + helm.sh/hook-delete-policy: before-hook-creation +spec: + backoffLimit: 0 + activeDeadlineSeconds: {{ add $timeout 60 }} + template: + metadata: + labels: + policy.cozystack.io/allow-to-apiserver: "true" + spec: + serviceAccountName: {{ $name }} + restartPolicy: Never + securityContext: + runAsNonRoot: true + runAsUser: 65532 + runAsGroup: 65532 + fsGroup: 65532 + seccompProfile: + type: RuntimeDefault + containers: + - name: upgrade + image: {{ include "cozy-lib.image" (list .Values.upgrade.image $) | quote }} + command: [bash, /scripts/upgrade-providers.sh] + env: + - name: HOME + value: /tmp + - name: KUBECONFIG + value: /scripts/kubeconfig + - name: KUBE_CONTEXT + value: capi-upgrade + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: BRIDGE_VERSION + value: {{ $bridge | quote }} + - name: TARGET_VERSION + value: {{ .Chart.AppVersion | quote }} + - name: CAPI_UPGRADE_TIMEOUT_SECONDS + value: {{ $timeout | quote }} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 500m + memory: 256Mi + volumeMounts: + - name: scripts + mountPath: /scripts + readOnly: true + - name: tmp + mountPath: /tmp + volumes: + - name: scripts + configMap: + name: {{ $name }} + - name: tmp + emptyDir: {} diff --git a/packages/system/capi-providers-core/values.yaml b/packages/system/capi-providers-core/values.yaml new file mode 100644 index 000000000..ece2155f5 --- /dev/null +++ b/packages/system/capi-providers-core/values.yaml @@ -0,0 +1,2 @@ +upgrade: + image: docker.io/alpine/k8s:1.33.4@sha256:b0523f0a244ddc4c8e055aa335c040d3d78b3ead5528f4544395f7f9f69c7b68 diff --git a/packages/system/capi-providers-infraprovider-proxmox/templates/providers.yaml b/packages/system/capi-providers-infraprovider-proxmox/templates/providers.yaml index e04a04def..46f0be3a8 100644 --- a/packages/system/capi-providers-infraprovider-proxmox/templates/providers.yaml +++ b/packages/system/capi-providers-infraprovider-proxmox/templates/providers.yaml @@ -5,9 +5,10 @@ metadata: spec: # https://github.com/ionos-cloud/cluster-api-provider-proxmox # - # Pinned to the v0.7 series: from v0.8 capmox declares the v1beta2 Cluster API - # contract, while the core provider shipped here is v1.10.1, which serves - # v1beta1. Bump this together with capi-providers-core, not on its own. + # Pinned to the v0.7 series. v0.8 moves capmox to the v1beta2 contract and + # stores v1alpha2. v1alpha1 is still served through conversion, but that has + # not been tested with the kubernetes-nodes templates, and in-cluster IPAM + # should move to v1.1 at the same time. Bump the two together. version: v0.7.7-infraprovider-proxmox configSecret: name: {{ .Values.credentialsSecretName | quote }} diff --git a/packages/system/capi-providers-ipam-in-cluster/templates/providers.yaml b/packages/system/capi-providers-ipam-in-cluster/templates/providers.yaml index 559dd77c6..511f7ee5b 100644 --- a/packages/system/capi-providers-ipam-in-cluster/templates/providers.yaml +++ b/packages/system/capi-providers-ipam-in-cluster/templates/providers.yaml @@ -8,8 +8,9 @@ spec: # Who needs this, and why it is not in a KubeVirt install: see the dependsOn # edge in packages/core/platform/sources/capi-provider-infra-proxmox.yaml. # - # v1.0.x, not v1.1.0: both serve InClusterIPPool v1alpha2, but the v1.0 series - # declares the v1beta1 contract that matches capi-providers-core v1.10.1. + # v1.0.x, not v1.1: both serve InClusterIPPool v1alpha2, but v1.1 moves to the + # v1beta2 contract and its IPAddressClaim API, while capmox v0.7, the only + # consumer here, is a v1beta1-contract provider. Move the two together. version: v1.0.3-ipam-in-cluster fetchConfig: selector: