diff --git a/.github/ISSUE_TEMPLATE/new_release.md b/.github/ISSUE_TEMPLATE/new_release.md index 5378e7a66..6b9ce8687 100644 --- a/.github/ISSUE_TEMPLATE/new_release.md +++ b/.github/ISSUE_TEMPLATE/new_release.md @@ -10,23 +10,42 @@ title: Tasks for v release cycle Tasks for a new release `vX.Y.Z` of the Cluster API Provider OpenStack. For details, see [RELEASE.md](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/RELEASE.md). -- [ ] [When bumping `X` or `Y`] Create a new release branch called `release-X.Y`. -- [ ] [When bumping `X` or `Y`] Add a new entry of new release branch to [depandabot.yml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/.github/dependabot.yml). -- [ ] [When bumping `X` or `Y`] Add a new entry of new release branch to [security-scan.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/.github/workflows/security-scan.yaml). +### Pre-release tasks + +These tasks must be completed for alpha/beta releases. + - [ ] [When bumping `X` or `Y`] Add a new entry to [metadata.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/metadata.yaml) - as [described in the CAPI book](https://cluster-api.sigs.k8s.io/clusterctl/provider-contract.html#metadata-yaml) + as [described in the CAPI book](https://cluster-api.sigs.k8s.io/developer/providers/contracts/clusterctl#metadata-yaml) on the release branch prior to release. -- [ ] Push tag to the repository. + +### Release candidate and branch tasks + +The first release candidate (`-rc.0`) will trigger the creation of the release branch. +Once this is done, complete the following tasks: + +- [ ] [When bumping `X` or `Y`] Add an entry for the new release branch to [depandabot.yml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/.github/dependabot.yml). +- [ ] [When bumping `X` or `Y`] Add an entry for the new release branch to [security-scan.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/.github/workflows/security-scan.yaml). + +### Release process + +These tasks must be done for each release and pre-release. + +- [ ] Create the PR after generating release notes according to [RELEASE.md](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/RELEASE.md). Verify that the release PR looks good and make changes if necessary. When this PR is merged, release automation will push the tag to upstream and create a draft release. - [ ] Promote the [staging image](https://console.cloud.google.com/cloud-build/builds?project=k8s-staging-capi-openstack) by adding the new sha=>tag mapping to [images.yaml](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/images.yaml). -- [ ] Verify that the new draft release looks good and make changes if necessary. +- [ ] Verify that the new draft release looks good. - [ ] Verify that the image was promoted sucessfully. + ```bash + docker run --rm registry.k8s.io/capi-openstack/capi-openstack-controller:vX.Y.Z --version + ``` - [ ] Publish the release. Mark the release as "latest" if it is the most recent minor release. E.g. if both v1.1 and v1.2 are supported with patch releases, then only v1.2.z should be marked as "latest". ## Post-release tasks +These tasks can be completed after a release candidate (and branch) is done, or after the final release is out. + - [ ] [When bumping `X` or `Y`] Update the [periodic jobs](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/cluster-api-provider-openstack). Make sure there are periodic jobs for the new release branch, and clean up jobs for branches that are no longer supported. - [ ] [When bumping `X` or `Y`] Update the [clusterctl upgrade tests](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/test/e2e/suites/e2e/clusterctl_upgrade_test.go) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0cb3fae9b..dff3884d8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,6 +16,8 @@ updates: commit-message: prefix: ":seedling:" include: scope + cooldown: + default-days: 7 labels: - "area/dependency" - "ok-to-test" @@ -44,24 +46,28 @@ updates: update-types: ["version-update:semver-major", "version-update:semver-minor"] - dependency-name: "sigs.k8s.io/controller-tools" update-types: ["version-update:semver-major", "version-update:semver-minor"] + cooldown: + default-days: 7 labels: - "area/dependency" - "ok-to-test" ## main branch config ends here -## release-0.13 branch config starts here +## release-0.14 branch config starts here # github-actions - directory: "/" package-ecosystem: "github-actions" schedule: interval: "weekly" day: "monday" - target-branch: release-0.13 + target-branch: release-0.14 groups: all-github-actions: patterns: ["*"] commit-message: prefix: ":seedling:" include: scope + cooldown: + default-days: 7 labels: - "area/dependency" - "ok-to-test" @@ -73,7 +79,7 @@ updates: schedule: interval: "weekly" day: "monday" - target-branch: release-0.13 + target-branch: release-0.14 groups: all-go-mod-patch-and-minor: patterns: ["*"] @@ -93,24 +99,34 @@ updates: update-types: ["version-update:semver-major", "version-update:semver-minor"] - dependency-name: "sigs.k8s.io/controller-tools" update-types: ["version-update:semver-major", "version-update:semver-minor"] + # Ignore golang.org/x minor and major bumps to prevent cascading Go version requirements + - dependency-name: "golang.org/x/*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] + # Ignore gophercloud minor and major bumps to prevent cascading Go version requirements + - dependency-name: "github.com/gophercloud/gophercloud/v2" + update-types: ["version-update:semver-major", "version-update:semver-minor"] + cooldown: + default-days: 7 labels: - "area/dependency" - "ok-to-test" -## release-0.13 branch config ends here -## release-0.12 branch config starts here +## release-0.14 branch config ends here +## release-0.13 branch config starts here # github-actions - directory: "/" package-ecosystem: "github-actions" schedule: interval: "weekly" day: "monday" - target-branch: release-0.12 + target-branch: release-0.13 groups: all-github-actions: patterns: ["*"] commit-message: prefix: ":seedling:" include: scope + cooldown: + default-days: 7 labels: - "area/dependency" - "ok-to-test" @@ -122,7 +138,7 @@ updates: schedule: interval: "weekly" day: "monday" - target-branch: release-0.12 + target-branch: release-0.13 groups: all-go-mod-patch-and-minor: patterns: ["*"] @@ -142,16 +158,19 @@ updates: update-types: ["version-update:semver-major", "version-update:semver-minor"] - dependency-name: "sigs.k8s.io/controller-tools" update-types: ["version-update:semver-major", "version-update:semver-minor"] - # We will need k8s v0.31.3 to bump structured-merge-diff to v4.4.2 (check git history for details). - - dependency-name: "sigs.k8s.io/structured-merge-diff/*" - # These dependencies are skipped because they require a newer version of go: - - dependency-name: "github.com/a8m/envsubst" - - dependency-name: "github.com/onsi/gomega" - - dependency-name: "golang.org/x/crypto" - - dependency-name: "golang.org/x/text" - # Newer kustomize requires a bump to kube-openapi, which has some incompatibility with gengo. - - dependency-name: "sigs.k8s.io/kustomize/kustomize/*" + # Ignore ORC major and minor bumps to prevent cascading k8s.io and controller-runtime updates + - dependency-name: "github.com/k-orc/openstack-resource-controller*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] + # Ignore golang.org/x minor and major bumps to prevent cascading Go version requirements + - dependency-name: "golang.org/x/*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] + # Ignore gophercloud minor and major bumps to prevent cascading Go version requirements + - dependency-name: "github.com/gophercloud/gophercloud/v2" + update-types: ["version-update:semver-major", "version-update:semver-minor"] + cooldown: + default-days: 7 labels: - "area/dependency" - "ok-to-test" -## release-0.12 branch config ends here + +## release-0.13 branch config ends here diff --git a/.golangci.yml b/.golangci.yml index f2430a1e1..8bdee38d7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,137 +1,133 @@ version: "2" run: - go: "1.24" + go: "1.25" build-tags: - - e2e + - e2e allow-parallel-runners: true linters: default: none enable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - copyloopvar - - cyclop - - dogsled - - dupword - - durationcheck - - errcheck - - forbidigo - - goconst - - gocritic - - gocyclo - - godot - - goheader - - gomodguard - - goprintffuncname - - gosec - - govet - - importas - - ineffassign - - makezero - - misspell - - nakedret - - nestif - - nilerr - - noctx - - nolintlint - - prealloc - - predeclared - - revive - - rowserrcheck - - sqlclosecheck - - staticcheck - - thelper - - unconvert - - unparam - - unused - - wastedassign - - whitespace + - asasalint + - asciicheck + - bidichk + - bodyclose + - copyloopvar + - cyclop + - dogsled + - dupword + - durationcheck + - errcheck + - forbidigo + - goconst + - gocritic + - gocyclo + - godot + - goheader + - gomodguard + - goprintffuncname + - gosec + - govet + - importas + - ineffassign + - makezero + - misspell + - nakedret + - nestif + - nilerr + - noctx + - nolintlint + - prealloc + - predeclared + - revive + - rowserrcheck + - sqlclosecheck + - staticcheck + - thelper + - unconvert + - unparam + - unused + - wastedassign + - whitespace settings: # TODO(sbuerin) fix remaining findings and set to 20 afterwards cyclop: max-complexity: 30 gocritic: disabled-checks: - - appendAssign - - dupImport # https://github.com/go-critic/go-critic/issues/845 - - evalOrder - - ifElseChain - - octalLiteral - - regexpSimplify - - sloppyReassign - - truncateCmp - - typeDefFirst - - unnamedResult - - unnecessaryDefer - - whyNoLint - - wrapperFunc - - rangeValCopy - - hugeParam + - appendAssign + - dupImport # https://github.com/go-critic/go-critic/issues/845 + - evalOrder + - ifElseChain + - octalLiteral + - regexpSimplify + - sloppyReassign + - truncateCmp + - typeDefFirst + - unnamedResult + - unnecessaryDefer + - whyNoLint + - wrapperFunc + - rangeValCopy + - hugeParam enabled-tags: - - diagnostic - - experimental - - performance + - diagnostic + - experimental + - performance importas: alias: - # Kubernetes - - pkg: k8s.io/api/core/v1 - alias: corev1 - - pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 - alias: apiextensionsv1 - - pkg: k8s.io/apimachinery/pkg/apis/meta/v1 - alias: metav1 - - pkg: k8s.io/apimachinery/pkg/api/errors - alias: apierrors - - pkg: k8s.io/apimachinery/pkg/util/errors - alias: kerrors - # Controller Runtime - - pkg: sigs.k8s.io/controller-runtime - alias: ctrl - # CAPO - - pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1 - alias: infrav1alpha1 - - pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 - alias: infrav1 - - pkg: sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors - alias: capoerrors - # CAPI - - pkg: sigs.k8s.io/cluster-api/api/v1alpha3 - alias: clusterv1alpha3 - - pkg: sigs.k8s.io/cluster-api/api/v1alpha4 - alias: clusterv1alpha4 - - pkg: sigs.k8s.io/cluster-api/api/core/v1beta2 - alias: clusterv1 - - pkg: sigs.k8s.io/cluster-api/api/core/v1beta1 - alias: clusterv1beta1 - - pkg: sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions - alias: v1beta1conditions - - pkg: sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions/v1beta2 - alias: deprecatedv1beta2conditions - - pkg: sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1 - alias: deprecatedv1beta1conditions - - pkg: sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch - alias: v1beta1patch - - pkg: sigs.k8s.io/cluster-api/api/ipam/v1beta2 - alias: ipamv1 - # CABPK - - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 - alias: bootstrapv1alpha3 - - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 - alias: bootstrapv1alpha4 - - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 - alias: bootstrapv1 - # KCP - - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3 - alias: controlplanev1alpha3 - - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4 - alias: controlplanev1alpha4 - - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1 - alias: controlplanev1 - # ORC - - pkg: github.com/k-orc/openstack-resource-controller/api/v1alpha1 - alias: orcv1alpha1 + # Kubernetes + - pkg: k8s.io/api/core/v1 + alias: corev1 + - pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 + alias: apiextensionsv1 + - pkg: k8s.io/apimachinery/pkg/apis/meta/v1 + alias: metav1 + - pkg: k8s.io/apimachinery/pkg/api/errors + alias: apierrors + - pkg: k8s.io/apimachinery/pkg/util/errors + alias: kerrors + # Controller Runtime + - pkg: sigs.k8s.io/controller-runtime + alias: ctrl + # CAPO + - pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1 + alias: infrav1alpha1 + - pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 + alias: infrav1beta1 + - pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2 + alias: infrav1 + - pkg: sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors + alias: capoerrors + # CAPI + - pkg: sigs.k8s.io/cluster-api/api/v1alpha3 + alias: clusterv1alpha3 + - pkg: sigs.k8s.io/cluster-api/api/v1alpha4 + alias: clusterv1alpha4 + - pkg: sigs.k8s.io/cluster-api/api/core/v1beta2 + alias: clusterv1 + - pkg: sigs.k8s.io/cluster-api/api/core/v1beta1 + alias: clusterv1beta1 + - pkg: sigs.k8s.io/cluster-api/util/conditions + alias: conditions + - pkg: sigs.k8s.io/cluster-api/api/ipam/v1beta2 + alias: ipamv1 + # CABPK + - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 + alias: bootstrapv1alpha3 + - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 + alias: bootstrapv1alpha4 + - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 + alias: bootstrapv1 + # KCP + - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3 + alias: controlplanev1alpha3 + - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4 + alias: controlplanev1alpha4 + - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1 + alias: controlplanev1 + # ORC + - pkg: github.com/k-orc/openstack-resource-controller/api/v1alpha1 + alias: orcv1alpha1 no-unaliased: true nestif: # minimal complexity of if statements to report, 5 by default @@ -144,73 +140,70 @@ linters: exclusions: generated: lax presets: - - comments - - common-false-positives - - legacy - - std-error-handling + - comments + - common-false-positives + - legacy + - std-error-handling # List of regexps of issue texts to exclude, empty list by default. rules: - - linters: - - gosec - text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof' - - linters: - - gosec - text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof' - # This directive allows the embed package to be imported with an underscore everywhere. - - linters: - - revive - source: _ "embed" - - linters: - - revive - - staticcheck - path: (test)/.*.go - text: should not use dot imports - - linters: - - revive - path: test/e2e/shared/defaults.go - text: 'exported: exported const .* should have comment \(or a comment on this block\) or be unexported' - - linters: - - revive - text: 'var-naming: don''t use underscores in Go names;' - - linters: - - staticcheck - path: (api\/.*|pkg/utils/optional)\/.*conversion.*\.go$ - text: 'ST1003: should not use underscores in Go names;' - - linters: - - staticcheck - path: pkg/utils/conversioncommon/.*.go - text: 'ST1003: should not use underscores in Go names;' - - linters: - - staticcheck - text: 'SA1019: "sigs.k8s.io/cluster-api/api/core/v1beta1" is deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped.' - - linters: - - staticcheck - text: 'SA1019: "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions" is deprecated: This package 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.' + - linters: + - gosec + text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof' + - linters: + - gosec + text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof' + # This directive allows the embed package to be imported with an underscore everywhere. + - linters: + - revive + source: _ "embed" + - linters: + - revive + - staticcheck + path: (test)/.*.go + text: should not use dot imports + - linters: + - revive + path: test/e2e/shared/defaults.go + text: 'exported: exported const .* should have comment \(or a comment on this block\) or be unexported' + - linters: + - revive + text: 'var-naming: don''t use underscores in Go names;' + - linters: + - staticcheck + path: (api\/.*|pkg/utils/optional)\/.*conversion.*\.go$ + text: 'ST1003: should not use underscores in Go names;' + - linters: + - staticcheck + path: pkg/utils/conversioncommon/.*.go + text: 'ST1003: should not use underscores in Go names;' + - linters: + - staticcheck + text: 'SA1019: "sigs.k8s.io/cluster-api/api/core/v1beta1" is deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped.' paths: - - zz_generated.*\.go$ - - third_party$ - - builtin$ - - examples$ + - zz_generated.*\.go$ + - third_party$ + - builtin$ + - examples$ issues: max-issues-per-linter: 0 max-same-issues: 0 formatters: enable: - - gci - - gofmt - - gofumpt - - goimports + - gci + - gofmt + - gofumpt + - goimports settings: gci: sections: - - standard - - default - - prefix(github.com/k-orc/openstack-resource-controller) - - prefix(sigs.k8s.io/cluster-api-provider-openstack) + - standard + - default + - prefix(github.com/k-orc/openstack-resource-controller) + - prefix(sigs.k8s.io/cluster-api-provider-openstack) exclusions: generated: lax paths: - - zz_generated.*\.go$ - - third_party$ - - builtin$ - - examples$ + - zz_generated.*\.go$ + - third_party$ + - builtin$ + - examples$ diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 000000000..ac6823ff3 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,14 @@ +yaml-files: +- '*.yaml' +- '*.yml' +- '.yamllint' + +rules: + trailing-spaces: enable + key-duplicates: enable + indentation: + spaces: 2 + indent-sequences: false # Enforce k8s-style indentation + check-multi-line-strings: false + truthy: + allowed-values: [ 'true', 'false', 'yes', 'no', 'on' ] diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..adb8302d7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,303 @@ +# AGENTS.md - Agent Guidelines for Cluster API Provider OpenStack + +This document provides guidelines and useful commands for AI agents contributing to the Cluster API Provider OpenStack (CAPO) repository. + +> **⚠️ IMPORTANT**: When making changes to Makefile targets, PR requirements, code generation workflows, verification steps, or any other information referenced in this document, **AGENTS.md must be updated accordingly** to keep it synchronized with the actual project state. + +## Overview + +Cluster API Provider OpenStack (CAPO) is a Kubernetes-native declarative infrastructure provider for managing Kubernetes clusters on OpenStack. It implements the Cluster API (CAPI) specification for self-managed Kubernetes clusters on OpenStack infrastructure. + +**Key Concepts:** +- **CAPI**: Cluster API - the upstream Kubernetes project defining cluster lifecycle APIs +- **CAPO**: Cluster API Provider OpenStack - this repository +- **Reconciler**: Controller-runtime pattern for managing Kubernetes custom resources +- **Scope**: Context and configuration wrapper for controllers and services + +## Key Requirements for Contributors + +### Legal Requirements + +- **CLA Required**: All contributors MUST sign the Kubernetes Contributor License Agreement (CLA) +- See: https://git.k8s.io/community/CLA.md + +### Pull Request Labels + +All code PRs MUST be labeled with one of: +- ⚠️ `:warning:` - major or breaking changes +- ✨ `:sparkles:` - feature additions +- 🐛 `:bug:` - patch and bugfixes +- 📖 `:book:` - documentation or proposals +- 🌱 `:seedling:` - minor or other + +## Essential Make Targets + +### Code Quality & Verification + +> **⚠️ IMPORTANT**: The `make verify` targets compare the working tree against `HEAD` (the last commit). This means: +> - `make verify` will **always fail** if you have uncommitted changes, even if those changes are correct +> - You should **commit your changes first**, then run `make verify` to confirm everything is in order +> - The typical workflow is: make changes → `make generate` → `make modules` → `make test` → **commit** → `make verify` + +```bash +# Run all verification checks (should pass before submitting PR) +# NOTE: This compares against HEAD, so commit your changes first! +make verify + +# Verify boilerplate headers +make verify-boilerplate + +# Verify go modules are up to date (runs `go mod tidy` and diffs against HEAD) +make verify-modules + +# Verify generated code is up to date (runs `make generate` and diffs against HEAD) +make verify-gen + +# Verify container images for vulnerabilities +make verify-container-images + +# Check code for security vulnerabilities +make verify-govulncheck + +# Run all security checks (images + code) +make verify-security +``` + +### Linting + +```bash +# Lint codebase +make lint + +# Lint and auto-fix issues +make lint-update + +# Run faster linters only +make lint-fast +``` + +### Testing + +```bash +# Run unit tests +make test + +# Run unit tests for CAPO specifically +make test-capo + +# Build e2e test binaries +make build-e2e-tests + +# Run e2e tests (requires OpenStack environment) +make test-e2e + +# Run conformance tests +make test-conformance + +# Compile e2e tests (verify they build) +make compile-e2e +``` + +### Code Generation + +```bash +# Generate ALL code (manifests, deepcopy, clients, mocks, docs) +make generate + +# Generate Go code (mocks, etc.) +make generate-go + +# Generate controller-gen code (deepcopy, etc.) +make generate-controller-gen + +# Generate client code (clientsets, listers, informers) +make generate-codegen + +# Generate CRD manifests +make generate-manifests + +# Generate API documentation +make generate-api-docs + +# Generate cluster templates +make templates +``` + +### Dependency Management + +```bash +# Update go modules +make modules + +# Check for API differences (useful before breaking changes) +make apidiff +``` + +### Building + +```bash +# Build manager binaries +make managers + +# Build all binaries +make binaries + +# Build Docker image +make docker-build + +# Build debug Docker image +make docker-build-debug + +# Build for all architectures +make docker-build-all +``` + +### Cleanup + +```bash +# Clean all build artifacts +make clean + +# Clean binaries only +make clean-bin + +# Clean temporary files +make clean-temporary + +# Clean release artifacts +make clean-release +``` + +## Important Development Patterns + +### Adding New OpenStack Resources + +1. Define API types in `/api/v1beta1` (or `/api/v1alpha1` for experimental features) +2. Run `make generate` to create deepcopy methods and update CRDs +3. Create controller in `/controllers` +4. Create service implementation in `/pkg/cloud/services/` +5. Update or create scope in `/pkg/scope` if needed +6. Add webhooks in `/pkg/webhooks` for validation/defaulting +7. Add unit tests for controller and services +8. Update documentation +9. Generate cluster templates if applicable with `make templates` + +### Testing Strategy + +1. **Unit Tests**: Test individual functions/methods with mocks +2. **Integration Tests**: Test controller behavior with envtest +3. **E2E Tests**: Deploy real clusters on OpenStack, verify functionality +4. **Conformance Tests**: Run upstream Kubernetes conformance suite + +## Pre-Submit Checklist for Agents + +Before submitting a PR, ensure: + +1. **Code is generated and up to date**: + ```bash + make generate + ``` + +2. **Modules are tidy**: + ```bash + make modules + ``` + +3. **Code passes linting**: + ```bash + make lint + ``` + +4. **Tests pass**: + ```bash + make test + ``` + +5. **All verification checks pass**: + ```bash + make verify + ``` + +## Common Workflows + +### Making Code Changes + +1. Make your code changes +2. Run code generation: `make generate` +3. Update modules if needed: `make modules` +4. Run tests: `make test` +5. Lint the code: `make lint` +6. **Commit changes** with descriptive message +7. Verify everything: `make verify` (this compares against HEAD, so must be done after commit) + +### Updating Dependencies + +1. Update `go.mod` or `hack/tools/go.mod` as needed (e.g., `go get sigs.k8s.io/cluster-api@v1.x.x`) +2. Run: `make modules` to tidy dependencies +3. Run: `make generate` to regenerate code (dependency updates often change generated code) +4. Run: `make test` to ensure everything still works +5. **Commit all changes** (go.mod, go.sum, and any regenerated files) +6. Run: `make verify` to confirm everything is in order + +## Common Issues + +### Linting Errors + +The project uses golangci-lint. If you get lint errors: +1. Run `make lint-update` first to auto-fix +2. Check `.golangci.yml` for enabled linters +3. Some issues require manual fixes (cognitive complexity, error handling, etc.) +4. Don't disable linters without good reason - fix the underlying issue + +### Test Failures + +- **envtest issues**: Ensure KUBEBUILDER_ASSETS is set correctly +- **Flaky E2E tests**: Transient infrastructure issues, failure to deploy devstack + +### Generated File Drift + +If `make verify` fails with generated file drift: +1. Run `make generate` to regenerate all files +2. Run `make modules` to ensure go.mod/go.sum are tidy +3. Review the changes to ensure they're expected +4. **Commit the generated files** - verify targets compare against HEAD! +5. Run `make verify` again - it should pass now +6. Never manually edit generated files + +### Verify Fails Even After Running Generate/Modules + +If `make verify-gen` or `make verify-modules` fails even after running `make generate` or `make modules`: +- Remember that these targets compare against `HEAD` (the last commit) +- If you have uncommitted changes, they will show as "drift" even if correct +- **Solution**: Commit your changes first, then run `make verify` +- This is by design - it ensures the committed code is complete and self-consistent + +## Documentation + +Primary documentation is in `/docs/book/src/` (mdBook format): +- Getting started guides +- Developer documentation +- Troubleshooting guides +- API reference +- Cluster template documentation + +Build and serve docs locally: +```bash +make -C docs/book serve +``` + +## Quick Reference + +| Task | Command | +|------|---------| +| Full verification before PR | `make verify && make test` | +| Generate all code | `make generate` | +| Update dependencies | `make modules` | +| Lint and fix | `make lint-update` | +| Run tests | `make test` | +| Build binary | `make managers` | +| Build Docker image | `make docker-build` | +| Clean everything | `make clean` | +| Check API compatibility | `make apidiff` | +| Generate templates | `make templates` | +| Build and serve docs | `make -C docs/book serve` | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1fdfb740f..1ac8a03df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,8 +45,10 @@ Cluster API Provider OpenStack maintains the most recent release/releases for al | Minor Release | API Version | Supported Until | |---------------|--------------|------------------------------------------------| +| v0.14.x | **v1beta1** | when v0.16.0 will be released | +| v0.13.x | **v1beta1** | when v0.15.0 will be released | | v0.12.x | **v1beta1** | when v0.14.0 will be released | -| v0.11.x | **v1beta1** | when v0.13.0 will be released | +| v0.11.x | **v1beta1** | EOL since 2025-09-11 - v0.13.0 release date | | v0.10.x | **v1beta1** | EOL since 2025-02-06 - v0.12.0 release date | | v0.9.x | **v1alpha7** | EOL since 2024-10-24 - v0.11.0 release date | | v0.8.x | **v1alpha7** | EOL since 2024-04-17 - v0.10.0 release date | @@ -57,6 +59,8 @@ Cluster API Provider OpenStack maintains the most recent release/releases for al | Minor Release | v1beta1 | v1alpha7 | v1alpha6 | v1alpha5 | |---------------|---------------|------------|------------|------------| +| v0.14.x | **supported** | | | | +| v0.13.x | **supported** | | | | | v0.12.x | **supported** | not served | | | | v0.11.x | **supported** | deprecated | not served | | | v0.10.x | **supported** | supported | deprecated | not served | diff --git a/Dockerfile b/Dockerfile index f6b4f2a15..1302de0ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ # Build the manager binary ARG GO_VERSION -FROM golang:${GO_VERSION:-1.24.9} AS builder +FROM golang:${GO_VERSION:-1.25.8} AS builder WORKDIR /workspace # Run this with docker build --build_arg goproxy=$(go env GOPROXY) to override the goproxy @@ -36,13 +36,13 @@ COPY ./ ./ # Build ARG package=. ARG ARCH -ARG ldflags=-s -w -extldflags=-static +ARG ldflags # Do not force rebuild of up-to-date packages (do not use -a) and use the compiler cache folder RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \ - go build -ldflags "${ldflags}" \ + go build -ldflags "${ldflags} -extldflags '-static'" \ -o manager ${package} # Production image diff --git a/Makefile b/Makefile index 6ccff05ab..f683dcf3d 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,11 @@ unexport GOPATH TRACE ?= 0 # Go -GO_VERSION ?= 1.24.9 +GO_VERSION ?= 1.25.8 + +# Ensure correct toolchain is used +GOTOOLCHAIN = go$(GO_VERSION) +export GOTOOLCHAIN # Directories. ARTIFACTS ?= $(REPO_ROOT)/_artifacts @@ -52,19 +56,25 @@ GO_APIDIFF_VER := v0.8.2 GO_APIDIFF_BIN := go-apidiff GO_APIDIFF_PKG := github.com/joelanford/go-apidiff +# golangci-lint +GOLANGCI_LINT_BIN := golangci-lint +GOLANGCI_LINT_VER := $(shell cd hack/tools && go list -m -f '{{.Version}}' github.com/golangci/golangci-lint/v2) +GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/v2/cmd/golangci-lint + # govulncheck GOVULNCHECK_VER := v1.1.4 GOVULNCHECK_BIN := govulncheck GOVULNCHECK_PKG := golang.org/x/vuln/cmd/govulncheck -TRIVY_VER := 0.49.1 +TRIVY_VER := 0.69.3 # Binaries. CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen +CONVERSION_GEN := $(TOOLS_BIN_DIR)/conversion-gen ENVSUBST := $(TOOLS_BIN_DIR)/envsubst GINKGO := $(TOOLS_BIN_DIR)/ginkgo GOJQ := $(TOOLS_BIN_DIR)/gojq -GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint +GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)) GOTESTSUM := $(TOOLS_BIN_DIR)/gotestsum KUSTOMIZE := $(TOOLS_BIN_DIR)/kustomize MOCKGEN := $(TOOLS_BIN_DIR)/mockgen @@ -188,13 +198,15 @@ e2e-templates: $(addprefix $(E2E_NO_ARTIFACT_TEMPLATES_DIR)/, \ cluster-template-multi-network.yaml \ cluster-template-without-lb.yaml \ cluster-template.yaml \ + cluster-template-topology.yaml \ cluster-template-flatcar.yaml \ cluster-template-k8s-upgrade.yaml \ cluster-template-flatcar-sysext.yaml \ cluster-template-no-bastion.yaml \ cluster-template-health-monitor.yaml \ cluster-template-capi-v1beta1.yaml \ - cluster-template-cluster-identity.yaml) + cluster-template-cluster-identity.yaml \ + cluster-template-topology-autoscaler.yaml) # Currently no templates that require CI artifacts # $(addprefix $(E2E_TEMPLATES_DIR)/, add-templates-here.yaml) \ @@ -273,6 +285,12 @@ $(GOVULNCHECK_BIN): $(GOVULNCHECK) ## Build a local copy of govulncheck. $(GOVULNCHECK): # Build govulncheck. GOBIN=$(abspath $(TOOLS_BIN_DIR)) $(GO_INSTALL) $(GOVULNCHECK_PKG) $(GOVULNCHECK_BIN) $(GOVULNCHECK_VER) +.PHONY: $(GOLANGCI_LINT_BIN) +$(GOLANGCI_LINT_BIN): $(GOLANGCI_LINT) ## Build a local copy of golangci-lint. + +$(GOLANGCI_LINT): # Build golangci-lint. + GOBIN=$(abspath $(TOOLS_BIN_DIR)) $(GO_INSTALL) $(GOLANGCI_LINT_PKG) $(GOLANGCI_LINT_BIN) $(GOLANGCI_LINT_VER) + ## -------------------------------------- ##@ Linting ## -------------------------------------- @@ -298,12 +316,19 @@ modules: ## Runs go mod to ensure proper vendoring. cd $(TOOLS_DIR); go mod tidy .PHONY: generate -generate: templates generate-controller-gen generate-codegen generate-go generate-manifests generate-api-docs ## Generate all generated code +generate: templates generate-controller-gen generate-codegen generate-conversion-gen generate-go generate-manifests generate-api-docs ## Generate all generated code .PHONY: generate-go generate-go: $(MOCKGEN) go generate ./... +.PHONY: generate-conversion-gen +generate-conversion-gen: $(CONVERSION_GEN) + $(CONVERSION_GEN) \ + --output-file=zz_generated.conversion.go \ + --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ + ./api/v1beta1 + .PHONY: generate-controller-gen generate-controller-gen: $(CONTROLLER_GEN) $(CONTROLLER_GEN) \ @@ -314,7 +339,7 @@ generate-controller-gen: $(CONTROLLER_GEN) generate-codegen: generate-controller-gen $(OPENAPI_GEN) $(APPLYCONFIGURATION_GEN) $(CLIENT_GEN) $(LISTER_GEN) $(INFORMER_GEN) @echo "** Generating OpenAPI definitions **" # The package list includes: - # - CAPO's own API packages (v1alpha1, v1beta1) that have // +k8s:openapi-gen= markers + # - CAPO's own API packages (v1alpha1, v1beta1, v1beta2) that have // +k8s:openapi-gen= markers # - Dependency packages from CAPI and k8s.io that are referenced by CAPO's APIs # - Base k8s.io/apimachinery packages $(OPENAPI_GEN) \ @@ -325,6 +350,7 @@ generate-codegen: generate-controller-gen $(OPENAPI_GEN) $(APPLYCONFIGURATION_GE --report-filename=./api_violations.report \ sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1 \ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 \ + sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2 \ sigs.k8s.io/cluster-api/api/core/v1beta2 \ sigs.k8s.io/cluster-api/api/ipam/v1beta2 \ sigs.k8s.io/cluster-api/api/core/v1beta1 \ @@ -332,6 +358,7 @@ generate-codegen: generate-controller-gen $(OPENAPI_GEN) $(APPLYCONFIGURATION_GE k8s.io/api/core/v1 \ k8s.io/apimachinery/pkg/apis/meta/v1 \ k8s.io/apimachinery/pkg/runtime \ + k8s.io/apimachinery/pkg/api/resource \ k8s.io/apimachinery/pkg/version @echo "** Generating openapi.json **" go run ./cmd/models-schema | jq > ./openapi.json @@ -342,7 +369,8 @@ generate-codegen: generate-controller-gen $(OPENAPI_GEN) $(APPLYCONFIGURATION_GE --output-pkg=sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration \ --openapi-schema=./openapi.json \ sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1 \ - sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 + sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 \ + sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2 @echo "** Generating clientset code **" $(CLIENT_GEN) \ --go-header-file=./hack/boilerplate.go.txt \ @@ -352,14 +380,16 @@ generate-codegen: generate-controller-gen $(OPENAPI_GEN) $(APPLYCONFIGURATION_GE --input-base=sigs.k8s.io/cluster-api-provider-openstack \ --apply-configuration-package=sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration \ --input=api/v1alpha1 \ - --input=api/v1beta1 + --input=api/v1beta1 \ + --input=api/v1beta2 @echo "** Generating lister code **" $(LISTER_GEN) \ --go-header-file=./hack/boilerplate.go.txt \ --output-dir=./pkg/generated/listers \ --output-pkg=sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/listers \ sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1 \ - sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 + sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 \ + sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2 @echo "** Generating informer code **" $(INFORMER_GEN) \ --go-header-file=./hack/boilerplate.go.txt \ @@ -368,7 +398,8 @@ generate-codegen: generate-controller-gen $(OPENAPI_GEN) $(APPLYCONFIGURATION_GE --versioned-clientset-package=sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset \ --listers-package=sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/listers \ sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1 \ - sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 + sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 \ + sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2 .PHONY: generate-manifests generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc. @@ -401,17 +432,18 @@ generate-api-docs-%: $(GEN_CRD_API_REFERENCE_DOCS) FORCE ## -------------------------------------- .PHONY: docker-build -docker-build: ## Build the docker image for controller-manager +docker-build: ## Build the docker image for controller-manager without debug info docker build -f Dockerfile --build-arg GO_VERSION=$(GO_VERSION) \ --build-arg goproxy=$(GOPROXY) \ - --build-arg ARCH=$(ARCH) . -t $(CONTROLLER_IMG_TAG) + --build-arg ARCH=$(ARCH) \ + --build-arg ldflags="$(LDFLAGS) -s -w" . -t $(CONTROLLER_IMG_TAG) .PHONY: docker-build-debug docker-build-debug: ## Build the docker image for controller-manager with debug info docker build -f Dockerfile --build-arg GO_VERSION=$(GO_VERSION) \ --build-arg goproxy=$(GOPROXY) \ --build-arg ARCH=$(ARCH) \ - --build-arg ldflags="-extldflags=-static" . -t $(CONTROLLER_IMG_TAG) + --build-arg ldflags="$(LDFLAGS)" . -t $(CONTROLLER_IMG_TAG) .PHONY: docker-push docker-push: ## Push the docker image @@ -448,14 +480,14 @@ staging-manifests: ## -------------------------------------- ##@ Release ## -------------------------------------- - ifneq (,$(findstring -,$(RELEASE_TAG))) PRE_RELEASE=true endif -PREVIOUS_TAG ?= $(shell git tag -l | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$$" | sort -V | grep -B1 $(RELEASE_TAG) | head -n 1 2>/dev/null) +# List all tags, add the new tag to the list, sort and pick the previous one. +PREVIOUS_TAG ?= $(shell (git tag -l | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$$"; echo "$(RELEASE_TAG)") | sort -V | grep -B1 "^$(RELEASE_TAG)$$" | grep -v "^$(RELEASE_TAG)$$" | head -n 1 2>/dev/null) ## set by Prow, ref name of the base branch, e.g., main RELEASE_DIR := out -RELEASE_NOTES_DIR := _releasenotes +RELEASE_NOTES_DIR := releasenotes .PHONY: $(RELEASE_DIR) $(RELEASE_DIR): @@ -478,7 +510,7 @@ list-image: gcloud container images list-tags $(STAGING_REGISTRY)/$(IMAGE) --filter="tags=('$(RELEASE_TAG)')" --format=json .PHONY: release -release: $(RELEASE_NOTES) clean-release $(RELEASE_DIR) ## Builds and push container images using the latest git tag for the commit. +release: $(RELEASE_NOTES) $(RELEASE_DIR) ## Builds and push container images using the latest git tag for the commit. @if [ -z "${RELEASE_TAG}" ]; then echo "RELEASE_TAG is not set"; exit 1; fi @if ! [ -z "$$(git status --porcelain)" ]; then echo "Your local git repository contains uncommitted changes, use git clean before proceeding."; fi git checkout "${RELEASE_TAG}" @@ -486,6 +518,7 @@ release: $(RELEASE_NOTES) clean-release $(RELEASE_DIR) ## Builds and push conta $(MAKE) manifest-modification REGISTRY=$(PROD_REGISTRY) $(MAKE) release-manifests $(MAKE) release-templates + $(MAKE) generate-release-notes .PHONY: manifest-modification manifest-modification: # Set the manifest images to the staging/production bucket. @@ -551,7 +584,7 @@ generate-release-notes: $(RELEASE_NOTES_DIR) $(RELEASE_NOTES) fi "$(RELEASE_NOTES)" --repository=kubernetes-sigs/cluster-api-provider-openstack \ --prefix-area-label=false --add-kubernetes-version-support=false \ - --from=$(PREVIOUS_TAG) --release=$(RELEASE_TAG) >> $(RELEASE_NOTES_DIR)/$(RELEASE_TAG).md + --from=tags/$(PREVIOUS_TAG) --release=$(RELEASE_TAG) >> $(RELEASE_NOTES_DIR)/$(RELEASE_TAG).md .PHONY: templates templates: ## Generate cluster templates @@ -561,10 +594,10 @@ templates: templates/cluster-template.yaml \ templates/cluster-template-flatcar-sysext.yaml \ templates/cluster-template-capi-v1beta1.yaml -templates/cluster-template.yaml: kustomize/v1beta1/default $(KUSTOMIZE) FORCE +templates/cluster-template.yaml: kustomize/default $(KUSTOMIZE) FORCE $(KUSTOMIZE) build "$<" > "$@" -templates/cluster-template-%.yaml: kustomize/v1beta1/% $(KUSTOMIZE) FORCE +templates/cluster-template-%.yaml: kustomize/% $(KUSTOMIZE) FORCE $(KUSTOMIZE) build "$<" > "$@" .PHONY: release-templates diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 7f32d2e48..9f20c7de1 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -11,9 +11,8 @@ aliases: # operationally expedient: # Source: # https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-cluster-lifecycle/teams.yaml - # correct as of 2023/05/10 + # correct as of 2026/01/21 sig-cluster-lifecycle-leads: - - CecileRobertMichon - fabriziopandini - justinsb - neolit123 @@ -21,5 +20,9 @@ aliases: cluster-api-openstack-maintainers: - emilienm - lentzi90 + - mandre + - stephenfin cluster-api-openstack-reviewers: + - bnallapeta - smoshiur1237 + - nikParasyr diff --git a/README.md b/README.md index 56b37070d..3acb41a6f 100644 --- a/README.md +++ b/README.md @@ -39,10 +39,14 @@ previous cluster managers such as [kops][kops] and This provider's versions are compatible with the following versions of Cluster API: -| | v1beta1 (v1.x) | -|------------------------------------| -------------- | -| OpenStack Provider v1alpha7 (v0.9) | ✓ | -| OpenStack Provider v1beta1 | ✓ | +| Minor release | CAPI version | +|---------------|--------------| +| v0.14 | >=v1.12 | +| v0.13 | >=v1.11 | +| v0.12 | >=v1.9 | + +This is based on the version of Cluster API that the provider was built and tested against. +Older versions may work if the APIs have not changed. Each version of Cluster API for OpenStack will attempt to support two Kubernetes versions. @@ -94,7 +98,7 @@ involved: - via the [cluster-api-openstack channel on Kubernetes Slack][slack] - via the [SIG-Cluster-Lifecycle Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle). - during our Office Hours - - bi-weekly on Wednesdays @ 14:00 UTC on Zoom (link in meeting notes) + - bi-weekly on Wednesdays @ 12:00 UTC on Zoom (link in meeting notes) - Previous meetings: - [notes this year][office-hours-notes] - [notes in 2023][office-hours-notes-2023] diff --git a/RELEASE.md b/RELEASE.md index 8b7ea9f06..668567573 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -19,6 +19,7 @@ A release version string is: `vX.Y.Z`. A pre-release version string additionally has a suffix: + - `alpha` for an alpha release - `beta` for a beta release - `rc` for a release candidate @@ -41,40 +42,75 @@ The content of the release notes differs depending on the type of release, speci There is an [issue template](.github/ISSUE_TEMPLATE/new_release.md) to help track release activities. 1. Make sure your repo is clean by git's standards. It is recommended to use a fresh checkout. -1. When bumping `X` or `Y` (but not Z or the pre-release suffix) in the release version you must create a new release branch called `release-X.Y`. - > NOTE: `upstream` should be the name of the remote pointing to `github.com/kubernetes-sigs/cluster-api-provider-openstack` - - `git checkout main` - - `git pull` - - `git checkout -b release-X.Y` - - `git push --set-upstream upstream` +1. Repository Setup + - Clone the repository: `git clone git@github.com:kubernetes-sigs/cluster-api-provider-openstack.git` + or if using existing repository, make sure origin is set to the fork and + upstream is set to `kubernetes-sigs`. Verify if your remote is set properly or not + by using following command `git remote -v`, where origin points to fork and upstream points to main repo. + - Fetch the remote (`kubernetes-sigs`): `git fetch upstream` + This makes sure that all the tags are accessible. + 1. When bumping `X` or `Y` (but not Z or the pre-release suffix) in the release version, ensure you have added a new entry to [metadata.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/metadata.yaml) - as [described in the CAPI book](https://cluster-api.sigs.k8s.io/clusterctl/provider-contract.html#metadata-yaml), and + as [described in the CAPI book](https://cluster-api.sigs.k8s.io/developer/providers/contracts/clusterctl#metadata-yaml), and that this has been committed to the release branch prior to release. -1. Make sure you are on the correct release branch: `release-X.Y` -1. Set an environment variable with the version, e.g.: - - `VERSION=v0.6.0` -1. Create an annotated tag - - `git tag -s -a $VERSION -m $VERSION`. -1. Push the tag to the GitHub repository: - > NOTE: `upstream` should be the name of the remote pointing to `github.com/kubernetes-sigs/cluster-api-provider-openstack` - - `git push upstream $VERSION` - - This will cause the image to be automatically built by CI and pushed to the staging repository. As this only builds - the image, it only takes a few minutes. - It also triggers the [release](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/.github/workflows/release.yaml) workflow which will generate release notes and artifacts, and create a draft release in GitHub. -1. Follow the [image promotion process](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/README.md#image-promoter) to promote the image from the staging repo to `registry.k8s.io/capi-openstack`. - The staging repository can be inspected at https://console.cloud.google.com/gcr/images/k8s-staging-capi-openstack/GLOBAL. Be + +1. Creating Release Notes + - Switch to the main branch: `git checkout main` + - Create a new branch for the release notes**: + `git checkout -b release-notes-X.Y.Z origin/main` + - Generate the release notes: `RELEASE_TAG=vX.Y.Z make generate-release-notes` + - Replace `vX.Y.Z` with the new release tag you're creating. + - This command generates the release notes here + `releasenotes/.md` . + +1. Next step is to clean up the release note manually. + - If release is not an alpha or a beta or release candidate, check for duplicates, + reverts, and incorrect classifications of PRs, and whatever release + creation tagged to be manually checked. + - For any superseded PRs (like same dependency uplifted multiple times, or + commit revertion) that provide no value to the release, move them to + Superseded section. This way the changes are acknowledged to be part of the + release, but not overwhelming the important changes contained in the release. + - Commit your changes, push the new branch and create a pull request: + - The commit and PR title should be 🚀 Release v1.x.y: + -`git commit -S -s -m ":rocket: Release vX.Y.Z"` + -`git push -u origin release-notes-X.Y.Z` + - Important! The commit should only contain the release notes file, nothing + else, otherwise automation will not work. Push as normal, through your fork (`origin`). + - Ask maintainers and release team members to review your pull request. + + Once the PR is merged, the following GitHub actions are triggered: + + - GitHub action `Create Release` runs following jobs + - GitHub job `push_release_tags` will create and push the tags. This action + will also create release branch if its missing and release is `rc` or minor. + - GitHub job `create draft release` creates draft release. Don't publish the + release yet. Running actions are visible on the + [Actions](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/actions) + page, and draft release will be visible on top of the + [Releases](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases). + + The image will also be automatically built by CI and pushed to the staging repository. As this only builds the image, it only takes a few minutes. + +1. Follow the [image promotion process](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/README.md#image-promoter) + to promote the image from the staging repo to `registry.k8s.io/capi-openstack`. + The staging repository can be inspected at [Staging CAPI Openstack](https://console.cloud.google.com/gcr/images/k8s-staging-capi-openstack/GLOBAL). Be sure to choose the top level `capi-openstack-controller`, which will provide the multi-arch manifest, rather than one for a specific architecture. The image build logs are available at [Cloud Build](https://console.cloud.google.com/cloud-build/builds?project=k8s-staging-capi-openstack). Add the new sha=>tag mapping to the [images.yaml](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/images.yaml) (use the sha of the image with the corresponding tag). The PR to update the [images.yaml](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/images.yaml) must be approved in the [OWNERS](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/OWNERS) file and merged. + Here is an example [pull request](https://github.com/kubernetes/k8s.io/pull/8807). + + It is good practise to get somebody else to review this PR. It is safe to perform the following steps while waiting for review and the promotion of the image. - It is good practise to get somebody else to review this PR. It is safe to perform the following steps while waiting - for review and the promotion of the image. 1. Check carefully the [draft release](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases) created by the workflow. Ensure that the release notes are correct and that the artifacts are present. If any changes are needed, edit the release notes in the GitHub UI and add any missing artifacts. 1. Ensure that the release image has been promoted. +1. If the release you're making is not a new major release, new minor release, + or a new patch release from the latest release branch, uncheck the box for + latest release. If it is a release candidate (RC) or a beta or an alpha + release, tick pre-release box. 1. Publish release. ### Post release actions @@ -89,12 +125,16 @@ There is an [issue template](.github/ISSUE_TEMPLATE/new_release.md) to help trac Releasing requires a particular set of permissions. -* Approver role for the image promoter process ([kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/OWNERS](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/OWNERS)) -* Tag push and release creation rights to the GitHub repository (team `cluster-api-provider-openstack-maintainers` in [kubernetes/org/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml](https://github.com/kubernetes/org/blob/main/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml)) +1. Approver role for the image promoter process ([kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/OWNERS](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-openstack/OWNERS)) + +1. Tag push and release creation rights to the GitHub repository (team `cluster-api-provider-openstack-maintainers` in [kubernetes/org/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml](https://github.com/kubernetes/org/blob/main/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml)) ## Staging There is a post-submit Prow job running after each commit on `main` which pushes a new image to the staging repo (`gcr.io/k8s-staging-capi-openstack/capi-openstack-controller:latest`). Following configuration is involved: -* staging gcr bucket: [kubernetes/k8s.io/blob/main/registry.k8s.io/manifests/k8s-staging-capi-openstack/promoter-manifest.yaml](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/manifests/k8s-staging-capi-openstack/promoter-manifest.yaml) -* post-submit `post-capi-openstack-push-images` Prow job: [kubernetes/test-infra/blob/master/config/jobs/image-pushing/k8s-staging-cluster-api.yaml](https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/k8s-staging-cluster-api.yaml)) (corresponding dashboard is located at [https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-capi-openstack-push-images](https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-capi-openstack-push-images)) -* Google Cloud Build configuration which is used by the Prow job: [kubernetes-sigs/cluster-api-provider-openstack/cloudbuild.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/cloudbuild.yaml) + +1. staging gcr bucket: [kubernetes/k8s.io/blob/main/registry.k8s.io/manifests/k8s-staging-capi-openstack/promoter-manifest.yaml](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/manifests/k8s-staging-capi-openstack/promoter-manifest.yaml) + +1. post-submit `post-capi-openstack-push-images` Prow job: [kubernetes/test-infra/blob/master/config/jobs/image-pushing/k8s-staging-cluster-api.yaml](https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/k8s-staging-cluster-api.yaml) (corresponding dashboard is located at [https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-capi-openstack-push-images](https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-capi-openstack-push-images)) + +1. Google Cloud Build configuration which is used by the Prow job: [kubernetes-sigs/cluster-api-provider-openstack/cloudbuild.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/cloudbuild.yaml) diff --git a/api/v1alpha1/openstackfloatingippool_types.go b/api/v1alpha1/openstackfloatingippool_types.go index 4b7588fbd..e6d0576e5 100644 --- a/api/v1alpha1/openstackfloatingippool_types.go +++ b/api/v1alpha1/openstackfloatingippool_types.go @@ -20,9 +20,8 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) const ( @@ -88,7 +87,7 @@ type OpenStackFloatingIPPoolStatus struct { // +optional FloatingIPNetwork *infrav1.NetworkStatus `json:"floatingIPNetwork,omitempty"` - Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` + Conditions []metav1.Condition `json:"conditions,omitempty"` } //+kubebuilder:object:root=true @@ -114,12 +113,12 @@ type OpenStackFloatingIPPoolList struct { } // GetConditions returns the observations of the operational state of the OpenStackFloatingIPPool resource. -func (r *OpenStackFloatingIPPool) GetConditions() clusterv1beta1.Conditions { +func (r *OpenStackFloatingIPPool) GetConditions() []metav1.Condition { return r.Status.Conditions } // SetConditions sets the underlying service state of the OpenStackFloatingIPPool to the predescribed clusterv1.Conditions. -func (r *OpenStackFloatingIPPool) SetConditions(conditions clusterv1beta1.Conditions) { +func (r *OpenStackFloatingIPPool) SetConditions(conditions []metav1.Condition) { r.Status.Conditions = conditions } diff --git a/api/v1alpha1/openstackserver_types.go b/api/v1alpha1/openstackserver_types.go index 8172658da..dc1590623 100644 --- a/api/v1alpha1/openstackserver_types.go +++ b/api/v1alpha1/openstackserver_types.go @@ -21,9 +21,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" runtime "k8s.io/apimachinery/pkg/runtime" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional" ) @@ -153,7 +152,7 @@ type OpenStackServerStatus struct { // Conditions defines current service state of the OpenStackServer. // +optional - Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` + Conditions []metav1.Condition `json:"conditions,omitempty"` } // +genclient @@ -185,12 +184,12 @@ type OpenStackServerList struct { } // GetConditions returns the observations of the operational state of the OpenStackServer resource. -func (r *OpenStackServer) GetConditions() clusterv1beta1.Conditions { +func (r *OpenStackServer) GetConditions() []metav1.Condition { return r.Status.Conditions } // SetConditions sets the underlying service state of the OpenStackServer to the predescribed clusterv1.Conditions. -func (r *OpenStackServer) SetConditions(conditions clusterv1beta1.Conditions) { +func (r *OpenStackServer) SetConditions(conditions []metav1.Condition) { r.Status.Conditions = conditions } diff --git a/api/v1alpha1/types.go b/api/v1alpha1/types.go index 77ec07f7b..c42dac219 100644 --- a/api/v1alpha1/types.go +++ b/api/v1alpha1/types.go @@ -17,7 +17,7 @@ limitations under the License. package v1alpha1 import ( - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) // ResolvedServerSpec contains resolved references to resources required by the server. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 079f53308..0a495741f 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ //go:build !ignore_autogenerated /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,8 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" - corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -197,7 +196,7 @@ func (in *OpenStackFloatingIPPoolSpec) DeepCopyInto(out *OpenStackFloatingIPPool out.IdentityRef = in.IdentityRef if in.FloatingIPNetwork != nil { in, out := &in.FloatingIPNetwork, &out.FloatingIPNetwork - *out = new(v1beta1.NetworkParam) + *out = new(v1beta2.NetworkParam) (*in).DeepCopyInto(*out) } } @@ -232,12 +231,12 @@ func (in *OpenStackFloatingIPPoolStatus) DeepCopyInto(out *OpenStackFloatingIPPo } if in.FloatingIPNetwork != nil { in, out := &in.FloatingIPNetwork, &out.FloatingIPNetwork - *out = new(v1beta1.NetworkStatus) + *out = new(v1beta2.NetworkStatus) (*in).DeepCopyInto(*out) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(corev1beta1.Conditions, len(*in)) + *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -318,7 +317,7 @@ func (in *OpenStackServerSpec) DeepCopyInto(out *OpenStackServerSpec) { *out = *in if in.AdditionalBlockDevices != nil { in, out := &in.AdditionalBlockDevices, &out.AdditionalBlockDevices - *out = make([]v1beta1.AdditionalBlockDevice, len(*in)) + *out = make([]v1beta2.AdditionalBlockDevice, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -352,31 +351,31 @@ func (in *OpenStackServerSpec) DeepCopyInto(out *OpenStackServerSpec) { in.Image.DeepCopyInto(&out.Image) if in.Ports != nil { in, out := &in.Ports, &out.Ports - *out = make([]v1beta1.PortOpts, len(*in)) + *out = make([]v1beta2.PortOpts, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.RootVolume != nil { in, out := &in.RootVolume, &out.RootVolume - *out = new(v1beta1.RootVolume) + *out = new(v1beta2.RootVolume) (*in).DeepCopyInto(*out) } if in.SecurityGroups != nil { in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]v1beta1.SecurityGroupParam, len(*in)) + *out = make([]v1beta2.SecurityGroupParam, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ServerGroup != nil { in, out := &in.ServerGroup, &out.ServerGroup - *out = new(v1beta1.ServerGroupParam) + *out = new(v1beta2.ServerGroupParam) (*in).DeepCopyInto(*out) } if in.ServerMetadata != nil { in, out := &in.ServerMetadata, &out.ServerMetadata - *out = make([]v1beta1.ServerMetadata, len(*in)) + *out = make([]v1beta2.ServerMetadata, len(*in)) copy(*out, *in) } if in.Tags != nil { @@ -396,7 +395,7 @@ func (in *OpenStackServerSpec) DeepCopyInto(out *OpenStackServerSpec) { } if in.SchedulerHintAdditionalProperties != nil { in, out := &in.SchedulerHintAdditionalProperties, &out.SchedulerHintAdditionalProperties - *out = make([]v1beta1.SchedulerHintAdditionalProperty, len(*in)) + *out = make([]v1beta2.SchedulerHintAdditionalProperty, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -423,7 +422,7 @@ func (in *OpenStackServerStatus) DeepCopyInto(out *OpenStackServerStatus) { } if in.InstanceState != nil { in, out := &in.InstanceState, &out.InstanceState - *out = new(v1beta1.InstanceState) + *out = new(v1beta2.InstanceState) **out = **in } if in.Addresses != nil { @@ -443,7 +442,7 @@ func (in *OpenStackServerStatus) DeepCopyInto(out *OpenStackServerStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(corev1beta1.Conditions, len(*in)) + *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -465,7 +464,7 @@ func (in *ResolvedServerSpec) DeepCopyInto(out *ResolvedServerSpec) { *out = *in if in.Ports != nil { in, out := &in.Ports, &out.Ports - *out = make([]v1beta1.ResolvedPortSpec, len(*in)) + *out = make([]v1beta2.ResolvedPortSpec, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -487,7 +486,7 @@ func (in *ServerResources) DeepCopyInto(out *ServerResources) { *out = *in if in.Ports != nil { in, out := &in.Ports, &out.Ports - *out = make([]v1beta1.PortStatus, len(*in)) + *out = make([]v1beta2.PortStatus, len(*in)) copy(*out, *in) } } diff --git a/api/v1beta1/conditions_consts.go b/api/v1beta1/conditions_consts.go index d84500772..c9b5c9ef3 100644 --- a/api/v1beta1/conditions_consts.go +++ b/api/v1beta1/conditions_consts.go @@ -68,4 +68,43 @@ const ( FloatingAddressFromPoolErrorReason = "FloatingIPError" // UnableToFindFloatingIPNetworkReason is used when the floating ip network is not found. UnableToFindFloatingIPNetworkReason = "UnableToFindFloatingIPNetwork" + // PortCreateFailedReason used when creating a port failed. + PortCreateFailedReason = "PortCreateFailed" +) + +const ( + // OpenStackAuthenticationSucceeded reports on the current status of the OpenStack credentials. + OpenStackAuthenticationSucceeded clusterv1beta1.ConditionType = "OpenStackAuthenticationSucceeded" + + // OpenStackAuthenticationFailedReason is used when the controller fails to authenticate with OpenStack. + OpenStackAuthenticationFailedReason = "OpenStackAuthenticationFailed" +) + +const ( + // NetworkReadyCondition reports on the current status of the cluster network infrastructure. + // Ready indicates that the network, subnets, and related resources have been successfully provisioned. + NetworkReadyCondition clusterv1beta1.ConditionType = "NetworkReady" + + // RouterReadyCondition reports on the current status of the cluster router infrastructure. + // Ready indicates that the router and its interfaces have been successfully provisioned. + RouterReadyCondition clusterv1beta1.ConditionType = "RouterReady" + + // SecurityGroupsReadyCondition reports on the current status of the cluster security groups. + // Ready indicates that all required security groups have been successfully provisioned. + SecurityGroupsReadyCondition clusterv1beta1.ConditionType = "SecurityGroupsReady" + + // APIEndpointReadyCondition reports on the current status of the cluster API endpoint. + // Ready indicates that the control plane endpoint has been successfully configured. + APIEndpointReadyCondition clusterv1beta1.ConditionType = "APIEndpointReady" + + // NetworkReconcileFailedReason is used when network reconciliation fails. + NetworkReconcileFailedReason = "NetworkCreateFailed" + // SubnetReconcileFailedReason is used when subnet reconciliation fails. + SubnetReconcileFailedReason = "SubnetCreateFailed" + // RouterReconcileFailedReason is used when router reconciliation fails. + RouterReconcileFailedReason = "RouterCreateFailed" + // SecurityGroupReconcileFailedReason is used when security group reconciliation fails. + SecurityGroupReconcileFailedReason = "SecurityGroupCreateFailed" + // APIEndpointConfigFailedReason is used when API endpoint configuration fails. + APIEndpointConfigFailedReason = "APIEndpointConfigFailed" ) diff --git a/api/v1beta1/conversion.go b/api/v1beta1/conversion.go index d442dc0f1..3bd35fb17 100644 --- a/api/v1beta1/conversion.go +++ b/api/v1beta1/conversion.go @@ -17,34 +17,277 @@ limitations under the License. package v1beta1 import ( + "sort" "strings" + "unsafe" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiconversion "k8s.io/apimachinery/pkg/conversion" "k8s.io/utils/ptr" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + utilconversion "sigs.k8s.io/cluster-api/util/conversion" + ctrlconversion "sigs.k8s.io/controller-runtime/pkg/conversion" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) -// Hub marks OpenStackCluster as a conversion hub. -func (*OpenStackCluster) Hub() {} +// ConvertTo converts this OpenStackCluster to the Hub version (v1beta2). +func (src *OpenStackCluster) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackCluster) + if err := Convert_v1beta1_OpenStackCluster_To_v1beta2_OpenStackCluster(src, dst, nil); err != nil { + return err + } + for i := range dst.Status.Conditions { + dst.Status.Conditions[i].ObservedGeneration = src.Generation + } + return utilconversion.MarshalData(src, dst) +} + +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackCluster) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackCluster) + if err := Convert_v1beta2_OpenStackCluster_To_v1beta1_OpenStackCluster(src, dst, nil); err != nil { + return err + } + _, err := utilconversion.UnmarshalData(src, dst) + return err +} + +// ConvertTo converts this OpenStackMachine to the Hub version (v1beta2). +func (src *OpenStackMachine) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackMachine) + if err := Convert_v1beta1_OpenStackMachine_To_v1beta2_OpenStackMachine(src, dst, nil); err != nil { + return err + } + for i := range dst.Status.Conditions { + dst.Status.Conditions[i].ObservedGeneration = src.Generation + } + return utilconversion.MarshalData(src, dst) +} + +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackMachine) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackMachine) + if err := Convert_v1beta2_OpenStackMachine_To_v1beta1_OpenStackMachine(src, dst, nil); err != nil { + return err + } + _, err := utilconversion.UnmarshalData(src, dst) + return err +} + +// ConvertTo converts this OpenStackClusterTemplate to the Hub version (v1beta2). +func (src *OpenStackClusterTemplate) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackClusterTemplate) + if err := Convert_v1beta1_OpenStackClusterTemplate_To_v1beta2_OpenStackClusterTemplate(src, dst, nil); err != nil { + return err + } + return utilconversion.MarshalData(src, dst) +} + +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackClusterTemplate) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackClusterTemplate) + if err := Convert_v1beta2_OpenStackClusterTemplate_To_v1beta1_OpenStackClusterTemplate(src, dst, nil); err != nil { + return err + } + _, err := utilconversion.UnmarshalData(src, dst) + return err +} + +// ConvertTo converts this OpenStackMachineTemplate to the Hub version (v1beta2). +func (src *OpenStackMachineTemplate) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackMachineTemplate) + if err := Convert_v1beta1_OpenStackMachineTemplate_To_v1beta2_OpenStackMachineTemplate(src, dst, nil); err != nil { + return err + } + return utilconversion.MarshalData(src, dst) +} + +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackMachineTemplate) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackMachineTemplate) + if err := Convert_v1beta2_OpenStackMachineTemplate_To_v1beta1_OpenStackMachineTemplate(src, dst, nil); err != nil { + return err + } + _, err := utilconversion.UnmarshalData(src, dst) + return err +} -// Hub marks OpenStackClusterList as a conversion hub. -func (*OpenStackClusterList) Hub() {} +// ConvertTo converts this OpenStackClusterList to the Hub version (v1beta2). +func (src *OpenStackClusterList) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackClusterList) + return Convert_v1beta1_OpenStackClusterList_To_v1beta2_OpenStackClusterList(src, dst, nil) +} -// Hub marks OpenStackClusterTemplate as a conversion hub. -func (*OpenStackClusterTemplate) Hub() {} +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackClusterList) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackClusterList) + return Convert_v1beta2_OpenStackClusterList_To_v1beta1_OpenStackClusterList(src, dst, nil) +} -// Hub marks OpenStackClusterTemplateList as a conversion hub. -func (*OpenStackClusterTemplateList) Hub() {} +// ConvertTo converts this OpenStackMachineList to the Hub version (v1beta2). +func (src *OpenStackMachineList) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackMachineList) + return Convert_v1beta1_OpenStackMachineList_To_v1beta2_OpenStackMachineList(src, dst, nil) +} -// Hub marks OpenStackMachine as a conversion hub. -func (*OpenStackMachine) Hub() {} +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackMachineList) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackMachineList) + return Convert_v1beta2_OpenStackMachineList_To_v1beta1_OpenStackMachineList(src, dst, nil) +} -// Hub marks OpenStackMachineList as a conversion hub. -func (*OpenStackMachineList) Hub() {} +// ConvertTo converts this OpenStackClusterTemplateList to the Hub version (v1beta2). +func (src *OpenStackClusterTemplateList) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackClusterTemplateList) + return Convert_v1beta1_OpenStackClusterTemplateList_To_v1beta2_OpenStackClusterTemplateList(src, dst, nil) +} -// Hub marks OpenStackMachineTemplate as a conversion hub. -func (*OpenStackMachineTemplate) Hub() {} +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackClusterTemplateList) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackClusterTemplateList) + return Convert_v1beta2_OpenStackClusterTemplateList_To_v1beta1_OpenStackClusterTemplateList(src, dst, nil) +} -// Hub marks OpenStackMachineTemplateList as a conversion hub. -func (*OpenStackMachineTemplateList) Hub() {} +// ConvertTo converts this OpenStackMachineTemplateList to the Hub version (v1beta2). +func (src *OpenStackMachineTemplateList) ConvertTo(dstRaw ctrlconversion.Hub) error { + dst := dstRaw.(*infrav1.OpenStackMachineTemplateList) + return Convert_v1beta1_OpenStackMachineTemplateList_To_v1beta2_OpenStackMachineTemplateList(src, dst, nil) +} + +// ConvertFrom converts from the Hub version (v1beta2) to this version. +// +//nolint:revive // dst is the receiver here (converting FROM hub TO spoke) +func (dst *OpenStackMachineTemplateList) ConvertFrom(srcRaw ctrlconversion.Hub) error { + src := srcRaw.(*infrav1.OpenStackMachineTemplateList) + return Convert_v1beta2_OpenStackMachineTemplateList_To_v1beta1_OpenStackMachineTemplateList(src, dst, nil) +} + +// Manual conversion functions for Status types that conversion-gen cannot +// auto-generate due to FailureDomains (map↔slice), Conditions (CAPI↔metav1), +// and deprecated fields (Ready, FailureReason, FailureMessage). + +func Convert_v1beta1_OpenStackClusterStatus_To_v1beta2_OpenStackClusterStatus(in *OpenStackClusterStatus, out *infrav1.OpenStackClusterStatus, _ apiconversion.Scope) error { + out.Initialization = (*infrav1.ClusterInitialization)(unsafe.Pointer(in.Initialization)) + out.Network = (*infrav1.NetworkStatusWithSubnets)(unsafe.Pointer(in.Network)) + out.ExternalNetwork = (*infrav1.NetworkStatus)(unsafe.Pointer(in.ExternalNetwork)) + out.Router = (*infrav1.Router)(unsafe.Pointer(in.Router)) + out.APIServerLoadBalancer = (*infrav1.LoadBalancer)(unsafe.Pointer(in.APIServerLoadBalancer)) + out.ControlPlaneSecurityGroup = (*infrav1.SecurityGroupStatus)(unsafe.Pointer(in.ControlPlaneSecurityGroup)) + out.WorkerSecurityGroup = (*infrav1.SecurityGroupStatus)(unsafe.Pointer(in.WorkerSecurityGroup)) + out.BastionSecurityGroup = (*infrav1.SecurityGroupStatus)(unsafe.Pointer(in.BastionSecurityGroup)) + out.Bastion = (*infrav1.BastionStatus)(unsafe.Pointer(in.Bastion)) + + if len(in.FailureDomains) > 0 { + out.FailureDomains = make([]clusterv1.FailureDomain, 0, len(in.FailureDomains)) + for name, fd := range in.FailureDomains { + out.FailureDomains = append(out.FailureDomains, clusterv1.FailureDomain{ + Name: name, + ControlPlane: ptr.To(fd.ControlPlane), + Attributes: fd.Attributes, + }) + } + sort.Slice(out.FailureDomains, func(i, j int) bool { + return out.FailureDomains[i].Name < out.FailureDomains[j].Name + }) + } + + out.Conditions = infrav1.ConvertConditionsToV1Beta2(in.Conditions, 0) + + return nil +} + +func Convert_v1beta2_OpenStackClusterStatus_To_v1beta1_OpenStackClusterStatus(in *infrav1.OpenStackClusterStatus, out *OpenStackClusterStatus, _ apiconversion.Scope) error { + out.Initialization = (*ClusterInitialization)(unsafe.Pointer(in.Initialization)) + out.Network = (*NetworkStatusWithSubnets)(unsafe.Pointer(in.Network)) + out.ExternalNetwork = (*NetworkStatus)(unsafe.Pointer(in.ExternalNetwork)) + out.Router = (*Router)(unsafe.Pointer(in.Router)) + out.APIServerLoadBalancer = (*LoadBalancer)(unsafe.Pointer(in.APIServerLoadBalancer)) + out.ControlPlaneSecurityGroup = (*SecurityGroupStatus)(unsafe.Pointer(in.ControlPlaneSecurityGroup)) + out.WorkerSecurityGroup = (*SecurityGroupStatus)(unsafe.Pointer(in.WorkerSecurityGroup)) + out.BastionSecurityGroup = (*SecurityGroupStatus)(unsafe.Pointer(in.BastionSecurityGroup)) + out.Bastion = (*BastionStatus)(unsafe.Pointer(in.Bastion)) + + if len(in.FailureDomains) > 0 { + out.FailureDomains = make(clusterv1beta1.FailureDomains, len(in.FailureDomains)) + for _, fd := range in.FailureDomains { + out.FailureDomains[fd.Name] = clusterv1beta1.FailureDomainSpec{ + ControlPlane: ptr.Deref(fd.ControlPlane, false), + Attributes: fd.Attributes, + } + } + } + + out.Conditions = infrav1.ConvertConditionsFromV1Beta2(in.Conditions) + out.Ready = infrav1.IsReady(in.Conditions) + + return nil +} + +func Convert_v1beta1_OpenStackMachineStatus_To_v1beta2_OpenStackMachineStatus(in *OpenStackMachineStatus, out *infrav1.OpenStackMachineStatus, _ apiconversion.Scope) error { + out.Initialization = (*infrav1.MachineInitialization)(unsafe.Pointer(in.Initialization)) + out.InstanceID = in.InstanceID + out.Addresses = in.Addresses + out.InstanceState = (*infrav1.InstanceState)(unsafe.Pointer(in.InstanceState)) + out.Resolved = (*infrav1.ResolvedMachineSpec)(unsafe.Pointer(in.Resolved)) + out.Resources = (*infrav1.MachineResources)(unsafe.Pointer(in.Resources)) + + out.Conditions = infrav1.ConvertConditionsToV1Beta2(in.Conditions, 0) + + return nil +} + +func Convert_v1beta2_OpenStackMachineStatus_To_v1beta1_OpenStackMachineStatus(in *infrav1.OpenStackMachineStatus, out *OpenStackMachineStatus, _ apiconversion.Scope) error { + out.Initialization = (*MachineInitialization)(unsafe.Pointer(in.Initialization)) + out.InstanceID = in.InstanceID + out.Addresses = in.Addresses + out.InstanceState = (*InstanceState)(unsafe.Pointer(in.InstanceState)) + out.Resolved = (*ResolvedMachineSpec)(unsafe.Pointer(in.Resolved)) + out.Resources = (*MachineResources)(unsafe.Pointer(in.Resources)) + + out.Conditions = infrav1.ConvertConditionsFromV1Beta2(in.Conditions) + out.Ready = infrav1.IsReady(in.Conditions) + + return nil +} + +// Element-level Condition conversion functions required by conversion-gen's +// autoConvert functions for Status types. The actual condition conversion is +// handled at the Status level by the manual Convert_*_Status_* functions above. + +func Convert_v1beta1_Condition_To_v1_Condition(in *clusterv1beta1.Condition, out *metav1.Condition, _ apiconversion.Scope) error { + out.Type = string(in.Type) + out.Status = metav1.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_v1_Condition_To_v1beta1_Condition(in *metav1.Condition, out *clusterv1beta1.Condition, _ apiconversion.Scope) error { + out.Type = clusterv1beta1.ConditionType(in.Type) + out.Status = corev1.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} // LegacyCalicoSecurityGroupRules returns a list of security group rules for calico // that need to be applied to the control plane and worker security groups when diff --git a/api/v1beta1/conversion_test.go b/api/v1beta1/conversion_test.go new file mode 100644 index 000000000..384187fb0 --- /dev/null +++ b/api/v1beta1/conversion_test.go @@ -0,0 +1,421 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "testing" + + . "github.com/onsi/gomega" //nolint:revive // dot imports are fine in tests + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/ptr" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +func TestOpenStackClusterConversion(t *testing.T) { + g := NewWithT(t) + + src := &OpenStackCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-cluster", + Namespace: "default", + Generation: 3, + }, + Spec: OpenStackClusterSpec{ + IdentityRef: OpenStackIdentityReference{ + Name: "cloud-config", + CloudName: "openstack", + }, + ManagedSubnets: []SubnetSpec{ + { + CIDR: "192.168.0.0/24", + }, + }, + ManagedSecurityGroups: &ManagedSecurityGroups{}, + }, + Status: OpenStackClusterStatus{ + Ready: true, + FailureDomains: clusterv1beta1.FailureDomains{ + "az-1": clusterv1beta1.FailureDomainSpec{ + ControlPlane: true, + Attributes: map[string]string{"region": "us-east-1"}, + }, + "az-2": clusterv1beta1.FailureDomainSpec{ + ControlPlane: false, + Attributes: map[string]string{"region": "us-west-1"}, + }, + }, + Conditions: clusterv1beta1.Conditions{ + { + Type: clusterv1beta1.ReadyCondition, + Status: corev1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: "Ready", + Message: "Cluster is ready", + Severity: clusterv1beta1.ConditionSeverityInfo, + }, + { + Type: "NetworkReady", + Status: corev1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: "NetworkReady", + Message: "Network is ready", + Severity: clusterv1beta1.ConditionSeverityInfo, + }, + }, + }, + } + + // Convert to v1beta2 + dst := &infrav1.OpenStackCluster{} + g.Expect(src.ConvertTo(dst)).To(Succeed()) + + // Verify basic fields + g.Expect(dst.Name).To(Equal("test-cluster")) + g.Expect(dst.Namespace).To(Equal("default")) + g.Expect(dst.Spec.IdentityRef.Name).To(Equal("cloud-config")) + g.Expect(dst.Spec.ManagedSubnets).To(HaveLen(1)) + + // Verify FailureDomains converted from map to slice + g.Expect(dst.Status.FailureDomains).To(HaveLen(2)) + for _, fd := range dst.Status.FailureDomains { + switch fd.Name { + case "az-1": + g.Expect(ptr.Deref(fd.ControlPlane, false)).To(BeTrue()) + g.Expect(fd.Attributes).To(HaveKeyWithValue("region", "us-east-1")) + case "az-2": + g.Expect(ptr.Deref(fd.ControlPlane, false)).To(BeFalse()) + g.Expect(fd.Attributes).To(HaveKeyWithValue("region", "us-west-1")) + default: + t.Errorf("unexpected failure domain: %s", fd.Name) + } + } + + // Verify conditions converted + g.Expect(dst.Status.Conditions).To(HaveLen(2)) + g.Expect(dst.Status.Conditions[0].Type).To(Equal("Ready")) + g.Expect(dst.Status.Conditions[0].Status).To(Equal(metav1.ConditionTrue)) + g.Expect(dst.Status.Conditions[0].ObservedGeneration).To(Equal(int64(3))) + g.Expect(dst.Status.Conditions[1].Type).To(Equal("NetworkReady")) + + // Convert back to v1beta1 + restored := &OpenStackCluster{} + g.Expect(restored.ConvertFrom(dst)).To(Succeed()) + + // Verify round-trip + g.Expect(restored.Name).To(Equal(src.Name)) + g.Expect(restored.Spec.IdentityRef).To(Equal(src.Spec.IdentityRef)) + g.Expect(restored.Status.Ready).To(BeTrue()) + g.Expect(restored.Status.Conditions).To(HaveLen(2)) + + // Severity is lost during conversion, so it won't match exactly + g.Expect(restored.Status.Conditions[0].Type).To(Equal(src.Status.Conditions[0].Type)) + g.Expect(restored.Status.Conditions[0].Status).To(Equal(src.Status.Conditions[0].Status)) + + // Verify FailureDomains round-trip (slice back to map) + g.Expect(restored.Status.FailureDomains).To(HaveLen(2)) + g.Expect(restored.Status.FailureDomains).To(HaveKey("az-1")) + g.Expect(restored.Status.FailureDomains).To(HaveKey("az-2")) + g.Expect(restored.Status.FailureDomains["az-1"].ControlPlane).To(BeTrue()) + g.Expect(restored.Status.FailureDomains["az-1"].Attributes).To(HaveKeyWithValue("region", "us-east-1")) + g.Expect(restored.Status.FailureDomains["az-2"].ControlPlane).To(BeFalse()) + g.Expect(restored.Status.FailureDomains["az-2"].Attributes).To(HaveKeyWithValue("region", "us-west-1")) +} + +func TestOpenStackMachineConversion(t *testing.T) { + g := NewWithT(t) + + src := &OpenStackMachine{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-machine", + Namespace: "default", + Generation: 5, + }, + Spec: OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + SSHKeyName: "test-key", + Image: ImageParam{ + Filter: &ImageFilter{ + Name: ptr.To("ubuntu-22.04"), + }, + }, + }, + Status: OpenStackMachineStatus{ + Ready: true, + Initialization: &MachineInitialization{ + Provisioned: true, + }, + InstanceID: ptr.To("instance-12345"), + Conditions: clusterv1beta1.Conditions{ + { + Type: clusterv1beta1.ReadyCondition, + Status: corev1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: "Ready", + Severity: clusterv1beta1.ConditionSeverityInfo, + }, + }, + }, + } + + // Convert to v1beta2 + dst := &infrav1.OpenStackMachine{} + g.Expect(src.ConvertTo(dst)).To(Succeed()) + + // Verify basic fields + g.Expect(dst.Name).To(Equal("test-machine")) + g.Expect(dst.Spec.Flavor).To(Equal(ptr.To("m1.small"))) + g.Expect(dst.Spec.SSHKeyName).To(Equal("test-key")) + g.Expect(ptr.Deref((*string)(dst.Spec.Image.Filter.Name), "")).To(Equal("ubuntu-22.04")) + + // Verify status fields including Initialization and InstanceID + g.Expect(dst.Status.Initialization).NotTo(BeNil()) + g.Expect(dst.Status.Initialization.Provisioned).To(BeTrue()) + g.Expect(*dst.Status.InstanceID).To(Equal("instance-12345")) + + // Verify conditions + g.Expect(dst.Status.Conditions).To(HaveLen(1)) + g.Expect(dst.Status.Conditions[0].Type).To(Equal("Ready")) + g.Expect(dst.Status.Conditions[0].ObservedGeneration).To(Equal(int64(5))) + + // Convert back + restored := &OpenStackMachine{} + g.Expect(restored.ConvertFrom(dst)).To(Succeed()) + + // Verify round-trip + g.Expect(restored.Name).To(Equal(src.Name)) + g.Expect(restored.Spec.Flavor).To(Equal(src.Spec.Flavor)) + g.Expect(restored.Spec.SSHKeyName).To(Equal("test-key")) + g.Expect(restored.Status.Ready).To(BeTrue()) + g.Expect(restored.Status.Initialization).NotTo(BeNil()) + g.Expect(restored.Status.Initialization.Provisioned).To(BeTrue()) + g.Expect(*restored.Status.InstanceID).To(Equal("instance-12345")) +} + +func TestOpenStackClusterTemplateConversion(t *testing.T) { + g := NewWithT(t) + + src := &OpenStackClusterTemplate{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-template", + Namespace: "default", + }, + Spec: OpenStackClusterTemplateSpec{ + Template: OpenStackClusterTemplateResource{ + Spec: OpenStackClusterSpec{ + IdentityRef: OpenStackIdentityReference{ + Name: "cloud-config", + CloudName: "openstack", + }, + ManagedSubnets: []SubnetSpec{ + { + CIDR: "10.0.0.0/16", + }, + }, + }, + }, + }, + } + + // Convert to v1beta2 + dst := &infrav1.OpenStackClusterTemplate{} + g.Expect(src.ConvertTo(dst)).To(Succeed()) + + // Verify template spec + g.Expect(dst.Name).To(Equal("test-template")) + g.Expect(dst.Spec.Template.Spec.IdentityRef.Name).To(Equal("cloud-config")) + g.Expect(dst.Spec.Template.Spec.ManagedSubnets).To(HaveLen(1)) + + // Convert back + restored := &OpenStackClusterTemplate{} + g.Expect(restored.ConvertFrom(dst)).To(Succeed()) + + // Verify round-trip + g.Expect(restored.Name).To(Equal(src.Name)) + g.Expect(restored.Spec.Template.Spec.IdentityRef).To(Equal(src.Spec.Template.Spec.IdentityRef)) +} + +func TestOpenStackMachineTemplateConversion(t *testing.T) { + g := NewWithT(t) + + src := &OpenStackMachineTemplate{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-machine-template", + Namespace: "default", + }, + Spec: OpenStackMachineTemplateSpec{ + Template: OpenStackMachineTemplateResource{ + Spec: OpenStackMachineSpec{ + Flavor: ptr.To("m1.large"), + Image: ImageParam{ + Filter: &ImageFilter{ + Name: ptr.To("ubuntu-22.04"), + }, + }, + }, + }, + }, + } + + // Convert to v1beta2 + dst := &infrav1.OpenStackMachineTemplate{} + g.Expect(src.ConvertTo(dst)).To(Succeed()) + + // Verify template spec + g.Expect(dst.Name).To(Equal("test-machine-template")) + g.Expect(dst.Spec.Template.Spec.Flavor).To(Equal(ptr.To("m1.large"))) + + // Convert back + restored := &OpenStackMachineTemplate{} + g.Expect(restored.ConvertFrom(dst)).To(Succeed()) + + // Verify round-trip + g.Expect(restored.Name).To(Equal(src.Name)) + g.Expect(restored.Spec.Template.Spec.Flavor).To(Equal(src.Spec.Template.Spec.Flavor)) +} + +func TestConditionConversion(t *testing.T) { + g := NewWithT(t) + + // Test v1beta1 -> v1beta2 condition conversion + v1beta1Conditions := clusterv1beta1.Conditions{ + { + Type: "Ready", + Status: corev1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: "AllComponentsReady", + Message: "All components are ready", + Severity: clusterv1beta1.ConditionSeverityInfo, + }, + { + Type: "NetworkReady", + Status: corev1.ConditionFalse, + LastTransitionTime: metav1.Now(), + Reason: "NetworkCreateFailed", + Message: "Failed to create network", + Severity: clusterv1beta1.ConditionSeverityError, + }, + } + + v1beta2Conditions := infrav1.ConvertConditionsToV1Beta2(v1beta1Conditions, 10) + + g.Expect(v1beta2Conditions).To(HaveLen(2)) + g.Expect(v1beta2Conditions[0].Type).To(Equal("Ready")) + g.Expect(v1beta2Conditions[0].Status).To(Equal(metav1.ConditionTrue)) + g.Expect(v1beta2Conditions[0].ObservedGeneration).To(Equal(int64(10))) + g.Expect(v1beta2Conditions[1].Type).To(Equal("NetworkReady")) + g.Expect(v1beta2Conditions[1].Status).To(Equal(metav1.ConditionFalse)) + + // Test v1beta2 -> v1beta1 condition conversion + restoredConditions := infrav1.ConvertConditionsFromV1Beta2(v1beta2Conditions) + + g.Expect(restoredConditions).To(HaveLen(2)) + g.Expect(restoredConditions[0].Type).To(Equal(clusterv1beta1.ConditionType("Ready"))) + g.Expect(restoredConditions[0].Status).To(Equal(corev1.ConditionTrue)) + // Severity is lost during conversion + g.Expect(restoredConditions[0].Severity).To(Equal(clusterv1beta1.ConditionSeverityNone)) +} + +func TestOpenStackClusterListConversion(t *testing.T) { + g := NewWithT(t) + + src := &OpenStackClusterList{ + Items: []OpenStackCluster{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "cluster-1", + Namespace: "default", + Generation: 1, + }, + Spec: OpenStackClusterSpec{ + IdentityRef: OpenStackIdentityReference{ + Name: "cloud-config", + CloudName: "openstack", + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "cluster-2", + Namespace: "default", + Generation: 2, + }, + Spec: OpenStackClusterSpec{ + IdentityRef: OpenStackIdentityReference{ + Name: "cloud-config-2", + CloudName: "openstack", + }, + }, + }, + }, + } + + // Convert to v1beta2 + dst := &infrav1.OpenStackClusterList{} + g.Expect(src.ConvertTo(dst)).To(Succeed()) + + // Verify items converted + g.Expect(dst.Items).To(HaveLen(2)) + g.Expect(dst.Items[0].Name).To(Equal("cluster-1")) + g.Expect(dst.Items[1].Name).To(Equal("cluster-2")) + + // Convert back + restored := &OpenStackClusterList{} + g.Expect(restored.ConvertFrom(dst)).To(Succeed()) + + // Verify round-trip + g.Expect(restored.Items).To(HaveLen(2)) + g.Expect(restored.Items[0].Name).To(Equal("cluster-1")) + g.Expect(restored.Items[1].Spec.IdentityRef.Name).To(Equal("cloud-config-2")) +} + +func TestIsReadyHelper(t *testing.T) { + g := NewWithT(t) + + // Test with Ready condition True + conditions := []metav1.Condition{ + { + Type: "Ready", + Status: metav1.ConditionTrue, + }, + } + g.Expect(infrav1.IsReady(conditions)).To(BeTrue()) + + // Test with Ready condition False + conditions = []metav1.Condition{ + { + Type: "Ready", + Status: metav1.ConditionFalse, + }, + } + g.Expect(infrav1.IsReady(conditions)).To(BeFalse()) + + // Test with no Ready condition + conditions = []metav1.Condition{ + { + Type: "NetworkReady", + Status: metav1.ConditionTrue, + }, + } + g.Expect(infrav1.IsReady(conditions)).To(BeFalse()) + + // Test with empty conditions + g.Expect(infrav1.IsReady(nil)).To(BeFalse()) + g.Expect(infrav1.IsReady([]metav1.Condition{})).To(BeFalse()) +} diff --git a/api/v1beta1/doc.go b/api/v1beta1/doc.go index d52e35d0e..eb6fcd9b4 100644 --- a/api/v1beta1/doc.go +++ b/api/v1beta1/doc.go @@ -17,5 +17,6 @@ limitations under the License. // Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group. // +kubebuilder:object:generate=true // +groupName=infrastructure.cluster.x-k8s.io +// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2 // +k8s:openapi-gen=true package v1beta1 diff --git a/api/v1beta1/groupversion_info.go b/api/v1beta1/groupversion_info.go index d4ed85c0f..2fde933a3 100644 --- a/api/v1beta1/groupversion_info.go +++ b/api/v1beta1/groupversion_info.go @@ -40,6 +40,9 @@ var ( // schemeBuilder is used to add go types to the GroupVersionKind scheme. schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // localSchemeBuilder is referenced by conversion-gen to register conversion functions. + localSchemeBuilder = &schemeBuilder + // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = schemeBuilder.AddToScheme diff --git a/api/v1beta1/openstackcluster_types.go b/api/v1beta1/openstackcluster_types.go index 02833b1ea..a412b80f4 100644 --- a/api/v1beta1/openstackcluster_types.go +++ b/api/v1beta1/openstackcluster_types.go @@ -196,12 +196,27 @@ type OpenStackClusterSpec struct { IdentityRef OpenStackIdentityReference `json:"identityRef"` } +// ClusterInitialization represents the initialization status of the cluster. +type ClusterInitialization struct { + // Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + // +optional + Provisioned bool `json:"provisioned,omitempty"` +} + // OpenStackClusterStatus defines the observed state of OpenStackCluster. type OpenStackClusterStatus struct { // Ready is true when the cluster infrastructure is ready. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to determine the ready state of the cluster. // +kubebuilder:default=false Ready bool `json:"ready"` + // Initialization contains information about the initialization status of the cluster. + // +optional + Initialization *ClusterInitialization `json:"initialization,omitempty"` + // Network contains information about the created OpenStack Network. // +optional Network *NetworkStatusWithSubnets `json:"network,omitempty"` @@ -257,6 +272,9 @@ type OpenStackClusterStatus struct { // Any transient errors that occur during the reconciliation of // OpenStackClusters can be added as events to the OpenStackCluster object // and/or logged in the controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. // +optional FailureReason *capoerrors.DeprecatedCAPIClusterStatusError `json:"failureReason,omitempty"` @@ -276,14 +294,23 @@ type OpenStackClusterStatus struct { // Any transient errors that occur during the reconciliation of // OpenStackClusters can be added as events to the OpenStackCluster object // and/or logged in the controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. // +optional FailureMessage *string `json:"failureMessage,omitempty"` + + // Conditions defines current service state of the OpenStackCluster. + // This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + // (both during initial provisioning and after the initial provisioning is completed). + // +optional + Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` } // +genclient // +kubebuilder:object:root=true // +kubebuilder:resource:path=openstackclusters,scope=Namespaced,categories=cluster-api,shortName=osc -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this OpenStackCluster belongs" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Cluster infrastructure is ready for OpenStack instances" @@ -344,6 +371,16 @@ type ManagedSecurityGroups struct { var _ IdentityRefProvider = &OpenStackCluster{} +// GetConditions returns the observations of the operational state of the OpenStackCluster resource. +func (c *OpenStackCluster) GetConditions() clusterv1beta1.Conditions { + return c.Status.Conditions +} + +// SetConditions sets the underlying service state of the OpenStackCluster to the predescribed clusterv1.Conditions. +func (c *OpenStackCluster) SetConditions(conditions clusterv1beta1.Conditions) { + c.Status.Conditions = conditions +} + // GetIdentifyRef returns the cluster's namespace and IdentityRef. func (c *OpenStackCluster) GetIdentityRef() (*string, *OpenStackIdentityReference) { return &c.Namespace, &c.Spec.IdentityRef diff --git a/api/v1beta1/openstackclustertemplate_types.go b/api/v1beta1/openstackclustertemplate_types.go index 6c78cfea3..21ba33022 100644 --- a/api/v1beta1/openstackclustertemplate_types.go +++ b/api/v1beta1/openstackclustertemplate_types.go @@ -32,7 +32,6 @@ type OpenStackClusterTemplateSpec struct { // +genclient // +kubebuilder:object:root=true -// +kubebuilder:storageversion // +kubebuilder:resource:path=openstackclustertemplates,scope=Namespaced,categories=cluster-api,shortName=osct // OpenStackClusterTemplate is the Schema for the openstackclustertemplates API. diff --git a/api/v1beta1/openstackmachine_types.go b/api/v1beta1/openstackmachine_types.go index 8b52e62a4..f716f8229 100644 --- a/api/v1beta1/openstackmachine_types.go +++ b/api/v1beta1/openstackmachine_types.go @@ -185,12 +185,27 @@ type ServerMetadata struct { Value string `json:"value"` } +// MachineInitialization contains information about the initialization status of the machine. +type MachineInitialization struct { + // Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + // +optional + Provisioned bool `json:"provisioned,omitempty"` +} + // OpenStackMachineStatus defines the observed state of OpenStackMachine. type OpenStackMachineStatus struct { // Ready is true when the provider resource is ready. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to determine the ready state of the machine. // +optional Ready bool `json:"ready"` + // Initialization contains information about the initialization status of the machine. + // +optional + Initialization *MachineInitialization `json:"initialization,omitempty"` + // InstanceID is the OpenStack instance ID for this machine. // +optional InstanceID optional.String `json:"instanceID,omitempty"` @@ -213,6 +228,11 @@ type OpenStackMachineStatus struct { // +optional Resources *MachineResources `json:"resources,omitempty"` + // FailureReason explains the reson behind a failure. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. + // +optional FailureReason *capoerrors.DeprecatedCAPIMachineStatusError `json:"failureReason,omitempty"` // FailureMessage will be set in the event that there is a terminal problem @@ -231,15 +251,22 @@ type OpenStackMachineStatus struct { // 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 will be removed in a future API version. + // Use status.conditions to report failures. // +optional FailureMessage *string `json:"failureMessage,omitempty"` + // Conditions defines current service state of the OpenStackMachine. + // This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + // (both during initial provisioning and after the initial provisioning is completed). + // +optional Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` } // +genclient // +kubebuilder:object:root=true -// +kubebuilder:storageversion // +kubebuilder:resource:path=openstackmachines,scope=Namespaced,categories=cluster-api,shortName=osm // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this OpenStackMachine belongs" diff --git a/api/v1beta1/openstackmachinetemplate_types.go b/api/v1beta1/openstackmachinetemplate_types.go index a02f02102..5114c704a 100644 --- a/api/v1beta1/openstackmachinetemplate_types.go +++ b/api/v1beta1/openstackmachinetemplate_types.go @@ -17,7 +17,9 @@ limitations under the License. package v1beta1 import ( + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // OpenStackMachineTemplateSpec defines the desired state of OpenStackMachineTemplate. @@ -25,17 +27,44 @@ type OpenStackMachineTemplateSpec struct { Template OpenStackMachineTemplateResource `json:"template"` } +// OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate. +type OpenStackMachineTemplateStatus struct { + // Capacity defines the resource capacity for this machine. + // This value is used for autoscaling from zero operations as defined in: + // https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + // +optional + Capacity corev1.ResourceList `json:"capacity,omitempty"` + // +optional + NodeInfo NodeInfo `json:"nodeInfo,omitempty,omitzero"` + + // Conditions defines current service state of the OpenStackMachineTemplate. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. + // (both during initial provisioning and after the initial provisioning is completed). + // +optional + Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` +} + +// NodeInfo contains information about the node's architecture and operating system. +// +kubebuilder:validation:MinProperties=1 +type NodeInfo struct { + // operatingSystem is a string representing the operating system of the node. + // This may be a string like 'linux' or 'windows'. + // +optional + OperatingSystem string `json:"operatingSystem,omitempty"` +} + // +genclient // +kubebuilder:object:root=true -// +kubebuilder:storageversion // +kubebuilder:resource:path=openstackmachinetemplates,scope=Namespaced,categories=cluster-api,shortName=osmt +// +kubebuilder:subresource:status // OpenStackMachineTemplate is the Schema for the openstackmachinetemplates API. type OpenStackMachineTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec OpenStackMachineTemplateSpec `json:"spec,omitempty"` + Spec OpenStackMachineTemplateSpec `json:"spec,omitempty"` + Status OpenStackMachineTemplateStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true @@ -50,3 +79,21 @@ type OpenStackMachineTemplateList struct { func init() { objectTypes = append(objectTypes, &OpenStackMachineTemplate{}, &OpenStackMachineTemplateList{}) } + +// GetIdentifyRef returns the object's namespace and IdentityRef if it has an IdentityRef, or nulls if it does not. +func (r *OpenStackMachineTemplate) GetIdentityRef() (*string, *OpenStackIdentityReference) { + if r.Spec.Template.Spec.IdentityRef != nil { + return &r.Namespace, r.Spec.Template.Spec.IdentityRef + } + return nil, nil +} + +// GetConditions returns the observations of the operational state of the OpenStackMachineTemplate resource. +func (r *OpenStackMachineTemplate) GetConditions() clusterv1beta1.Conditions { + return r.Status.Conditions +} + +// SetConditions sets the underlying service state of the OpenStackMachineTemplate to the predescribed clusterv1.Conditions. +func (r *OpenStackMachineTemplate) SetConditions(conditions clusterv1beta1.Conditions) { + r.Status.Conditions = conditions +} diff --git a/api/v1beta1/types.go b/api/v1beta1/types.go index 5cb066219..8232d64d7 100644 --- a/api/v1beta1/types.go +++ b/api/v1beta1/types.go @@ -792,6 +792,11 @@ var ( // InstanceStateDeleted is the string representing an instance in a deleted state. InstanceStateDeleted = InstanceState("DELETED") + // InstanceStateSoftDeleted is the string representing an instance in a soft-deleted state. + // This state occurs when OpenStack is configured with a reclaim_instance_interval > 0, + // allowing recovery of deleted instances within the reclaim period. + InstanceStateSoftDeleted = InstanceState("SOFT_DELETED") + // InstanceStateUndefined is the string representing an undefined instance state. InstanceStateUndefined = InstanceState("") ) diff --git a/api/v1beta1/zz_generated.conversion.go b/api/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..32f202351 --- /dev/null +++ b/api/v1beta1/zz_generated.conversion.go @@ -0,0 +1,2713 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1beta1 + +import ( + unsafe "unsafe" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + optional "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*APIServerLoadBalancer)(nil), (*v1beta2.APIServerLoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIServerLoadBalancer_To_v1beta2_APIServerLoadBalancer(a.(*APIServerLoadBalancer), b.(*v1beta2.APIServerLoadBalancer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.APIServerLoadBalancer)(nil), (*APIServerLoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_APIServerLoadBalancer_To_v1beta1_APIServerLoadBalancer(a.(*v1beta2.APIServerLoadBalancer), b.(*APIServerLoadBalancer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*APIServerLoadBalancerMonitor)(nil), (*v1beta2.APIServerLoadBalancerMonitor)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIServerLoadBalancerMonitor_To_v1beta2_APIServerLoadBalancerMonitor(a.(*APIServerLoadBalancerMonitor), b.(*v1beta2.APIServerLoadBalancerMonitor), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.APIServerLoadBalancerMonitor)(nil), (*APIServerLoadBalancerMonitor)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_APIServerLoadBalancerMonitor_To_v1beta1_APIServerLoadBalancerMonitor(a.(*v1beta2.APIServerLoadBalancerMonitor), b.(*APIServerLoadBalancerMonitor), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AdditionalBlockDevice)(nil), (*v1beta2.AdditionalBlockDevice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AdditionalBlockDevice_To_v1beta2_AdditionalBlockDevice(a.(*AdditionalBlockDevice), b.(*v1beta2.AdditionalBlockDevice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.AdditionalBlockDevice)(nil), (*AdditionalBlockDevice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_AdditionalBlockDevice_To_v1beta1_AdditionalBlockDevice(a.(*v1beta2.AdditionalBlockDevice), b.(*AdditionalBlockDevice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AddressPair)(nil), (*v1beta2.AddressPair)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AddressPair_To_v1beta2_AddressPair(a.(*AddressPair), b.(*v1beta2.AddressPair), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.AddressPair)(nil), (*AddressPair)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_AddressPair_To_v1beta1_AddressPair(a.(*v1beta2.AddressPair), b.(*AddressPair), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AllocationPool)(nil), (*v1beta2.AllocationPool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AllocationPool_To_v1beta2_AllocationPool(a.(*AllocationPool), b.(*v1beta2.AllocationPool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.AllocationPool)(nil), (*AllocationPool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_AllocationPool_To_v1beta1_AllocationPool(a.(*v1beta2.AllocationPool), b.(*AllocationPool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Bastion)(nil), (*v1beta2.Bastion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Bastion_To_v1beta2_Bastion(a.(*Bastion), b.(*v1beta2.Bastion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.Bastion)(nil), (*Bastion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_Bastion_To_v1beta1_Bastion(a.(*v1beta2.Bastion), b.(*Bastion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BastionStatus)(nil), (*v1beta2.BastionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BastionStatus_To_v1beta2_BastionStatus(a.(*BastionStatus), b.(*v1beta2.BastionStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.BastionStatus)(nil), (*BastionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BastionStatus_To_v1beta1_BastionStatus(a.(*v1beta2.BastionStatus), b.(*BastionStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BindingProfile)(nil), (*v1beta2.BindingProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BindingProfile_To_v1beta2_BindingProfile(a.(*BindingProfile), b.(*v1beta2.BindingProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.BindingProfile)(nil), (*BindingProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BindingProfile_To_v1beta1_BindingProfile(a.(*v1beta2.BindingProfile), b.(*BindingProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BlockDeviceStorage)(nil), (*v1beta2.BlockDeviceStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BlockDeviceStorage_To_v1beta2_BlockDeviceStorage(a.(*BlockDeviceStorage), b.(*v1beta2.BlockDeviceStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.BlockDeviceStorage)(nil), (*BlockDeviceStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BlockDeviceStorage_To_v1beta1_BlockDeviceStorage(a.(*v1beta2.BlockDeviceStorage), b.(*BlockDeviceStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BlockDeviceVolume)(nil), (*v1beta2.BlockDeviceVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BlockDeviceVolume_To_v1beta2_BlockDeviceVolume(a.(*BlockDeviceVolume), b.(*v1beta2.BlockDeviceVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.BlockDeviceVolume)(nil), (*BlockDeviceVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BlockDeviceVolume_To_v1beta1_BlockDeviceVolume(a.(*v1beta2.BlockDeviceVolume), b.(*BlockDeviceVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterInitialization)(nil), (*v1beta2.ClusterInitialization)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterInitialization_To_v1beta2_ClusterInitialization(a.(*ClusterInitialization), b.(*v1beta2.ClusterInitialization), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ClusterInitialization)(nil), (*ClusterInitialization)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ClusterInitialization_To_v1beta1_ClusterInitialization(a.(*v1beta2.ClusterInitialization), b.(*ClusterInitialization), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExternalRouterIPParam)(nil), (*v1beta2.ExternalRouterIPParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExternalRouterIPParam_To_v1beta2_ExternalRouterIPParam(a.(*ExternalRouterIPParam), b.(*v1beta2.ExternalRouterIPParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ExternalRouterIPParam)(nil), (*ExternalRouterIPParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ExternalRouterIPParam_To_v1beta1_ExternalRouterIPParam(a.(*v1beta2.ExternalRouterIPParam), b.(*ExternalRouterIPParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FilterByNeutronTags)(nil), (*v1beta2.FilterByNeutronTags)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(a.(*FilterByNeutronTags), b.(*v1beta2.FilterByNeutronTags), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.FilterByNeutronTags)(nil), (*FilterByNeutronTags)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(a.(*v1beta2.FilterByNeutronTags), b.(*FilterByNeutronTags), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FixedIP)(nil), (*v1beta2.FixedIP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FixedIP_To_v1beta2_FixedIP(a.(*FixedIP), b.(*v1beta2.FixedIP), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.FixedIP)(nil), (*FixedIP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_FixedIP_To_v1beta1_FixedIP(a.(*v1beta2.FixedIP), b.(*FixedIP), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageFilter)(nil), (*v1beta2.ImageFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageFilter_To_v1beta2_ImageFilter(a.(*ImageFilter), b.(*v1beta2.ImageFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ImageFilter)(nil), (*ImageFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ImageFilter_To_v1beta1_ImageFilter(a.(*v1beta2.ImageFilter), b.(*ImageFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageParam)(nil), (*v1beta2.ImageParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageParam_To_v1beta2_ImageParam(a.(*ImageParam), b.(*v1beta2.ImageParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ImageParam)(nil), (*ImageParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ImageParam_To_v1beta1_ImageParam(a.(*v1beta2.ImageParam), b.(*ImageParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LoadBalancer)(nil), (*v1beta2.LoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LoadBalancer_To_v1beta2_LoadBalancer(a.(*LoadBalancer), b.(*v1beta2.LoadBalancer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.LoadBalancer)(nil), (*LoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer(a.(*v1beta2.LoadBalancer), b.(*LoadBalancer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineInitialization)(nil), (*v1beta2.MachineInitialization)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineInitialization_To_v1beta2_MachineInitialization(a.(*MachineInitialization), b.(*v1beta2.MachineInitialization), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachineInitialization)(nil), (*MachineInitialization)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachineInitialization_To_v1beta1_MachineInitialization(a.(*v1beta2.MachineInitialization), b.(*MachineInitialization), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineResources)(nil), (*v1beta2.MachineResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineResources_To_v1beta2_MachineResources(a.(*MachineResources), b.(*v1beta2.MachineResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachineResources)(nil), (*MachineResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachineResources_To_v1beta1_MachineResources(a.(*v1beta2.MachineResources), b.(*MachineResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSecurityGroups)(nil), (*v1beta2.ManagedSecurityGroups)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ManagedSecurityGroups_To_v1beta2_ManagedSecurityGroups(a.(*ManagedSecurityGroups), b.(*v1beta2.ManagedSecurityGroups), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ManagedSecurityGroups)(nil), (*ManagedSecurityGroups)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ManagedSecurityGroups_To_v1beta1_ManagedSecurityGroups(a.(*v1beta2.ManagedSecurityGroups), b.(*ManagedSecurityGroups), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NetworkFilter)(nil), (*v1beta2.NetworkFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NetworkFilter_To_v1beta2_NetworkFilter(a.(*NetworkFilter), b.(*v1beta2.NetworkFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.NetworkFilter)(nil), (*NetworkFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_NetworkFilter_To_v1beta1_NetworkFilter(a.(*v1beta2.NetworkFilter), b.(*NetworkFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NetworkParam)(nil), (*v1beta2.NetworkParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NetworkParam_To_v1beta2_NetworkParam(a.(*NetworkParam), b.(*v1beta2.NetworkParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.NetworkParam)(nil), (*NetworkParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_NetworkParam_To_v1beta1_NetworkParam(a.(*v1beta2.NetworkParam), b.(*NetworkParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NetworkStatus)(nil), (*v1beta2.NetworkStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NetworkStatus_To_v1beta2_NetworkStatus(a.(*NetworkStatus), b.(*v1beta2.NetworkStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.NetworkStatus)(nil), (*NetworkStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_NetworkStatus_To_v1beta1_NetworkStatus(a.(*v1beta2.NetworkStatus), b.(*NetworkStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NetworkStatusWithSubnets)(nil), (*v1beta2.NetworkStatusWithSubnets)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NetworkStatusWithSubnets_To_v1beta2_NetworkStatusWithSubnets(a.(*NetworkStatusWithSubnets), b.(*v1beta2.NetworkStatusWithSubnets), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.NetworkStatusWithSubnets)(nil), (*NetworkStatusWithSubnets)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_NetworkStatusWithSubnets_To_v1beta1_NetworkStatusWithSubnets(a.(*v1beta2.NetworkStatusWithSubnets), b.(*NetworkStatusWithSubnets), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NodeInfo)(nil), (*v1beta2.NodeInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeInfo_To_v1beta2_NodeInfo(a.(*NodeInfo), b.(*v1beta2.NodeInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.NodeInfo)(nil), (*NodeInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_NodeInfo_To_v1beta1_NodeInfo(a.(*v1beta2.NodeInfo), b.(*NodeInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackCluster)(nil), (*v1beta2.OpenStackCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackCluster_To_v1beta2_OpenStackCluster(a.(*OpenStackCluster), b.(*v1beta2.OpenStackCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackCluster)(nil), (*OpenStackCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackCluster_To_v1beta1_OpenStackCluster(a.(*v1beta2.OpenStackCluster), b.(*OpenStackCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackClusterList)(nil), (*v1beta2.OpenStackClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackClusterList_To_v1beta2_OpenStackClusterList(a.(*OpenStackClusterList), b.(*v1beta2.OpenStackClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackClusterList)(nil), (*OpenStackClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackClusterList_To_v1beta1_OpenStackClusterList(a.(*v1beta2.OpenStackClusterList), b.(*OpenStackClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackClusterSpec)(nil), (*v1beta2.OpenStackClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackClusterSpec_To_v1beta2_OpenStackClusterSpec(a.(*OpenStackClusterSpec), b.(*v1beta2.OpenStackClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackClusterSpec)(nil), (*OpenStackClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackClusterSpec_To_v1beta1_OpenStackClusterSpec(a.(*v1beta2.OpenStackClusterSpec), b.(*OpenStackClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackClusterTemplate)(nil), (*v1beta2.OpenStackClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackClusterTemplate_To_v1beta2_OpenStackClusterTemplate(a.(*OpenStackClusterTemplate), b.(*v1beta2.OpenStackClusterTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackClusterTemplate)(nil), (*OpenStackClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackClusterTemplate_To_v1beta1_OpenStackClusterTemplate(a.(*v1beta2.OpenStackClusterTemplate), b.(*OpenStackClusterTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackClusterTemplateList)(nil), (*v1beta2.OpenStackClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackClusterTemplateList_To_v1beta2_OpenStackClusterTemplateList(a.(*OpenStackClusterTemplateList), b.(*v1beta2.OpenStackClusterTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackClusterTemplateList)(nil), (*OpenStackClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackClusterTemplateList_To_v1beta1_OpenStackClusterTemplateList(a.(*v1beta2.OpenStackClusterTemplateList), b.(*OpenStackClusterTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackClusterTemplateResource)(nil), (*v1beta2.OpenStackClusterTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackClusterTemplateResource_To_v1beta2_OpenStackClusterTemplateResource(a.(*OpenStackClusterTemplateResource), b.(*v1beta2.OpenStackClusterTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackClusterTemplateResource)(nil), (*OpenStackClusterTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackClusterTemplateResource_To_v1beta1_OpenStackClusterTemplateResource(a.(*v1beta2.OpenStackClusterTemplateResource), b.(*OpenStackClusterTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackClusterTemplateSpec)(nil), (*v1beta2.OpenStackClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackClusterTemplateSpec_To_v1beta2_OpenStackClusterTemplateSpec(a.(*OpenStackClusterTemplateSpec), b.(*v1beta2.OpenStackClusterTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackClusterTemplateSpec)(nil), (*OpenStackClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackClusterTemplateSpec_To_v1beta1_OpenStackClusterTemplateSpec(a.(*v1beta2.OpenStackClusterTemplateSpec), b.(*OpenStackClusterTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackIdentityReference)(nil), (*v1beta2.OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackIdentityReference_To_v1beta2_OpenStackIdentityReference(a.(*OpenStackIdentityReference), b.(*v1beta2.OpenStackIdentityReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackIdentityReference)(nil), (*OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackIdentityReference_To_v1beta1_OpenStackIdentityReference(a.(*v1beta2.OpenStackIdentityReference), b.(*OpenStackIdentityReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachine)(nil), (*v1beta2.OpenStackMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachine_To_v1beta2_OpenStackMachine(a.(*OpenStackMachine), b.(*v1beta2.OpenStackMachine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachine)(nil), (*OpenStackMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachine_To_v1beta1_OpenStackMachine(a.(*v1beta2.OpenStackMachine), b.(*OpenStackMachine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineList)(nil), (*v1beta2.OpenStackMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineList_To_v1beta2_OpenStackMachineList(a.(*OpenStackMachineList), b.(*v1beta2.OpenStackMachineList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachineList)(nil), (*OpenStackMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineList_To_v1beta1_OpenStackMachineList(a.(*v1beta2.OpenStackMachineList), b.(*OpenStackMachineList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineSpec)(nil), (*v1beta2.OpenStackMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineSpec_To_v1beta2_OpenStackMachineSpec(a.(*OpenStackMachineSpec), b.(*v1beta2.OpenStackMachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachineSpec)(nil), (*OpenStackMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec(a.(*v1beta2.OpenStackMachineSpec), b.(*OpenStackMachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineTemplate)(nil), (*v1beta2.OpenStackMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineTemplate_To_v1beta2_OpenStackMachineTemplate(a.(*OpenStackMachineTemplate), b.(*v1beta2.OpenStackMachineTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachineTemplate)(nil), (*OpenStackMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineTemplate_To_v1beta1_OpenStackMachineTemplate(a.(*v1beta2.OpenStackMachineTemplate), b.(*OpenStackMachineTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineTemplateList)(nil), (*v1beta2.OpenStackMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineTemplateList_To_v1beta2_OpenStackMachineTemplateList(a.(*OpenStackMachineTemplateList), b.(*v1beta2.OpenStackMachineTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachineTemplateList)(nil), (*OpenStackMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineTemplateList_To_v1beta1_OpenStackMachineTemplateList(a.(*v1beta2.OpenStackMachineTemplateList), b.(*OpenStackMachineTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineTemplateResource)(nil), (*v1beta2.OpenStackMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineTemplateResource_To_v1beta2_OpenStackMachineTemplateResource(a.(*OpenStackMachineTemplateResource), b.(*v1beta2.OpenStackMachineTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachineTemplateResource)(nil), (*OpenStackMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineTemplateResource_To_v1beta1_OpenStackMachineTemplateResource(a.(*v1beta2.OpenStackMachineTemplateResource), b.(*OpenStackMachineTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineTemplateSpec)(nil), (*v1beta2.OpenStackMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineTemplateSpec_To_v1beta2_OpenStackMachineTemplateSpec(a.(*OpenStackMachineTemplateSpec), b.(*v1beta2.OpenStackMachineTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachineTemplateSpec)(nil), (*OpenStackMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineTemplateSpec_To_v1beta1_OpenStackMachineTemplateSpec(a.(*v1beta2.OpenStackMachineTemplateSpec), b.(*OpenStackMachineTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineTemplateStatus)(nil), (*v1beta2.OpenStackMachineTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineTemplateStatus_To_v1beta2_OpenStackMachineTemplateStatus(a.(*OpenStackMachineTemplateStatus), b.(*v1beta2.OpenStackMachineTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.OpenStackMachineTemplateStatus)(nil), (*OpenStackMachineTemplateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineTemplateStatus_To_v1beta1_OpenStackMachineTemplateStatus(a.(*v1beta2.OpenStackMachineTemplateStatus), b.(*OpenStackMachineTemplateStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PortOpts)(nil), (*v1beta2.PortOpts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PortOpts_To_v1beta2_PortOpts(a.(*PortOpts), b.(*v1beta2.PortOpts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.PortOpts)(nil), (*PortOpts)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_PortOpts_To_v1beta1_PortOpts(a.(*v1beta2.PortOpts), b.(*PortOpts), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PortStatus)(nil), (*v1beta2.PortStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PortStatus_To_v1beta2_PortStatus(a.(*PortStatus), b.(*v1beta2.PortStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.PortStatus)(nil), (*PortStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_PortStatus_To_v1beta1_PortStatus(a.(*v1beta2.PortStatus), b.(*PortStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResolvedFixedIP)(nil), (*v1beta2.ResolvedFixedIP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResolvedFixedIP_To_v1beta2_ResolvedFixedIP(a.(*ResolvedFixedIP), b.(*v1beta2.ResolvedFixedIP), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ResolvedFixedIP)(nil), (*ResolvedFixedIP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ResolvedFixedIP_To_v1beta1_ResolvedFixedIP(a.(*v1beta2.ResolvedFixedIP), b.(*ResolvedFixedIP), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResolvedMachineSpec)(nil), (*v1beta2.ResolvedMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResolvedMachineSpec_To_v1beta2_ResolvedMachineSpec(a.(*ResolvedMachineSpec), b.(*v1beta2.ResolvedMachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ResolvedMachineSpec)(nil), (*ResolvedMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ResolvedMachineSpec_To_v1beta1_ResolvedMachineSpec(a.(*v1beta2.ResolvedMachineSpec), b.(*ResolvedMachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResolvedPortSpec)(nil), (*v1beta2.ResolvedPortSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResolvedPortSpec_To_v1beta2_ResolvedPortSpec(a.(*ResolvedPortSpec), b.(*v1beta2.ResolvedPortSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ResolvedPortSpec)(nil), (*ResolvedPortSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ResolvedPortSpec_To_v1beta1_ResolvedPortSpec(a.(*v1beta2.ResolvedPortSpec), b.(*ResolvedPortSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResolvedPortSpecFields)(nil), (*v1beta2.ResolvedPortSpecFields)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResolvedPortSpecFields_To_v1beta2_ResolvedPortSpecFields(a.(*ResolvedPortSpecFields), b.(*v1beta2.ResolvedPortSpecFields), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ResolvedPortSpecFields)(nil), (*ResolvedPortSpecFields)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ResolvedPortSpecFields_To_v1beta1_ResolvedPortSpecFields(a.(*v1beta2.ResolvedPortSpecFields), b.(*ResolvedPortSpecFields), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResourceReference)(nil), (*v1beta2.ResourceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResourceReference_To_v1beta2_ResourceReference(a.(*ResourceReference), b.(*v1beta2.ResourceReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ResourceReference)(nil), (*ResourceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ResourceReference_To_v1beta1_ResourceReference(a.(*v1beta2.ResourceReference), b.(*ResourceReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RootVolume)(nil), (*v1beta2.RootVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RootVolume_To_v1beta2_RootVolume(a.(*RootVolume), b.(*v1beta2.RootVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.RootVolume)(nil), (*RootVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_RootVolume_To_v1beta1_RootVolume(a.(*v1beta2.RootVolume), b.(*RootVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Router)(nil), (*v1beta2.Router)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Router_To_v1beta2_Router(a.(*Router), b.(*v1beta2.Router), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.Router)(nil), (*Router)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_Router_To_v1beta1_Router(a.(*v1beta2.Router), b.(*Router), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RouterFilter)(nil), (*v1beta2.RouterFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RouterFilter_To_v1beta2_RouterFilter(a.(*RouterFilter), b.(*v1beta2.RouterFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.RouterFilter)(nil), (*RouterFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_RouterFilter_To_v1beta1_RouterFilter(a.(*v1beta2.RouterFilter), b.(*RouterFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RouterParam)(nil), (*v1beta2.RouterParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RouterParam_To_v1beta2_RouterParam(a.(*RouterParam), b.(*v1beta2.RouterParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.RouterParam)(nil), (*RouterParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_RouterParam_To_v1beta1_RouterParam(a.(*v1beta2.RouterParam), b.(*RouterParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SchedulerHintAdditionalProperty)(nil), (*v1beta2.SchedulerHintAdditionalProperty)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SchedulerHintAdditionalProperty_To_v1beta2_SchedulerHintAdditionalProperty(a.(*SchedulerHintAdditionalProperty), b.(*v1beta2.SchedulerHintAdditionalProperty), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SchedulerHintAdditionalProperty)(nil), (*SchedulerHintAdditionalProperty)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SchedulerHintAdditionalProperty_To_v1beta1_SchedulerHintAdditionalProperty(a.(*v1beta2.SchedulerHintAdditionalProperty), b.(*SchedulerHintAdditionalProperty), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SchedulerHintAdditionalValue)(nil), (*v1beta2.SchedulerHintAdditionalValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SchedulerHintAdditionalValue_To_v1beta2_SchedulerHintAdditionalValue(a.(*SchedulerHintAdditionalValue), b.(*v1beta2.SchedulerHintAdditionalValue), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SchedulerHintAdditionalValue)(nil), (*SchedulerHintAdditionalValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SchedulerHintAdditionalValue_To_v1beta1_SchedulerHintAdditionalValue(a.(*v1beta2.SchedulerHintAdditionalValue), b.(*SchedulerHintAdditionalValue), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecurityGroupFilter)(nil), (*v1beta2.SecurityGroupFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecurityGroupFilter_To_v1beta2_SecurityGroupFilter(a.(*SecurityGroupFilter), b.(*v1beta2.SecurityGroupFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SecurityGroupFilter)(nil), (*SecurityGroupFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SecurityGroupFilter_To_v1beta1_SecurityGroupFilter(a.(*v1beta2.SecurityGroupFilter), b.(*SecurityGroupFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecurityGroupParam)(nil), (*v1beta2.SecurityGroupParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecurityGroupParam_To_v1beta2_SecurityGroupParam(a.(*SecurityGroupParam), b.(*v1beta2.SecurityGroupParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SecurityGroupParam)(nil), (*SecurityGroupParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SecurityGroupParam_To_v1beta1_SecurityGroupParam(a.(*v1beta2.SecurityGroupParam), b.(*SecurityGroupParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecurityGroupRuleSpec)(nil), (*v1beta2.SecurityGroupRuleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecurityGroupRuleSpec_To_v1beta2_SecurityGroupRuleSpec(a.(*SecurityGroupRuleSpec), b.(*v1beta2.SecurityGroupRuleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SecurityGroupRuleSpec)(nil), (*SecurityGroupRuleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SecurityGroupRuleSpec_To_v1beta1_SecurityGroupRuleSpec(a.(*v1beta2.SecurityGroupRuleSpec), b.(*SecurityGroupRuleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecurityGroupStatus)(nil), (*v1beta2.SecurityGroupStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecurityGroupStatus_To_v1beta2_SecurityGroupStatus(a.(*SecurityGroupStatus), b.(*v1beta2.SecurityGroupStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SecurityGroupStatus)(nil), (*SecurityGroupStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SecurityGroupStatus_To_v1beta1_SecurityGroupStatus(a.(*v1beta2.SecurityGroupStatus), b.(*SecurityGroupStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ServerGroupFilter)(nil), (*v1beta2.ServerGroupFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServerGroupFilter_To_v1beta2_ServerGroupFilter(a.(*ServerGroupFilter), b.(*v1beta2.ServerGroupFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ServerGroupFilter)(nil), (*ServerGroupFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ServerGroupFilter_To_v1beta1_ServerGroupFilter(a.(*v1beta2.ServerGroupFilter), b.(*ServerGroupFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ServerGroupParam)(nil), (*v1beta2.ServerGroupParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServerGroupParam_To_v1beta2_ServerGroupParam(a.(*ServerGroupParam), b.(*v1beta2.ServerGroupParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ServerGroupParam)(nil), (*ServerGroupParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ServerGroupParam_To_v1beta1_ServerGroupParam(a.(*v1beta2.ServerGroupParam), b.(*ServerGroupParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ServerMetadata)(nil), (*v1beta2.ServerMetadata)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServerMetadata_To_v1beta2_ServerMetadata(a.(*ServerMetadata), b.(*v1beta2.ServerMetadata), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ServerMetadata)(nil), (*ServerMetadata)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ServerMetadata_To_v1beta1_ServerMetadata(a.(*v1beta2.ServerMetadata), b.(*ServerMetadata), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Subnet)(nil), (*v1beta2.Subnet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Subnet_To_v1beta2_Subnet(a.(*Subnet), b.(*v1beta2.Subnet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.Subnet)(nil), (*Subnet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_Subnet_To_v1beta1_Subnet(a.(*v1beta2.Subnet), b.(*Subnet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SubnetFilter)(nil), (*v1beta2.SubnetFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SubnetFilter_To_v1beta2_SubnetFilter(a.(*SubnetFilter), b.(*v1beta2.SubnetFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SubnetFilter)(nil), (*SubnetFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SubnetFilter_To_v1beta1_SubnetFilter(a.(*v1beta2.SubnetFilter), b.(*SubnetFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SubnetParam)(nil), (*v1beta2.SubnetParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SubnetParam_To_v1beta2_SubnetParam(a.(*SubnetParam), b.(*v1beta2.SubnetParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SubnetParam)(nil), (*SubnetParam)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SubnetParam_To_v1beta1_SubnetParam(a.(*v1beta2.SubnetParam), b.(*SubnetParam), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SubnetSpec)(nil), (*v1beta2.SubnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SubnetSpec_To_v1beta2_SubnetSpec(a.(*SubnetSpec), b.(*v1beta2.SubnetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.SubnetSpec)(nil), (*SubnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SubnetSpec_To_v1beta1_SubnetSpec(a.(*v1beta2.SubnetSpec), b.(*SubnetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ValueSpec)(nil), (*v1beta2.ValueSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ValueSpec_To_v1beta2_ValueSpec(a.(*ValueSpec), b.(*v1beta2.ValueSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ValueSpec)(nil), (*ValueSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ValueSpec_To_v1beta1_ValueSpec(a.(*v1beta2.ValueSpec), b.(*ValueSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VolumeAvailabilityZone)(nil), (*v1beta2.VolumeAvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VolumeAvailabilityZone_To_v1beta2_VolumeAvailabilityZone(a.(*VolumeAvailabilityZone), b.(*v1beta2.VolumeAvailabilityZone), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.VolumeAvailabilityZone)(nil), (*VolumeAvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_VolumeAvailabilityZone_To_v1beta1_VolumeAvailabilityZone(a.(*v1beta2.VolumeAvailabilityZone), b.(*VolumeAvailabilityZone), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1.Condition)(nil), (*corev1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*corev1beta1.Condition), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*corev1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_v1_Condition(a.(*corev1beta1.Condition), b.(*v1.Condition), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*OpenStackClusterStatus)(nil), (*v1beta2.OpenStackClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackClusterStatus_To_v1beta2_OpenStackClusterStatus(a.(*OpenStackClusterStatus), b.(*v1beta2.OpenStackClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*OpenStackMachineStatus)(nil), (*v1beta2.OpenStackMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineStatus_To_v1beta2_OpenStackMachineStatus(a.(*OpenStackMachineStatus), b.(*v1beta2.OpenStackMachineStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta2.OpenStackClusterStatus)(nil), (*OpenStackClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackClusterStatus_To_v1beta1_OpenStackClusterStatus(a.(*v1beta2.OpenStackClusterStatus), b.(*OpenStackClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta2.OpenStackMachineStatus)(nil), (*OpenStackMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_OpenStackMachineStatus_To_v1beta1_OpenStackMachineStatus(a.(*v1beta2.OpenStackMachineStatus), b.(*OpenStackMachineStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_APIServerLoadBalancer_To_v1beta2_APIServerLoadBalancer(in *APIServerLoadBalancer, out *v1beta2.APIServerLoadBalancer, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.AdditionalPorts = *(*[]int)(unsafe.Pointer(&in.AdditionalPorts)) + out.AllowedCIDRs = *(*[]string)(unsafe.Pointer(&in.AllowedCIDRs)) + out.Provider = (optional.String)(unsafe.Pointer(in.Provider)) + out.Network = (*v1beta2.NetworkParam)(unsafe.Pointer(in.Network)) + out.Subnets = *(*[]v1beta2.SubnetParam)(unsafe.Pointer(&in.Subnets)) + out.AvailabilityZone = (optional.String)(unsafe.Pointer(in.AvailabilityZone)) + out.Flavor = (optional.String)(unsafe.Pointer(in.Flavor)) + out.Monitor = (*v1beta2.APIServerLoadBalancerMonitor)(unsafe.Pointer(in.Monitor)) + return nil +} + +// Convert_v1beta1_APIServerLoadBalancer_To_v1beta2_APIServerLoadBalancer is an autogenerated conversion function. +func Convert_v1beta1_APIServerLoadBalancer_To_v1beta2_APIServerLoadBalancer(in *APIServerLoadBalancer, out *v1beta2.APIServerLoadBalancer, s conversion.Scope) error { + return autoConvert_v1beta1_APIServerLoadBalancer_To_v1beta2_APIServerLoadBalancer(in, out, s) +} + +func autoConvert_v1beta2_APIServerLoadBalancer_To_v1beta1_APIServerLoadBalancer(in *v1beta2.APIServerLoadBalancer, out *APIServerLoadBalancer, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.AdditionalPorts = *(*[]int)(unsafe.Pointer(&in.AdditionalPorts)) + out.AllowedCIDRs = *(*[]string)(unsafe.Pointer(&in.AllowedCIDRs)) + out.Provider = (optional.String)(unsafe.Pointer(in.Provider)) + out.Network = (*NetworkParam)(unsafe.Pointer(in.Network)) + out.Subnets = *(*[]SubnetParam)(unsafe.Pointer(&in.Subnets)) + out.AvailabilityZone = (optional.String)(unsafe.Pointer(in.AvailabilityZone)) + out.Flavor = (optional.String)(unsafe.Pointer(in.Flavor)) + out.Monitor = (*APIServerLoadBalancerMonitor)(unsafe.Pointer(in.Monitor)) + return nil +} + +// Convert_v1beta2_APIServerLoadBalancer_To_v1beta1_APIServerLoadBalancer is an autogenerated conversion function. +func Convert_v1beta2_APIServerLoadBalancer_To_v1beta1_APIServerLoadBalancer(in *v1beta2.APIServerLoadBalancer, out *APIServerLoadBalancer, s conversion.Scope) error { + return autoConvert_v1beta2_APIServerLoadBalancer_To_v1beta1_APIServerLoadBalancer(in, out, s) +} + +func autoConvert_v1beta1_APIServerLoadBalancerMonitor_To_v1beta2_APIServerLoadBalancerMonitor(in *APIServerLoadBalancerMonitor, out *v1beta2.APIServerLoadBalancerMonitor, s conversion.Scope) error { + out.Delay = in.Delay + out.Timeout = in.Timeout + out.MaxRetries = in.MaxRetries + out.MaxRetriesDown = in.MaxRetriesDown + return nil +} + +// Convert_v1beta1_APIServerLoadBalancerMonitor_To_v1beta2_APIServerLoadBalancerMonitor is an autogenerated conversion function. +func Convert_v1beta1_APIServerLoadBalancerMonitor_To_v1beta2_APIServerLoadBalancerMonitor(in *APIServerLoadBalancerMonitor, out *v1beta2.APIServerLoadBalancerMonitor, s conversion.Scope) error { + return autoConvert_v1beta1_APIServerLoadBalancerMonitor_To_v1beta2_APIServerLoadBalancerMonitor(in, out, s) +} + +func autoConvert_v1beta2_APIServerLoadBalancerMonitor_To_v1beta1_APIServerLoadBalancerMonitor(in *v1beta2.APIServerLoadBalancerMonitor, out *APIServerLoadBalancerMonitor, s conversion.Scope) error { + out.Delay = in.Delay + out.Timeout = in.Timeout + out.MaxRetries = in.MaxRetries + out.MaxRetriesDown = in.MaxRetriesDown + return nil +} + +// Convert_v1beta2_APIServerLoadBalancerMonitor_To_v1beta1_APIServerLoadBalancerMonitor is an autogenerated conversion function. +func Convert_v1beta2_APIServerLoadBalancerMonitor_To_v1beta1_APIServerLoadBalancerMonitor(in *v1beta2.APIServerLoadBalancerMonitor, out *APIServerLoadBalancerMonitor, s conversion.Scope) error { + return autoConvert_v1beta2_APIServerLoadBalancerMonitor_To_v1beta1_APIServerLoadBalancerMonitor(in, out, s) +} + +func autoConvert_v1beta1_AdditionalBlockDevice_To_v1beta2_AdditionalBlockDevice(in *AdditionalBlockDevice, out *v1beta2.AdditionalBlockDevice, s conversion.Scope) error { + out.Name = in.Name + out.SizeGiB = in.SizeGiB + if err := Convert_v1beta1_BlockDeviceStorage_To_v1beta2_BlockDeviceStorage(&in.Storage, &out.Storage, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_AdditionalBlockDevice_To_v1beta2_AdditionalBlockDevice is an autogenerated conversion function. +func Convert_v1beta1_AdditionalBlockDevice_To_v1beta2_AdditionalBlockDevice(in *AdditionalBlockDevice, out *v1beta2.AdditionalBlockDevice, s conversion.Scope) error { + return autoConvert_v1beta1_AdditionalBlockDevice_To_v1beta2_AdditionalBlockDevice(in, out, s) +} + +func autoConvert_v1beta2_AdditionalBlockDevice_To_v1beta1_AdditionalBlockDevice(in *v1beta2.AdditionalBlockDevice, out *AdditionalBlockDevice, s conversion.Scope) error { + out.Name = in.Name + out.SizeGiB = in.SizeGiB + if err := Convert_v1beta2_BlockDeviceStorage_To_v1beta1_BlockDeviceStorage(&in.Storage, &out.Storage, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_AdditionalBlockDevice_To_v1beta1_AdditionalBlockDevice is an autogenerated conversion function. +func Convert_v1beta2_AdditionalBlockDevice_To_v1beta1_AdditionalBlockDevice(in *v1beta2.AdditionalBlockDevice, out *AdditionalBlockDevice, s conversion.Scope) error { + return autoConvert_v1beta2_AdditionalBlockDevice_To_v1beta1_AdditionalBlockDevice(in, out, s) +} + +func autoConvert_v1beta1_AddressPair_To_v1beta2_AddressPair(in *AddressPair, out *v1beta2.AddressPair, s conversion.Scope) error { + out.IPAddress = in.IPAddress + out.MACAddress = (optional.String)(unsafe.Pointer(in.MACAddress)) + return nil +} + +// Convert_v1beta1_AddressPair_To_v1beta2_AddressPair is an autogenerated conversion function. +func Convert_v1beta1_AddressPair_To_v1beta2_AddressPair(in *AddressPair, out *v1beta2.AddressPair, s conversion.Scope) error { + return autoConvert_v1beta1_AddressPair_To_v1beta2_AddressPair(in, out, s) +} + +func autoConvert_v1beta2_AddressPair_To_v1beta1_AddressPair(in *v1beta2.AddressPair, out *AddressPair, s conversion.Scope) error { + out.IPAddress = in.IPAddress + out.MACAddress = (optional.String)(unsafe.Pointer(in.MACAddress)) + return nil +} + +// Convert_v1beta2_AddressPair_To_v1beta1_AddressPair is an autogenerated conversion function. +func Convert_v1beta2_AddressPair_To_v1beta1_AddressPair(in *v1beta2.AddressPair, out *AddressPair, s conversion.Scope) error { + return autoConvert_v1beta2_AddressPair_To_v1beta1_AddressPair(in, out, s) +} + +func autoConvert_v1beta1_AllocationPool_To_v1beta2_AllocationPool(in *AllocationPool, out *v1beta2.AllocationPool, s conversion.Scope) error { + out.Start = in.Start + out.End = in.End + return nil +} + +// Convert_v1beta1_AllocationPool_To_v1beta2_AllocationPool is an autogenerated conversion function. +func Convert_v1beta1_AllocationPool_To_v1beta2_AllocationPool(in *AllocationPool, out *v1beta2.AllocationPool, s conversion.Scope) error { + return autoConvert_v1beta1_AllocationPool_To_v1beta2_AllocationPool(in, out, s) +} + +func autoConvert_v1beta2_AllocationPool_To_v1beta1_AllocationPool(in *v1beta2.AllocationPool, out *AllocationPool, s conversion.Scope) error { + out.Start = in.Start + out.End = in.End + return nil +} + +// Convert_v1beta2_AllocationPool_To_v1beta1_AllocationPool is an autogenerated conversion function. +func Convert_v1beta2_AllocationPool_To_v1beta1_AllocationPool(in *v1beta2.AllocationPool, out *AllocationPool, s conversion.Scope) error { + return autoConvert_v1beta2_AllocationPool_To_v1beta1_AllocationPool(in, out, s) +} + +func autoConvert_v1beta1_Bastion_To_v1beta2_Bastion(in *Bastion, out *v1beta2.Bastion, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Spec = (*v1beta2.OpenStackMachineSpec)(unsafe.Pointer(in.Spec)) + out.AvailabilityZone = (optional.String)(unsafe.Pointer(in.AvailabilityZone)) + out.FloatingIP = (optional.String)(unsafe.Pointer(in.FloatingIP)) + return nil +} + +// Convert_v1beta1_Bastion_To_v1beta2_Bastion is an autogenerated conversion function. +func Convert_v1beta1_Bastion_To_v1beta2_Bastion(in *Bastion, out *v1beta2.Bastion, s conversion.Scope) error { + return autoConvert_v1beta1_Bastion_To_v1beta2_Bastion(in, out, s) +} + +func autoConvert_v1beta2_Bastion_To_v1beta1_Bastion(in *v1beta2.Bastion, out *Bastion, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Spec = (*OpenStackMachineSpec)(unsafe.Pointer(in.Spec)) + out.AvailabilityZone = (optional.String)(unsafe.Pointer(in.AvailabilityZone)) + out.FloatingIP = (optional.String)(unsafe.Pointer(in.FloatingIP)) + return nil +} + +// Convert_v1beta2_Bastion_To_v1beta1_Bastion is an autogenerated conversion function. +func Convert_v1beta2_Bastion_To_v1beta1_Bastion(in *v1beta2.Bastion, out *Bastion, s conversion.Scope) error { + return autoConvert_v1beta2_Bastion_To_v1beta1_Bastion(in, out, s) +} + +func autoConvert_v1beta1_BastionStatus_To_v1beta2_BastionStatus(in *BastionStatus, out *v1beta2.BastionStatus, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.SSHKeyName = in.SSHKeyName + out.State = v1beta2.InstanceState(in.State) + out.IP = in.IP + out.FloatingIP = in.FloatingIP + out.Resolved = (*v1beta2.ResolvedMachineSpec)(unsafe.Pointer(in.Resolved)) + out.Resources = (*v1beta2.MachineResources)(unsafe.Pointer(in.Resources)) + return nil +} + +// Convert_v1beta1_BastionStatus_To_v1beta2_BastionStatus is an autogenerated conversion function. +func Convert_v1beta1_BastionStatus_To_v1beta2_BastionStatus(in *BastionStatus, out *v1beta2.BastionStatus, s conversion.Scope) error { + return autoConvert_v1beta1_BastionStatus_To_v1beta2_BastionStatus(in, out, s) +} + +func autoConvert_v1beta2_BastionStatus_To_v1beta1_BastionStatus(in *v1beta2.BastionStatus, out *BastionStatus, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.SSHKeyName = in.SSHKeyName + out.State = InstanceState(in.State) + out.IP = in.IP + out.FloatingIP = in.FloatingIP + out.Resolved = (*ResolvedMachineSpec)(unsafe.Pointer(in.Resolved)) + out.Resources = (*MachineResources)(unsafe.Pointer(in.Resources)) + return nil +} + +// Convert_v1beta2_BastionStatus_To_v1beta1_BastionStatus is an autogenerated conversion function. +func Convert_v1beta2_BastionStatus_To_v1beta1_BastionStatus(in *v1beta2.BastionStatus, out *BastionStatus, s conversion.Scope) error { + return autoConvert_v1beta2_BastionStatus_To_v1beta1_BastionStatus(in, out, s) +} + +func autoConvert_v1beta1_BindingProfile_To_v1beta2_BindingProfile(in *BindingProfile, out *v1beta2.BindingProfile, s conversion.Scope) error { + out.OVSHWOffload = (*bool)(unsafe.Pointer(in.OVSHWOffload)) + out.TrustedVF = (*bool)(unsafe.Pointer(in.TrustedVF)) + return nil +} + +// Convert_v1beta1_BindingProfile_To_v1beta2_BindingProfile is an autogenerated conversion function. +func Convert_v1beta1_BindingProfile_To_v1beta2_BindingProfile(in *BindingProfile, out *v1beta2.BindingProfile, s conversion.Scope) error { + return autoConvert_v1beta1_BindingProfile_To_v1beta2_BindingProfile(in, out, s) +} + +func autoConvert_v1beta2_BindingProfile_To_v1beta1_BindingProfile(in *v1beta2.BindingProfile, out *BindingProfile, s conversion.Scope) error { + out.OVSHWOffload = (*bool)(unsafe.Pointer(in.OVSHWOffload)) + out.TrustedVF = (*bool)(unsafe.Pointer(in.TrustedVF)) + return nil +} + +// Convert_v1beta2_BindingProfile_To_v1beta1_BindingProfile is an autogenerated conversion function. +func Convert_v1beta2_BindingProfile_To_v1beta1_BindingProfile(in *v1beta2.BindingProfile, out *BindingProfile, s conversion.Scope) error { + return autoConvert_v1beta2_BindingProfile_To_v1beta1_BindingProfile(in, out, s) +} + +func autoConvert_v1beta1_BlockDeviceStorage_To_v1beta2_BlockDeviceStorage(in *BlockDeviceStorage, out *v1beta2.BlockDeviceStorage, s conversion.Scope) error { + out.Type = v1beta2.BlockDeviceType(in.Type) + out.Volume = (*v1beta2.BlockDeviceVolume)(unsafe.Pointer(in.Volume)) + return nil +} + +// Convert_v1beta1_BlockDeviceStorage_To_v1beta2_BlockDeviceStorage is an autogenerated conversion function. +func Convert_v1beta1_BlockDeviceStorage_To_v1beta2_BlockDeviceStorage(in *BlockDeviceStorage, out *v1beta2.BlockDeviceStorage, s conversion.Scope) error { + return autoConvert_v1beta1_BlockDeviceStorage_To_v1beta2_BlockDeviceStorage(in, out, s) +} + +func autoConvert_v1beta2_BlockDeviceStorage_To_v1beta1_BlockDeviceStorage(in *v1beta2.BlockDeviceStorage, out *BlockDeviceStorage, s conversion.Scope) error { + out.Type = BlockDeviceType(in.Type) + out.Volume = (*BlockDeviceVolume)(unsafe.Pointer(in.Volume)) + return nil +} + +// Convert_v1beta2_BlockDeviceStorage_To_v1beta1_BlockDeviceStorage is an autogenerated conversion function. +func Convert_v1beta2_BlockDeviceStorage_To_v1beta1_BlockDeviceStorage(in *v1beta2.BlockDeviceStorage, out *BlockDeviceStorage, s conversion.Scope) error { + return autoConvert_v1beta2_BlockDeviceStorage_To_v1beta1_BlockDeviceStorage(in, out, s) +} + +func autoConvert_v1beta1_BlockDeviceVolume_To_v1beta2_BlockDeviceVolume(in *BlockDeviceVolume, out *v1beta2.BlockDeviceVolume, s conversion.Scope) error { + out.Type = in.Type + out.AvailabilityZone = (*v1beta2.VolumeAvailabilityZone)(unsafe.Pointer(in.AvailabilityZone)) + return nil +} + +// Convert_v1beta1_BlockDeviceVolume_To_v1beta2_BlockDeviceVolume is an autogenerated conversion function. +func Convert_v1beta1_BlockDeviceVolume_To_v1beta2_BlockDeviceVolume(in *BlockDeviceVolume, out *v1beta2.BlockDeviceVolume, s conversion.Scope) error { + return autoConvert_v1beta1_BlockDeviceVolume_To_v1beta2_BlockDeviceVolume(in, out, s) +} + +func autoConvert_v1beta2_BlockDeviceVolume_To_v1beta1_BlockDeviceVolume(in *v1beta2.BlockDeviceVolume, out *BlockDeviceVolume, s conversion.Scope) error { + out.Type = in.Type + out.AvailabilityZone = (*VolumeAvailabilityZone)(unsafe.Pointer(in.AvailabilityZone)) + return nil +} + +// Convert_v1beta2_BlockDeviceVolume_To_v1beta1_BlockDeviceVolume is an autogenerated conversion function. +func Convert_v1beta2_BlockDeviceVolume_To_v1beta1_BlockDeviceVolume(in *v1beta2.BlockDeviceVolume, out *BlockDeviceVolume, s conversion.Scope) error { + return autoConvert_v1beta2_BlockDeviceVolume_To_v1beta1_BlockDeviceVolume(in, out, s) +} + +func autoConvert_v1beta1_ClusterInitialization_To_v1beta2_ClusterInitialization(in *ClusterInitialization, out *v1beta2.ClusterInitialization, s conversion.Scope) error { + out.Provisioned = in.Provisioned + return nil +} + +// Convert_v1beta1_ClusterInitialization_To_v1beta2_ClusterInitialization is an autogenerated conversion function. +func Convert_v1beta1_ClusterInitialization_To_v1beta2_ClusterInitialization(in *ClusterInitialization, out *v1beta2.ClusterInitialization, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterInitialization_To_v1beta2_ClusterInitialization(in, out, s) +} + +func autoConvert_v1beta2_ClusterInitialization_To_v1beta1_ClusterInitialization(in *v1beta2.ClusterInitialization, out *ClusterInitialization, s conversion.Scope) error { + out.Provisioned = in.Provisioned + return nil +} + +// Convert_v1beta2_ClusterInitialization_To_v1beta1_ClusterInitialization is an autogenerated conversion function. +func Convert_v1beta2_ClusterInitialization_To_v1beta1_ClusterInitialization(in *v1beta2.ClusterInitialization, out *ClusterInitialization, s conversion.Scope) error { + return autoConvert_v1beta2_ClusterInitialization_To_v1beta1_ClusterInitialization(in, out, s) +} + +func autoConvert_v1beta1_ExternalRouterIPParam_To_v1beta2_ExternalRouterIPParam(in *ExternalRouterIPParam, out *v1beta2.ExternalRouterIPParam, s conversion.Scope) error { + out.FixedIP = in.FixedIP + if err := Convert_v1beta1_SubnetParam_To_v1beta2_SubnetParam(&in.Subnet, &out.Subnet, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ExternalRouterIPParam_To_v1beta2_ExternalRouterIPParam is an autogenerated conversion function. +func Convert_v1beta1_ExternalRouterIPParam_To_v1beta2_ExternalRouterIPParam(in *ExternalRouterIPParam, out *v1beta2.ExternalRouterIPParam, s conversion.Scope) error { + return autoConvert_v1beta1_ExternalRouterIPParam_To_v1beta2_ExternalRouterIPParam(in, out, s) +} + +func autoConvert_v1beta2_ExternalRouterIPParam_To_v1beta1_ExternalRouterIPParam(in *v1beta2.ExternalRouterIPParam, out *ExternalRouterIPParam, s conversion.Scope) error { + out.FixedIP = in.FixedIP + if err := Convert_v1beta2_SubnetParam_To_v1beta1_SubnetParam(&in.Subnet, &out.Subnet, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_ExternalRouterIPParam_To_v1beta1_ExternalRouterIPParam is an autogenerated conversion function. +func Convert_v1beta2_ExternalRouterIPParam_To_v1beta1_ExternalRouterIPParam(in *v1beta2.ExternalRouterIPParam, out *ExternalRouterIPParam, s conversion.Scope) error { + return autoConvert_v1beta2_ExternalRouterIPParam_To_v1beta1_ExternalRouterIPParam(in, out, s) +} + +func autoConvert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(in *FilterByNeutronTags, out *v1beta2.FilterByNeutronTags, s conversion.Scope) error { + out.Tags = *(*[]v1beta2.NeutronTag)(unsafe.Pointer(&in.Tags)) + out.TagsAny = *(*[]v1beta2.NeutronTag)(unsafe.Pointer(&in.TagsAny)) + out.NotTags = *(*[]v1beta2.NeutronTag)(unsafe.Pointer(&in.NotTags)) + out.NotTagsAny = *(*[]v1beta2.NeutronTag)(unsafe.Pointer(&in.NotTagsAny)) + return nil +} + +// Convert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags is an autogenerated conversion function. +func Convert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(in *FilterByNeutronTags, out *v1beta2.FilterByNeutronTags, s conversion.Scope) error { + return autoConvert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(in, out, s) +} + +func autoConvert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(in *v1beta2.FilterByNeutronTags, out *FilterByNeutronTags, s conversion.Scope) error { + out.Tags = *(*[]NeutronTag)(unsafe.Pointer(&in.Tags)) + out.TagsAny = *(*[]NeutronTag)(unsafe.Pointer(&in.TagsAny)) + out.NotTags = *(*[]NeutronTag)(unsafe.Pointer(&in.NotTags)) + out.NotTagsAny = *(*[]NeutronTag)(unsafe.Pointer(&in.NotTagsAny)) + return nil +} + +// Convert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags is an autogenerated conversion function. +func Convert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(in *v1beta2.FilterByNeutronTags, out *FilterByNeutronTags, s conversion.Scope) error { + return autoConvert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(in, out, s) +} + +func autoConvert_v1beta1_FixedIP_To_v1beta2_FixedIP(in *FixedIP, out *v1beta2.FixedIP, s conversion.Scope) error { + out.Subnet = (*v1beta2.SubnetParam)(unsafe.Pointer(in.Subnet)) + out.IPAddress = (optional.String)(unsafe.Pointer(in.IPAddress)) + return nil +} + +// Convert_v1beta1_FixedIP_To_v1beta2_FixedIP is an autogenerated conversion function. +func Convert_v1beta1_FixedIP_To_v1beta2_FixedIP(in *FixedIP, out *v1beta2.FixedIP, s conversion.Scope) error { + return autoConvert_v1beta1_FixedIP_To_v1beta2_FixedIP(in, out, s) +} + +func autoConvert_v1beta2_FixedIP_To_v1beta1_FixedIP(in *v1beta2.FixedIP, out *FixedIP, s conversion.Scope) error { + out.Subnet = (*SubnetParam)(unsafe.Pointer(in.Subnet)) + out.IPAddress = (optional.String)(unsafe.Pointer(in.IPAddress)) + return nil +} + +// Convert_v1beta2_FixedIP_To_v1beta1_FixedIP is an autogenerated conversion function. +func Convert_v1beta2_FixedIP_To_v1beta1_FixedIP(in *v1beta2.FixedIP, out *FixedIP, s conversion.Scope) error { + return autoConvert_v1beta2_FixedIP_To_v1beta1_FixedIP(in, out, s) +} + +func autoConvert_v1beta1_ImageFilter_To_v1beta2_ImageFilter(in *ImageFilter, out *v1beta2.ImageFilter, s conversion.Scope) error { + out.Name = (optional.String)(unsafe.Pointer(in.Name)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + return nil +} + +// Convert_v1beta1_ImageFilter_To_v1beta2_ImageFilter is an autogenerated conversion function. +func Convert_v1beta1_ImageFilter_To_v1beta2_ImageFilter(in *ImageFilter, out *v1beta2.ImageFilter, s conversion.Scope) error { + return autoConvert_v1beta1_ImageFilter_To_v1beta2_ImageFilter(in, out, s) +} + +func autoConvert_v1beta2_ImageFilter_To_v1beta1_ImageFilter(in *v1beta2.ImageFilter, out *ImageFilter, s conversion.Scope) error { + out.Name = (optional.String)(unsafe.Pointer(in.Name)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + return nil +} + +// Convert_v1beta2_ImageFilter_To_v1beta1_ImageFilter is an autogenerated conversion function. +func Convert_v1beta2_ImageFilter_To_v1beta1_ImageFilter(in *v1beta2.ImageFilter, out *ImageFilter, s conversion.Scope) error { + return autoConvert_v1beta2_ImageFilter_To_v1beta1_ImageFilter(in, out, s) +} + +func autoConvert_v1beta1_ImageParam_To_v1beta2_ImageParam(in *ImageParam, out *v1beta2.ImageParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*v1beta2.ImageFilter)(unsafe.Pointer(in.Filter)) + out.ImageRef = (*v1beta2.ResourceReference)(unsafe.Pointer(in.ImageRef)) + return nil +} + +// Convert_v1beta1_ImageParam_To_v1beta2_ImageParam is an autogenerated conversion function. +func Convert_v1beta1_ImageParam_To_v1beta2_ImageParam(in *ImageParam, out *v1beta2.ImageParam, s conversion.Scope) error { + return autoConvert_v1beta1_ImageParam_To_v1beta2_ImageParam(in, out, s) +} + +func autoConvert_v1beta2_ImageParam_To_v1beta1_ImageParam(in *v1beta2.ImageParam, out *ImageParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*ImageFilter)(unsafe.Pointer(in.Filter)) + out.ImageRef = (*ResourceReference)(unsafe.Pointer(in.ImageRef)) + return nil +} + +// Convert_v1beta2_ImageParam_To_v1beta1_ImageParam is an autogenerated conversion function. +func Convert_v1beta2_ImageParam_To_v1beta1_ImageParam(in *v1beta2.ImageParam, out *ImageParam, s conversion.Scope) error { + return autoConvert_v1beta2_ImageParam_To_v1beta1_ImageParam(in, out, s) +} + +func autoConvert_v1beta1_LoadBalancer_To_v1beta2_LoadBalancer(in *LoadBalancer, out *v1beta2.LoadBalancer, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.IP = in.IP + out.InternalIP = in.InternalIP + out.AllowedCIDRs = *(*[]string)(unsafe.Pointer(&in.AllowedCIDRs)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.LoadBalancerNetwork = (*v1beta2.NetworkStatusWithSubnets)(unsafe.Pointer(in.LoadBalancerNetwork)) + return nil +} + +// Convert_v1beta1_LoadBalancer_To_v1beta2_LoadBalancer is an autogenerated conversion function. +func Convert_v1beta1_LoadBalancer_To_v1beta2_LoadBalancer(in *LoadBalancer, out *v1beta2.LoadBalancer, s conversion.Scope) error { + return autoConvert_v1beta1_LoadBalancer_To_v1beta2_LoadBalancer(in, out, s) +} + +func autoConvert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer(in *v1beta2.LoadBalancer, out *LoadBalancer, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.IP = in.IP + out.InternalIP = in.InternalIP + out.AllowedCIDRs = *(*[]string)(unsafe.Pointer(&in.AllowedCIDRs)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.LoadBalancerNetwork = (*NetworkStatusWithSubnets)(unsafe.Pointer(in.LoadBalancerNetwork)) + return nil +} + +// Convert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer is an autogenerated conversion function. +func Convert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer(in *v1beta2.LoadBalancer, out *LoadBalancer, s conversion.Scope) error { + return autoConvert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer(in, out, s) +} + +func autoConvert_v1beta1_MachineInitialization_To_v1beta2_MachineInitialization(in *MachineInitialization, out *v1beta2.MachineInitialization, s conversion.Scope) error { + out.Provisioned = in.Provisioned + return nil +} + +// Convert_v1beta1_MachineInitialization_To_v1beta2_MachineInitialization is an autogenerated conversion function. +func Convert_v1beta1_MachineInitialization_To_v1beta2_MachineInitialization(in *MachineInitialization, out *v1beta2.MachineInitialization, s conversion.Scope) error { + return autoConvert_v1beta1_MachineInitialization_To_v1beta2_MachineInitialization(in, out, s) +} + +func autoConvert_v1beta2_MachineInitialization_To_v1beta1_MachineInitialization(in *v1beta2.MachineInitialization, out *MachineInitialization, s conversion.Scope) error { + out.Provisioned = in.Provisioned + return nil +} + +// Convert_v1beta2_MachineInitialization_To_v1beta1_MachineInitialization is an autogenerated conversion function. +func Convert_v1beta2_MachineInitialization_To_v1beta1_MachineInitialization(in *v1beta2.MachineInitialization, out *MachineInitialization, s conversion.Scope) error { + return autoConvert_v1beta2_MachineInitialization_To_v1beta1_MachineInitialization(in, out, s) +} + +func autoConvert_v1beta1_MachineResources_To_v1beta2_MachineResources(in *MachineResources, out *v1beta2.MachineResources, s conversion.Scope) error { + out.Ports = *(*[]v1beta2.PortStatus)(unsafe.Pointer(&in.Ports)) + return nil +} + +// Convert_v1beta1_MachineResources_To_v1beta2_MachineResources is an autogenerated conversion function. +func Convert_v1beta1_MachineResources_To_v1beta2_MachineResources(in *MachineResources, out *v1beta2.MachineResources, s conversion.Scope) error { + return autoConvert_v1beta1_MachineResources_To_v1beta2_MachineResources(in, out, s) +} + +func autoConvert_v1beta2_MachineResources_To_v1beta1_MachineResources(in *v1beta2.MachineResources, out *MachineResources, s conversion.Scope) error { + out.Ports = *(*[]PortStatus)(unsafe.Pointer(&in.Ports)) + return nil +} + +// Convert_v1beta2_MachineResources_To_v1beta1_MachineResources is an autogenerated conversion function. +func Convert_v1beta2_MachineResources_To_v1beta1_MachineResources(in *v1beta2.MachineResources, out *MachineResources, s conversion.Scope) error { + return autoConvert_v1beta2_MachineResources_To_v1beta1_MachineResources(in, out, s) +} + +func autoConvert_v1beta1_ManagedSecurityGroups_To_v1beta2_ManagedSecurityGroups(in *ManagedSecurityGroups, out *v1beta2.ManagedSecurityGroups, s conversion.Scope) error { + out.AllNodesSecurityGroupRules = *(*[]v1beta2.SecurityGroupRuleSpec)(unsafe.Pointer(&in.AllNodesSecurityGroupRules)) + out.ControlPlaneNodesSecurityGroupRules = *(*[]v1beta2.SecurityGroupRuleSpec)(unsafe.Pointer(&in.ControlPlaneNodesSecurityGroupRules)) + out.WorkerNodesSecurityGroupRules = *(*[]v1beta2.SecurityGroupRuleSpec)(unsafe.Pointer(&in.WorkerNodesSecurityGroupRules)) + out.AllowAllInClusterTraffic = in.AllowAllInClusterTraffic + return nil +} + +// Convert_v1beta1_ManagedSecurityGroups_To_v1beta2_ManagedSecurityGroups is an autogenerated conversion function. +func Convert_v1beta1_ManagedSecurityGroups_To_v1beta2_ManagedSecurityGroups(in *ManagedSecurityGroups, out *v1beta2.ManagedSecurityGroups, s conversion.Scope) error { + return autoConvert_v1beta1_ManagedSecurityGroups_To_v1beta2_ManagedSecurityGroups(in, out, s) +} + +func autoConvert_v1beta2_ManagedSecurityGroups_To_v1beta1_ManagedSecurityGroups(in *v1beta2.ManagedSecurityGroups, out *ManagedSecurityGroups, s conversion.Scope) error { + out.AllNodesSecurityGroupRules = *(*[]SecurityGroupRuleSpec)(unsafe.Pointer(&in.AllNodesSecurityGroupRules)) + out.ControlPlaneNodesSecurityGroupRules = *(*[]SecurityGroupRuleSpec)(unsafe.Pointer(&in.ControlPlaneNodesSecurityGroupRules)) + out.WorkerNodesSecurityGroupRules = *(*[]SecurityGroupRuleSpec)(unsafe.Pointer(&in.WorkerNodesSecurityGroupRules)) + out.AllowAllInClusterTraffic = in.AllowAllInClusterTraffic + return nil +} + +// Convert_v1beta2_ManagedSecurityGroups_To_v1beta1_ManagedSecurityGroups is an autogenerated conversion function. +func Convert_v1beta2_ManagedSecurityGroups_To_v1beta1_ManagedSecurityGroups(in *v1beta2.ManagedSecurityGroups, out *ManagedSecurityGroups, s conversion.Scope) error { + return autoConvert_v1beta2_ManagedSecurityGroups_To_v1beta1_ManagedSecurityGroups(in, out, s) +} + +func autoConvert_v1beta1_NetworkFilter_To_v1beta2_NetworkFilter(in *NetworkFilter, out *v1beta2.NetworkFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + if err := Convert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_NetworkFilter_To_v1beta2_NetworkFilter is an autogenerated conversion function. +func Convert_v1beta1_NetworkFilter_To_v1beta2_NetworkFilter(in *NetworkFilter, out *v1beta2.NetworkFilter, s conversion.Scope) error { + return autoConvert_v1beta1_NetworkFilter_To_v1beta2_NetworkFilter(in, out, s) +} + +func autoConvert_v1beta2_NetworkFilter_To_v1beta1_NetworkFilter(in *v1beta2.NetworkFilter, out *NetworkFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + if err := Convert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_NetworkFilter_To_v1beta1_NetworkFilter is an autogenerated conversion function. +func Convert_v1beta2_NetworkFilter_To_v1beta1_NetworkFilter(in *v1beta2.NetworkFilter, out *NetworkFilter, s conversion.Scope) error { + return autoConvert_v1beta2_NetworkFilter_To_v1beta1_NetworkFilter(in, out, s) +} + +func autoConvert_v1beta1_NetworkParam_To_v1beta2_NetworkParam(in *NetworkParam, out *v1beta2.NetworkParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*v1beta2.NetworkFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta1_NetworkParam_To_v1beta2_NetworkParam is an autogenerated conversion function. +func Convert_v1beta1_NetworkParam_To_v1beta2_NetworkParam(in *NetworkParam, out *v1beta2.NetworkParam, s conversion.Scope) error { + return autoConvert_v1beta1_NetworkParam_To_v1beta2_NetworkParam(in, out, s) +} + +func autoConvert_v1beta2_NetworkParam_To_v1beta1_NetworkParam(in *v1beta2.NetworkParam, out *NetworkParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*NetworkFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta2_NetworkParam_To_v1beta1_NetworkParam is an autogenerated conversion function. +func Convert_v1beta2_NetworkParam_To_v1beta1_NetworkParam(in *v1beta2.NetworkParam, out *NetworkParam, s conversion.Scope) error { + return autoConvert_v1beta2_NetworkParam_To_v1beta1_NetworkParam(in, out, s) +} + +func autoConvert_v1beta1_NetworkStatus_To_v1beta2_NetworkStatus(in *NetworkStatus, out *v1beta2.NetworkStatus, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + return nil +} + +// Convert_v1beta1_NetworkStatus_To_v1beta2_NetworkStatus is an autogenerated conversion function. +func Convert_v1beta1_NetworkStatus_To_v1beta2_NetworkStatus(in *NetworkStatus, out *v1beta2.NetworkStatus, s conversion.Scope) error { + return autoConvert_v1beta1_NetworkStatus_To_v1beta2_NetworkStatus(in, out, s) +} + +func autoConvert_v1beta2_NetworkStatus_To_v1beta1_NetworkStatus(in *v1beta2.NetworkStatus, out *NetworkStatus, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + return nil +} + +// Convert_v1beta2_NetworkStatus_To_v1beta1_NetworkStatus is an autogenerated conversion function. +func Convert_v1beta2_NetworkStatus_To_v1beta1_NetworkStatus(in *v1beta2.NetworkStatus, out *NetworkStatus, s conversion.Scope) error { + return autoConvert_v1beta2_NetworkStatus_To_v1beta1_NetworkStatus(in, out, s) +} + +func autoConvert_v1beta1_NetworkStatusWithSubnets_To_v1beta2_NetworkStatusWithSubnets(in *NetworkStatusWithSubnets, out *v1beta2.NetworkStatusWithSubnets, s conversion.Scope) error { + if err := Convert_v1beta1_NetworkStatus_To_v1beta2_NetworkStatus(&in.NetworkStatus, &out.NetworkStatus, s); err != nil { + return err + } + out.Subnets = *(*[]v1beta2.Subnet)(unsafe.Pointer(&in.Subnets)) + return nil +} + +// Convert_v1beta1_NetworkStatusWithSubnets_To_v1beta2_NetworkStatusWithSubnets is an autogenerated conversion function. +func Convert_v1beta1_NetworkStatusWithSubnets_To_v1beta2_NetworkStatusWithSubnets(in *NetworkStatusWithSubnets, out *v1beta2.NetworkStatusWithSubnets, s conversion.Scope) error { + return autoConvert_v1beta1_NetworkStatusWithSubnets_To_v1beta2_NetworkStatusWithSubnets(in, out, s) +} + +func autoConvert_v1beta2_NetworkStatusWithSubnets_To_v1beta1_NetworkStatusWithSubnets(in *v1beta2.NetworkStatusWithSubnets, out *NetworkStatusWithSubnets, s conversion.Scope) error { + if err := Convert_v1beta2_NetworkStatus_To_v1beta1_NetworkStatus(&in.NetworkStatus, &out.NetworkStatus, s); err != nil { + return err + } + out.Subnets = *(*[]Subnet)(unsafe.Pointer(&in.Subnets)) + return nil +} + +// Convert_v1beta2_NetworkStatusWithSubnets_To_v1beta1_NetworkStatusWithSubnets is an autogenerated conversion function. +func Convert_v1beta2_NetworkStatusWithSubnets_To_v1beta1_NetworkStatusWithSubnets(in *v1beta2.NetworkStatusWithSubnets, out *NetworkStatusWithSubnets, s conversion.Scope) error { + return autoConvert_v1beta2_NetworkStatusWithSubnets_To_v1beta1_NetworkStatusWithSubnets(in, out, s) +} + +func autoConvert_v1beta1_NodeInfo_To_v1beta2_NodeInfo(in *NodeInfo, out *v1beta2.NodeInfo, s conversion.Scope) error { + out.OperatingSystem = in.OperatingSystem + return nil +} + +// Convert_v1beta1_NodeInfo_To_v1beta2_NodeInfo is an autogenerated conversion function. +func Convert_v1beta1_NodeInfo_To_v1beta2_NodeInfo(in *NodeInfo, out *v1beta2.NodeInfo, s conversion.Scope) error { + return autoConvert_v1beta1_NodeInfo_To_v1beta2_NodeInfo(in, out, s) +} + +func autoConvert_v1beta2_NodeInfo_To_v1beta1_NodeInfo(in *v1beta2.NodeInfo, out *NodeInfo, s conversion.Scope) error { + out.OperatingSystem = in.OperatingSystem + return nil +} + +// Convert_v1beta2_NodeInfo_To_v1beta1_NodeInfo is an autogenerated conversion function. +func Convert_v1beta2_NodeInfo_To_v1beta1_NodeInfo(in *v1beta2.NodeInfo, out *NodeInfo, s conversion.Scope) error { + return autoConvert_v1beta2_NodeInfo_To_v1beta1_NodeInfo(in, out, s) +} + +func autoConvert_v1beta1_OpenStackCluster_To_v1beta2_OpenStackCluster(in *OpenStackCluster, out *v1beta2.OpenStackCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_OpenStackClusterSpec_To_v1beta2_OpenStackClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_OpenStackClusterStatus_To_v1beta2_OpenStackClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackCluster_To_v1beta2_OpenStackCluster is an autogenerated conversion function. +func Convert_v1beta1_OpenStackCluster_To_v1beta2_OpenStackCluster(in *OpenStackCluster, out *v1beta2.OpenStackCluster, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackCluster_To_v1beta2_OpenStackCluster(in, out, s) +} + +func autoConvert_v1beta2_OpenStackCluster_To_v1beta1_OpenStackCluster(in *v1beta2.OpenStackCluster, out *OpenStackCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta2_OpenStackClusterSpec_To_v1beta1_OpenStackClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta2_OpenStackClusterStatus_To_v1beta1_OpenStackClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackCluster_To_v1beta1_OpenStackCluster is an autogenerated conversion function. +func Convert_v1beta2_OpenStackCluster_To_v1beta1_OpenStackCluster(in *v1beta2.OpenStackCluster, out *OpenStackCluster, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackCluster_To_v1beta1_OpenStackCluster(in, out, s) +} + +func autoConvert_v1beta1_OpenStackClusterList_To_v1beta2_OpenStackClusterList(in *OpenStackClusterList, out *v1beta2.OpenStackClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta2.OpenStackCluster, len(*in)) + for i := range *in { + if err := Convert_v1beta1_OpenStackCluster_To_v1beta2_OpenStackCluster(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_OpenStackClusterList_To_v1beta2_OpenStackClusterList is an autogenerated conversion function. +func Convert_v1beta1_OpenStackClusterList_To_v1beta2_OpenStackClusterList(in *OpenStackClusterList, out *v1beta2.OpenStackClusterList, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackClusterList_To_v1beta2_OpenStackClusterList(in, out, s) +} + +func autoConvert_v1beta2_OpenStackClusterList_To_v1beta1_OpenStackClusterList(in *v1beta2.OpenStackClusterList, out *OpenStackClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackCluster, len(*in)) + for i := range *in { + if err := Convert_v1beta2_OpenStackCluster_To_v1beta1_OpenStackCluster(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta2_OpenStackClusterList_To_v1beta1_OpenStackClusterList is an autogenerated conversion function. +func Convert_v1beta2_OpenStackClusterList_To_v1beta1_OpenStackClusterList(in *v1beta2.OpenStackClusterList, out *OpenStackClusterList, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackClusterList_To_v1beta1_OpenStackClusterList(in, out, s) +} + +func autoConvert_v1beta1_OpenStackClusterSpec_To_v1beta2_OpenStackClusterSpec(in *OpenStackClusterSpec, out *v1beta2.OpenStackClusterSpec, s conversion.Scope) error { + out.ManagedSubnets = *(*[]v1beta2.SubnetSpec)(unsafe.Pointer(&in.ManagedSubnets)) + out.Router = (*v1beta2.RouterParam)(unsafe.Pointer(in.Router)) + out.Network = (*v1beta2.NetworkParam)(unsafe.Pointer(in.Network)) + out.Subnets = *(*[]v1beta2.SubnetParam)(unsafe.Pointer(&in.Subnets)) + out.NetworkMTU = (optional.Int)(unsafe.Pointer(in.NetworkMTU)) + out.ExternalRouterIPs = *(*[]v1beta2.ExternalRouterIPParam)(unsafe.Pointer(&in.ExternalRouterIPs)) + out.ExternalNetwork = (*v1beta2.NetworkParam)(unsafe.Pointer(in.ExternalNetwork)) + out.DisableExternalNetwork = (optional.Bool)(unsafe.Pointer(in.DisableExternalNetwork)) + out.APIServerLoadBalancer = (*v1beta2.APIServerLoadBalancer)(unsafe.Pointer(in.APIServerLoadBalancer)) + out.DisableAPIServerFloatingIP = (optional.Bool)(unsafe.Pointer(in.DisableAPIServerFloatingIP)) + out.APIServerFloatingIP = (optional.String)(unsafe.Pointer(in.APIServerFloatingIP)) + out.APIServerFixedIP = (optional.String)(unsafe.Pointer(in.APIServerFixedIP)) + out.APIServerPort = (optional.UInt16)(unsafe.Pointer(in.APIServerPort)) + out.ManagedSecurityGroups = (*v1beta2.ManagedSecurityGroups)(unsafe.Pointer(in.ManagedSecurityGroups)) + out.DisablePortSecurity = (optional.Bool)(unsafe.Pointer(in.DisablePortSecurity)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.ControlPlaneEndpoint = (*corev1beta2.APIEndpoint)(unsafe.Pointer(in.ControlPlaneEndpoint)) + out.ControlPlaneAvailabilityZones = *(*[]string)(unsafe.Pointer(&in.ControlPlaneAvailabilityZones)) + out.ControlPlaneOmitAvailabilityZone = (optional.Bool)(unsafe.Pointer(in.ControlPlaneOmitAvailabilityZone)) + out.Bastion = (*v1beta2.Bastion)(unsafe.Pointer(in.Bastion)) + if err := Convert_v1beta1_OpenStackIdentityReference_To_v1beta2_OpenStackIdentityReference(&in.IdentityRef, &out.IdentityRef, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackClusterSpec_To_v1beta2_OpenStackClusterSpec is an autogenerated conversion function. +func Convert_v1beta1_OpenStackClusterSpec_To_v1beta2_OpenStackClusterSpec(in *OpenStackClusterSpec, out *v1beta2.OpenStackClusterSpec, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackClusterSpec_To_v1beta2_OpenStackClusterSpec(in, out, s) +} + +func autoConvert_v1beta2_OpenStackClusterSpec_To_v1beta1_OpenStackClusterSpec(in *v1beta2.OpenStackClusterSpec, out *OpenStackClusterSpec, s conversion.Scope) error { + out.ManagedSubnets = *(*[]SubnetSpec)(unsafe.Pointer(&in.ManagedSubnets)) + out.Router = (*RouterParam)(unsafe.Pointer(in.Router)) + out.Network = (*NetworkParam)(unsafe.Pointer(in.Network)) + out.Subnets = *(*[]SubnetParam)(unsafe.Pointer(&in.Subnets)) + out.NetworkMTU = (optional.Int)(unsafe.Pointer(in.NetworkMTU)) + out.ExternalRouterIPs = *(*[]ExternalRouterIPParam)(unsafe.Pointer(&in.ExternalRouterIPs)) + out.ExternalNetwork = (*NetworkParam)(unsafe.Pointer(in.ExternalNetwork)) + out.DisableExternalNetwork = (optional.Bool)(unsafe.Pointer(in.DisableExternalNetwork)) + out.APIServerLoadBalancer = (*APIServerLoadBalancer)(unsafe.Pointer(in.APIServerLoadBalancer)) + out.DisableAPIServerFloatingIP = (optional.Bool)(unsafe.Pointer(in.DisableAPIServerFloatingIP)) + out.APIServerFloatingIP = (optional.String)(unsafe.Pointer(in.APIServerFloatingIP)) + out.APIServerFixedIP = (optional.String)(unsafe.Pointer(in.APIServerFixedIP)) + out.APIServerPort = (optional.UInt16)(unsafe.Pointer(in.APIServerPort)) + out.ManagedSecurityGroups = (*ManagedSecurityGroups)(unsafe.Pointer(in.ManagedSecurityGroups)) + out.DisablePortSecurity = (optional.Bool)(unsafe.Pointer(in.DisablePortSecurity)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.ControlPlaneEndpoint = (*corev1beta1.APIEndpoint)(unsafe.Pointer(in.ControlPlaneEndpoint)) + out.ControlPlaneAvailabilityZones = *(*[]string)(unsafe.Pointer(&in.ControlPlaneAvailabilityZones)) + out.ControlPlaneOmitAvailabilityZone = (optional.Bool)(unsafe.Pointer(in.ControlPlaneOmitAvailabilityZone)) + out.Bastion = (*Bastion)(unsafe.Pointer(in.Bastion)) + if err := Convert_v1beta2_OpenStackIdentityReference_To_v1beta1_OpenStackIdentityReference(&in.IdentityRef, &out.IdentityRef, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackClusterSpec_To_v1beta1_OpenStackClusterSpec is an autogenerated conversion function. +func Convert_v1beta2_OpenStackClusterSpec_To_v1beta1_OpenStackClusterSpec(in *v1beta2.OpenStackClusterSpec, out *OpenStackClusterSpec, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackClusterSpec_To_v1beta1_OpenStackClusterSpec(in, out, s) +} + +func autoConvert_v1beta1_OpenStackClusterStatus_To_v1beta2_OpenStackClusterStatus(in *OpenStackClusterStatus, out *v1beta2.OpenStackClusterStatus, s conversion.Scope) error { + // WARNING: in.Ready requires manual conversion: does not exist in peer-type + out.Initialization = (*v1beta2.ClusterInitialization)(unsafe.Pointer(in.Initialization)) + out.Network = (*v1beta2.NetworkStatusWithSubnets)(unsafe.Pointer(in.Network)) + out.ExternalNetwork = (*v1beta2.NetworkStatus)(unsafe.Pointer(in.ExternalNetwork)) + out.Router = (*v1beta2.Router)(unsafe.Pointer(in.Router)) + out.APIServerLoadBalancer = (*v1beta2.LoadBalancer)(unsafe.Pointer(in.APIServerLoadBalancer)) + // WARNING: in.FailureDomains requires manual conversion: inconvertible types (sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomains vs []sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain) + out.ControlPlaneSecurityGroup = (*v1beta2.SecurityGroupStatus)(unsafe.Pointer(in.ControlPlaneSecurityGroup)) + out.WorkerSecurityGroup = (*v1beta2.SecurityGroupStatus)(unsafe.Pointer(in.WorkerSecurityGroup)) + out.BastionSecurityGroup = (*v1beta2.SecurityGroupStatus)(unsafe.Pointer(in.BastionSecurityGroup)) + out.Bastion = (*v1beta2.BastionStatus)(unsafe.Pointer(in.Bastion)) + // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type + // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +func autoConvert_v1beta2_OpenStackClusterStatus_To_v1beta1_OpenStackClusterStatus(in *v1beta2.OpenStackClusterStatus, out *OpenStackClusterStatus, s conversion.Scope) error { + out.Initialization = (*ClusterInitialization)(unsafe.Pointer(in.Initialization)) + out.Network = (*NetworkStatusWithSubnets)(unsafe.Pointer(in.Network)) + out.ExternalNetwork = (*NetworkStatus)(unsafe.Pointer(in.ExternalNetwork)) + out.Router = (*Router)(unsafe.Pointer(in.Router)) + out.APIServerLoadBalancer = (*LoadBalancer)(unsafe.Pointer(in.APIServerLoadBalancer)) + // WARNING: in.FailureDomains requires manual conversion: inconvertible types ([]sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain vs sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomains) + out.ControlPlaneSecurityGroup = (*SecurityGroupStatus)(unsafe.Pointer(in.ControlPlaneSecurityGroup)) + out.WorkerSecurityGroup = (*SecurityGroupStatus)(unsafe.Pointer(in.WorkerSecurityGroup)) + out.BastionSecurityGroup = (*SecurityGroupStatus)(unsafe.Pointer(in.BastionSecurityGroup)) + out.Bastion = (*BastionStatus)(unsafe.Pointer(in.Bastion)) + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(corev1beta1.Conditions, len(*in)) + for i := range *in { + if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +func autoConvert_v1beta1_OpenStackClusterTemplate_To_v1beta2_OpenStackClusterTemplate(in *OpenStackClusterTemplate, out *v1beta2.OpenStackClusterTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_OpenStackClusterTemplateSpec_To_v1beta2_OpenStackClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackClusterTemplate_To_v1beta2_OpenStackClusterTemplate is an autogenerated conversion function. +func Convert_v1beta1_OpenStackClusterTemplate_To_v1beta2_OpenStackClusterTemplate(in *OpenStackClusterTemplate, out *v1beta2.OpenStackClusterTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackClusterTemplate_To_v1beta2_OpenStackClusterTemplate(in, out, s) +} + +func autoConvert_v1beta2_OpenStackClusterTemplate_To_v1beta1_OpenStackClusterTemplate(in *v1beta2.OpenStackClusterTemplate, out *OpenStackClusterTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta2_OpenStackClusterTemplateSpec_To_v1beta1_OpenStackClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackClusterTemplate_To_v1beta1_OpenStackClusterTemplate is an autogenerated conversion function. +func Convert_v1beta2_OpenStackClusterTemplate_To_v1beta1_OpenStackClusterTemplate(in *v1beta2.OpenStackClusterTemplate, out *OpenStackClusterTemplate, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackClusterTemplate_To_v1beta1_OpenStackClusterTemplate(in, out, s) +} + +func autoConvert_v1beta1_OpenStackClusterTemplateList_To_v1beta2_OpenStackClusterTemplateList(in *OpenStackClusterTemplateList, out *v1beta2.OpenStackClusterTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta2.OpenStackClusterTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_OpenStackClusterTemplateList_To_v1beta2_OpenStackClusterTemplateList is an autogenerated conversion function. +func Convert_v1beta1_OpenStackClusterTemplateList_To_v1beta2_OpenStackClusterTemplateList(in *OpenStackClusterTemplateList, out *v1beta2.OpenStackClusterTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackClusterTemplateList_To_v1beta2_OpenStackClusterTemplateList(in, out, s) +} + +func autoConvert_v1beta2_OpenStackClusterTemplateList_To_v1beta1_OpenStackClusterTemplateList(in *v1beta2.OpenStackClusterTemplateList, out *OpenStackClusterTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OpenStackClusterTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta2_OpenStackClusterTemplateList_To_v1beta1_OpenStackClusterTemplateList is an autogenerated conversion function. +func Convert_v1beta2_OpenStackClusterTemplateList_To_v1beta1_OpenStackClusterTemplateList(in *v1beta2.OpenStackClusterTemplateList, out *OpenStackClusterTemplateList, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackClusterTemplateList_To_v1beta1_OpenStackClusterTemplateList(in, out, s) +} + +func autoConvert_v1beta1_OpenStackClusterTemplateResource_To_v1beta2_OpenStackClusterTemplateResource(in *OpenStackClusterTemplateResource, out *v1beta2.OpenStackClusterTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_OpenStackClusterSpec_To_v1beta2_OpenStackClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackClusterTemplateResource_To_v1beta2_OpenStackClusterTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_OpenStackClusterTemplateResource_To_v1beta2_OpenStackClusterTemplateResource(in *OpenStackClusterTemplateResource, out *v1beta2.OpenStackClusterTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackClusterTemplateResource_To_v1beta2_OpenStackClusterTemplateResource(in, out, s) +} + +func autoConvert_v1beta2_OpenStackClusterTemplateResource_To_v1beta1_OpenStackClusterTemplateResource(in *v1beta2.OpenStackClusterTemplateResource, out *OpenStackClusterTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta2_OpenStackClusterSpec_To_v1beta1_OpenStackClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackClusterTemplateResource_To_v1beta1_OpenStackClusterTemplateResource is an autogenerated conversion function. +func Convert_v1beta2_OpenStackClusterTemplateResource_To_v1beta1_OpenStackClusterTemplateResource(in *v1beta2.OpenStackClusterTemplateResource, out *OpenStackClusterTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackClusterTemplateResource_To_v1beta1_OpenStackClusterTemplateResource(in, out, s) +} + +func autoConvert_v1beta1_OpenStackClusterTemplateSpec_To_v1beta2_OpenStackClusterTemplateSpec(in *OpenStackClusterTemplateSpec, out *v1beta2.OpenStackClusterTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_OpenStackClusterTemplateResource_To_v1beta2_OpenStackClusterTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackClusterTemplateSpec_To_v1beta2_OpenStackClusterTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_OpenStackClusterTemplateSpec_To_v1beta2_OpenStackClusterTemplateSpec(in *OpenStackClusterTemplateSpec, out *v1beta2.OpenStackClusterTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackClusterTemplateSpec_To_v1beta2_OpenStackClusterTemplateSpec(in, out, s) +} + +func autoConvert_v1beta2_OpenStackClusterTemplateSpec_To_v1beta1_OpenStackClusterTemplateSpec(in *v1beta2.OpenStackClusterTemplateSpec, out *OpenStackClusterTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta2_OpenStackClusterTemplateResource_To_v1beta1_OpenStackClusterTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackClusterTemplateSpec_To_v1beta1_OpenStackClusterTemplateSpec is an autogenerated conversion function. +func Convert_v1beta2_OpenStackClusterTemplateSpec_To_v1beta1_OpenStackClusterTemplateSpec(in *v1beta2.OpenStackClusterTemplateSpec, out *OpenStackClusterTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackClusterTemplateSpec_To_v1beta1_OpenStackClusterTemplateSpec(in, out, s) +} + +func autoConvert_v1beta1_OpenStackIdentityReference_To_v1beta2_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1beta2.OpenStackIdentityReference, s conversion.Scope) error { + out.Type = in.Type + out.Name = in.Name + out.CloudName = in.CloudName + out.Region = in.Region + return nil +} + +// Convert_v1beta1_OpenStackIdentityReference_To_v1beta2_OpenStackIdentityReference is an autogenerated conversion function. +func Convert_v1beta1_OpenStackIdentityReference_To_v1beta2_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1beta2.OpenStackIdentityReference, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackIdentityReference_To_v1beta2_OpenStackIdentityReference(in, out, s) +} + +func autoConvert_v1beta2_OpenStackIdentityReference_To_v1beta1_OpenStackIdentityReference(in *v1beta2.OpenStackIdentityReference, out *OpenStackIdentityReference, s conversion.Scope) error { + out.Type = in.Type + out.Name = in.Name + out.CloudName = in.CloudName + out.Region = in.Region + return nil +} + +// Convert_v1beta2_OpenStackIdentityReference_To_v1beta1_OpenStackIdentityReference is an autogenerated conversion function. +func Convert_v1beta2_OpenStackIdentityReference_To_v1beta1_OpenStackIdentityReference(in *v1beta2.OpenStackIdentityReference, out *OpenStackIdentityReference, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackIdentityReference_To_v1beta1_OpenStackIdentityReference(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachine_To_v1beta2_OpenStackMachine(in *OpenStackMachine, out *v1beta2.OpenStackMachine, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_OpenStackMachineSpec_To_v1beta2_OpenStackMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_OpenStackMachineStatus_To_v1beta2_OpenStackMachineStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackMachine_To_v1beta2_OpenStackMachine is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachine_To_v1beta2_OpenStackMachine(in *OpenStackMachine, out *v1beta2.OpenStackMachine, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachine_To_v1beta2_OpenStackMachine(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachine_To_v1beta1_OpenStackMachine(in *v1beta2.OpenStackMachine, out *OpenStackMachine, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta2_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta2_OpenStackMachineStatus_To_v1beta1_OpenStackMachineStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackMachine_To_v1beta1_OpenStackMachine is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachine_To_v1beta1_OpenStackMachine(in *v1beta2.OpenStackMachine, out *OpenStackMachine, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachine_To_v1beta1_OpenStackMachine(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineList_To_v1beta2_OpenStackMachineList(in *OpenStackMachineList, out *v1beta2.OpenStackMachineList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta2.OpenStackMachine, len(*in)) + for i := range *in { + if err := Convert_v1beta1_OpenStackMachine_To_v1beta2_OpenStackMachine(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_OpenStackMachineList_To_v1beta2_OpenStackMachineList is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineList_To_v1beta2_OpenStackMachineList(in *OpenStackMachineList, out *v1beta2.OpenStackMachineList, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineList_To_v1beta2_OpenStackMachineList(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachineList_To_v1beta1_OpenStackMachineList(in *v1beta2.OpenStackMachineList, out *OpenStackMachineList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackMachine, len(*in)) + for i := range *in { + if err := Convert_v1beta2_OpenStackMachine_To_v1beta1_OpenStackMachine(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta2_OpenStackMachineList_To_v1beta1_OpenStackMachineList is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachineList_To_v1beta1_OpenStackMachineList(in *v1beta2.OpenStackMachineList, out *OpenStackMachineList, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachineList_To_v1beta1_OpenStackMachineList(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineSpec_To_v1beta2_OpenStackMachineSpec(in *OpenStackMachineSpec, out *v1beta2.OpenStackMachineSpec, s conversion.Scope) error { + out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.Flavor = (*string)(unsafe.Pointer(in.Flavor)) + out.FlavorID = (*string)(unsafe.Pointer(in.FlavorID)) + if err := Convert_v1beta1_ImageParam_To_v1beta2_ImageParam(&in.Image, &out.Image, s); err != nil { + return err + } + out.SSHKeyName = in.SSHKeyName + out.Ports = *(*[]v1beta2.PortOpts)(unsafe.Pointer(&in.Ports)) + out.SecurityGroups = *(*[]v1beta2.SecurityGroupParam)(unsafe.Pointer(&in.SecurityGroups)) + out.Trunk = in.Trunk + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.ServerMetadata = *(*[]v1beta2.ServerMetadata)(unsafe.Pointer(&in.ServerMetadata)) + out.ConfigDrive = (*bool)(unsafe.Pointer(in.ConfigDrive)) + out.RootVolume = (*v1beta2.RootVolume)(unsafe.Pointer(in.RootVolume)) + out.AdditionalBlockDevices = *(*[]v1beta2.AdditionalBlockDevice)(unsafe.Pointer(&in.AdditionalBlockDevices)) + out.ServerGroup = (*v1beta2.ServerGroupParam)(unsafe.Pointer(in.ServerGroup)) + out.IdentityRef = (*v1beta2.OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + out.FloatingIPPoolRef = (*corev1.TypedLocalObjectReference)(unsafe.Pointer(in.FloatingIPPoolRef)) + out.SchedulerHintAdditionalProperties = *(*[]v1beta2.SchedulerHintAdditionalProperty)(unsafe.Pointer(&in.SchedulerHintAdditionalProperties)) + return nil +} + +// Convert_v1beta1_OpenStackMachineSpec_To_v1beta2_OpenStackMachineSpec is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineSpec_To_v1beta2_OpenStackMachineSpec(in *OpenStackMachineSpec, out *v1beta2.OpenStackMachineSpec, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineSpec_To_v1beta2_OpenStackMachineSpec(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec(in *v1beta2.OpenStackMachineSpec, out *OpenStackMachineSpec, s conversion.Scope) error { + out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.Flavor = (*string)(unsafe.Pointer(in.Flavor)) + out.FlavorID = (*string)(unsafe.Pointer(in.FlavorID)) + if err := Convert_v1beta2_ImageParam_To_v1beta1_ImageParam(&in.Image, &out.Image, s); err != nil { + return err + } + out.SSHKeyName = in.SSHKeyName + out.Ports = *(*[]PortOpts)(unsafe.Pointer(&in.Ports)) + out.SecurityGroups = *(*[]SecurityGroupParam)(unsafe.Pointer(&in.SecurityGroups)) + out.Trunk = in.Trunk + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.ServerMetadata = *(*[]ServerMetadata)(unsafe.Pointer(&in.ServerMetadata)) + out.ConfigDrive = (*bool)(unsafe.Pointer(in.ConfigDrive)) + out.RootVolume = (*RootVolume)(unsafe.Pointer(in.RootVolume)) + out.AdditionalBlockDevices = *(*[]AdditionalBlockDevice)(unsafe.Pointer(&in.AdditionalBlockDevices)) + out.ServerGroup = (*ServerGroupParam)(unsafe.Pointer(in.ServerGroup)) + out.IdentityRef = (*OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + out.FloatingIPPoolRef = (*corev1.TypedLocalObjectReference)(unsafe.Pointer(in.FloatingIPPoolRef)) + out.SchedulerHintAdditionalProperties = *(*[]SchedulerHintAdditionalProperty)(unsafe.Pointer(&in.SchedulerHintAdditionalProperties)) + return nil +} + +// Convert_v1beta2_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec(in *v1beta2.OpenStackMachineSpec, out *OpenStackMachineSpec, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineStatus_To_v1beta2_OpenStackMachineStatus(in *OpenStackMachineStatus, out *v1beta2.OpenStackMachineStatus, s conversion.Scope) error { + // WARNING: in.Ready requires manual conversion: does not exist in peer-type + out.Initialization = (*v1beta2.MachineInitialization)(unsafe.Pointer(in.Initialization)) + out.InstanceID = (optional.String)(unsafe.Pointer(in.InstanceID)) + out.Addresses = *(*[]corev1.NodeAddress)(unsafe.Pointer(&in.Addresses)) + out.InstanceState = (*v1beta2.InstanceState)(unsafe.Pointer(in.InstanceState)) + out.Resolved = (*v1beta2.ResolvedMachineSpec)(unsafe.Pointer(in.Resolved)) + out.Resources = (*v1beta2.MachineResources)(unsafe.Pointer(in.Resources)) + // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type + // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +func autoConvert_v1beta2_OpenStackMachineStatus_To_v1beta1_OpenStackMachineStatus(in *v1beta2.OpenStackMachineStatus, out *OpenStackMachineStatus, s conversion.Scope) error { + out.Initialization = (*MachineInitialization)(unsafe.Pointer(in.Initialization)) + out.InstanceID = (optional.String)(unsafe.Pointer(in.InstanceID)) + out.Addresses = *(*[]corev1.NodeAddress)(unsafe.Pointer(&in.Addresses)) + out.InstanceState = (*InstanceState)(unsafe.Pointer(in.InstanceState)) + out.Resolved = (*ResolvedMachineSpec)(unsafe.Pointer(in.Resolved)) + out.Resources = (*MachineResources)(unsafe.Pointer(in.Resources)) + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(corev1beta1.Conditions, len(*in)) + for i := range *in { + if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +func autoConvert_v1beta1_OpenStackMachineTemplate_To_v1beta2_OpenStackMachineTemplate(in *OpenStackMachineTemplate, out *v1beta2.OpenStackMachineTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_OpenStackMachineTemplateSpec_To_v1beta2_OpenStackMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_OpenStackMachineTemplateStatus_To_v1beta2_OpenStackMachineTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackMachineTemplate_To_v1beta2_OpenStackMachineTemplate is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineTemplate_To_v1beta2_OpenStackMachineTemplate(in *OpenStackMachineTemplate, out *v1beta2.OpenStackMachineTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineTemplate_To_v1beta2_OpenStackMachineTemplate(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachineTemplate_To_v1beta1_OpenStackMachineTemplate(in *v1beta2.OpenStackMachineTemplate, out *OpenStackMachineTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta2_OpenStackMachineTemplateSpec_To_v1beta1_OpenStackMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta2_OpenStackMachineTemplateStatus_To_v1beta1_OpenStackMachineTemplateStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackMachineTemplate_To_v1beta1_OpenStackMachineTemplate is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachineTemplate_To_v1beta1_OpenStackMachineTemplate(in *v1beta2.OpenStackMachineTemplate, out *OpenStackMachineTemplate, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachineTemplate_To_v1beta1_OpenStackMachineTemplate(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineTemplateList_To_v1beta2_OpenStackMachineTemplateList(in *OpenStackMachineTemplateList, out *v1beta2.OpenStackMachineTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta2.OpenStackMachineTemplate, len(*in)) + for i := range *in { + if err := Convert_v1beta1_OpenStackMachineTemplate_To_v1beta2_OpenStackMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_OpenStackMachineTemplateList_To_v1beta2_OpenStackMachineTemplateList is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineTemplateList_To_v1beta2_OpenStackMachineTemplateList(in *OpenStackMachineTemplateList, out *v1beta2.OpenStackMachineTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineTemplateList_To_v1beta2_OpenStackMachineTemplateList(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachineTemplateList_To_v1beta1_OpenStackMachineTemplateList(in *v1beta2.OpenStackMachineTemplateList, out *OpenStackMachineTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackMachineTemplate, len(*in)) + for i := range *in { + if err := Convert_v1beta2_OpenStackMachineTemplate_To_v1beta1_OpenStackMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta2_OpenStackMachineTemplateList_To_v1beta1_OpenStackMachineTemplateList is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachineTemplateList_To_v1beta1_OpenStackMachineTemplateList(in *v1beta2.OpenStackMachineTemplateList, out *OpenStackMachineTemplateList, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachineTemplateList_To_v1beta1_OpenStackMachineTemplateList(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineTemplateResource_To_v1beta2_OpenStackMachineTemplateResource(in *OpenStackMachineTemplateResource, out *v1beta2.OpenStackMachineTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_OpenStackMachineSpec_To_v1beta2_OpenStackMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackMachineTemplateResource_To_v1beta2_OpenStackMachineTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineTemplateResource_To_v1beta2_OpenStackMachineTemplateResource(in *OpenStackMachineTemplateResource, out *v1beta2.OpenStackMachineTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineTemplateResource_To_v1beta2_OpenStackMachineTemplateResource(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachineTemplateResource_To_v1beta1_OpenStackMachineTemplateResource(in *v1beta2.OpenStackMachineTemplateResource, out *OpenStackMachineTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta2_OpenStackMachineSpec_To_v1beta1_OpenStackMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackMachineTemplateResource_To_v1beta1_OpenStackMachineTemplateResource is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachineTemplateResource_To_v1beta1_OpenStackMachineTemplateResource(in *v1beta2.OpenStackMachineTemplateResource, out *OpenStackMachineTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachineTemplateResource_To_v1beta1_OpenStackMachineTemplateResource(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineTemplateSpec_To_v1beta2_OpenStackMachineTemplateSpec(in *OpenStackMachineTemplateSpec, out *v1beta2.OpenStackMachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_OpenStackMachineTemplateResource_To_v1beta2_OpenStackMachineTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_OpenStackMachineTemplateSpec_To_v1beta2_OpenStackMachineTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineTemplateSpec_To_v1beta2_OpenStackMachineTemplateSpec(in *OpenStackMachineTemplateSpec, out *v1beta2.OpenStackMachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineTemplateSpec_To_v1beta2_OpenStackMachineTemplateSpec(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachineTemplateSpec_To_v1beta1_OpenStackMachineTemplateSpec(in *v1beta2.OpenStackMachineTemplateSpec, out *OpenStackMachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta2_OpenStackMachineTemplateResource_To_v1beta1_OpenStackMachineTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_OpenStackMachineTemplateSpec_To_v1beta1_OpenStackMachineTemplateSpec is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachineTemplateSpec_To_v1beta1_OpenStackMachineTemplateSpec(in *v1beta2.OpenStackMachineTemplateSpec, out *OpenStackMachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachineTemplateSpec_To_v1beta1_OpenStackMachineTemplateSpec(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineTemplateStatus_To_v1beta2_OpenStackMachineTemplateStatus(in *OpenStackMachineTemplateStatus, out *v1beta2.OpenStackMachineTemplateStatus, s conversion.Scope) error { + out.Capacity = *(*corev1.ResourceList)(unsafe.Pointer(&in.Capacity)) + if err := Convert_v1beta1_NodeInfo_To_v1beta2_NodeInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil { + return err + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1beta1_OpenStackMachineTemplateStatus_To_v1beta2_OpenStackMachineTemplateStatus is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineTemplateStatus_To_v1beta2_OpenStackMachineTemplateStatus(in *OpenStackMachineTemplateStatus, out *v1beta2.OpenStackMachineTemplateStatus, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineTemplateStatus_To_v1beta2_OpenStackMachineTemplateStatus(in, out, s) +} + +func autoConvert_v1beta2_OpenStackMachineTemplateStatus_To_v1beta1_OpenStackMachineTemplateStatus(in *v1beta2.OpenStackMachineTemplateStatus, out *OpenStackMachineTemplateStatus, s conversion.Scope) error { + out.Capacity = *(*corev1.ResourceList)(unsafe.Pointer(&in.Capacity)) + if err := Convert_v1beta2_NodeInfo_To_v1beta1_NodeInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil { + return err + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(corev1beta1.Conditions, len(*in)) + for i := range *in { + if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1beta2_OpenStackMachineTemplateStatus_To_v1beta1_OpenStackMachineTemplateStatus is an autogenerated conversion function. +func Convert_v1beta2_OpenStackMachineTemplateStatus_To_v1beta1_OpenStackMachineTemplateStatus(in *v1beta2.OpenStackMachineTemplateStatus, out *OpenStackMachineTemplateStatus, s conversion.Scope) error { + return autoConvert_v1beta2_OpenStackMachineTemplateStatus_To_v1beta1_OpenStackMachineTemplateStatus(in, out, s) +} + +func autoConvert_v1beta1_PortOpts_To_v1beta2_PortOpts(in *PortOpts, out *v1beta2.PortOpts, s conversion.Scope) error { + out.Network = (*v1beta2.NetworkParam)(unsafe.Pointer(in.Network)) + out.Description = (optional.String)(unsafe.Pointer(in.Description)) + out.NameSuffix = (optional.String)(unsafe.Pointer(in.NameSuffix)) + out.FixedIPs = *(*[]v1beta2.FixedIP)(unsafe.Pointer(&in.FixedIPs)) + out.SecurityGroups = *(*[]v1beta2.SecurityGroupParam)(unsafe.Pointer(&in.SecurityGroups)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.Trunk = (*bool)(unsafe.Pointer(in.Trunk)) + if err := Convert_v1beta1_ResolvedPortSpecFields_To_v1beta2_ResolvedPortSpecFields(&in.ResolvedPortSpecFields, &out.ResolvedPortSpecFields, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_PortOpts_To_v1beta2_PortOpts is an autogenerated conversion function. +func Convert_v1beta1_PortOpts_To_v1beta2_PortOpts(in *PortOpts, out *v1beta2.PortOpts, s conversion.Scope) error { + return autoConvert_v1beta1_PortOpts_To_v1beta2_PortOpts(in, out, s) +} + +func autoConvert_v1beta2_PortOpts_To_v1beta1_PortOpts(in *v1beta2.PortOpts, out *PortOpts, s conversion.Scope) error { + out.Network = (*NetworkParam)(unsafe.Pointer(in.Network)) + out.Description = (optional.String)(unsafe.Pointer(in.Description)) + out.NameSuffix = (optional.String)(unsafe.Pointer(in.NameSuffix)) + out.FixedIPs = *(*[]FixedIP)(unsafe.Pointer(&in.FixedIPs)) + out.SecurityGroups = *(*[]SecurityGroupParam)(unsafe.Pointer(&in.SecurityGroups)) + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.Trunk = (*bool)(unsafe.Pointer(in.Trunk)) + if err := Convert_v1beta2_ResolvedPortSpecFields_To_v1beta1_ResolvedPortSpecFields(&in.ResolvedPortSpecFields, &out.ResolvedPortSpecFields, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_PortOpts_To_v1beta1_PortOpts is an autogenerated conversion function. +func Convert_v1beta2_PortOpts_To_v1beta1_PortOpts(in *v1beta2.PortOpts, out *PortOpts, s conversion.Scope) error { + return autoConvert_v1beta2_PortOpts_To_v1beta1_PortOpts(in, out, s) +} + +func autoConvert_v1beta1_PortStatus_To_v1beta2_PortStatus(in *PortStatus, out *v1beta2.PortStatus, s conversion.Scope) error { + out.ID = in.ID + return nil +} + +// Convert_v1beta1_PortStatus_To_v1beta2_PortStatus is an autogenerated conversion function. +func Convert_v1beta1_PortStatus_To_v1beta2_PortStatus(in *PortStatus, out *v1beta2.PortStatus, s conversion.Scope) error { + return autoConvert_v1beta1_PortStatus_To_v1beta2_PortStatus(in, out, s) +} + +func autoConvert_v1beta2_PortStatus_To_v1beta1_PortStatus(in *v1beta2.PortStatus, out *PortStatus, s conversion.Scope) error { + out.ID = in.ID + return nil +} + +// Convert_v1beta2_PortStatus_To_v1beta1_PortStatus is an autogenerated conversion function. +func Convert_v1beta2_PortStatus_To_v1beta1_PortStatus(in *v1beta2.PortStatus, out *PortStatus, s conversion.Scope) error { + return autoConvert_v1beta2_PortStatus_To_v1beta1_PortStatus(in, out, s) +} + +func autoConvert_v1beta1_ResolvedFixedIP_To_v1beta2_ResolvedFixedIP(in *ResolvedFixedIP, out *v1beta2.ResolvedFixedIP, s conversion.Scope) error { + out.SubnetID = (optional.String)(unsafe.Pointer(in.SubnetID)) + out.IPAddress = (optional.String)(unsafe.Pointer(in.IPAddress)) + return nil +} + +// Convert_v1beta1_ResolvedFixedIP_To_v1beta2_ResolvedFixedIP is an autogenerated conversion function. +func Convert_v1beta1_ResolvedFixedIP_To_v1beta2_ResolvedFixedIP(in *ResolvedFixedIP, out *v1beta2.ResolvedFixedIP, s conversion.Scope) error { + return autoConvert_v1beta1_ResolvedFixedIP_To_v1beta2_ResolvedFixedIP(in, out, s) +} + +func autoConvert_v1beta2_ResolvedFixedIP_To_v1beta1_ResolvedFixedIP(in *v1beta2.ResolvedFixedIP, out *ResolvedFixedIP, s conversion.Scope) error { + out.SubnetID = (optional.String)(unsafe.Pointer(in.SubnetID)) + out.IPAddress = (optional.String)(unsafe.Pointer(in.IPAddress)) + return nil +} + +// Convert_v1beta2_ResolvedFixedIP_To_v1beta1_ResolvedFixedIP is an autogenerated conversion function. +func Convert_v1beta2_ResolvedFixedIP_To_v1beta1_ResolvedFixedIP(in *v1beta2.ResolvedFixedIP, out *ResolvedFixedIP, s conversion.Scope) error { + return autoConvert_v1beta2_ResolvedFixedIP_To_v1beta1_ResolvedFixedIP(in, out, s) +} + +func autoConvert_v1beta1_ResolvedMachineSpec_To_v1beta2_ResolvedMachineSpec(in *ResolvedMachineSpec, out *v1beta2.ResolvedMachineSpec, s conversion.Scope) error { + out.ServerGroupID = in.ServerGroupID + out.ImageID = in.ImageID + out.FlavorID = in.FlavorID + out.Ports = *(*[]v1beta2.ResolvedPortSpec)(unsafe.Pointer(&in.Ports)) + return nil +} + +// Convert_v1beta1_ResolvedMachineSpec_To_v1beta2_ResolvedMachineSpec is an autogenerated conversion function. +func Convert_v1beta1_ResolvedMachineSpec_To_v1beta2_ResolvedMachineSpec(in *ResolvedMachineSpec, out *v1beta2.ResolvedMachineSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ResolvedMachineSpec_To_v1beta2_ResolvedMachineSpec(in, out, s) +} + +func autoConvert_v1beta2_ResolvedMachineSpec_To_v1beta1_ResolvedMachineSpec(in *v1beta2.ResolvedMachineSpec, out *ResolvedMachineSpec, s conversion.Scope) error { + out.ServerGroupID = in.ServerGroupID + out.ImageID = in.ImageID + out.FlavorID = in.FlavorID + out.Ports = *(*[]ResolvedPortSpec)(unsafe.Pointer(&in.Ports)) + return nil +} + +// Convert_v1beta2_ResolvedMachineSpec_To_v1beta1_ResolvedMachineSpec is an autogenerated conversion function. +func Convert_v1beta2_ResolvedMachineSpec_To_v1beta1_ResolvedMachineSpec(in *v1beta2.ResolvedMachineSpec, out *ResolvedMachineSpec, s conversion.Scope) error { + return autoConvert_v1beta2_ResolvedMachineSpec_To_v1beta1_ResolvedMachineSpec(in, out, s) +} + +func autoConvert_v1beta1_ResolvedPortSpec_To_v1beta2_ResolvedPortSpec(in *ResolvedPortSpec, out *v1beta2.ResolvedPortSpec, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.NetworkID = in.NetworkID + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.Trunk = (optional.Bool)(unsafe.Pointer(in.Trunk)) + out.FixedIPs = *(*[]v1beta2.ResolvedFixedIP)(unsafe.Pointer(&in.FixedIPs)) + out.SecurityGroups = *(*[]string)(unsafe.Pointer(&in.SecurityGroups)) + if err := Convert_v1beta1_ResolvedPortSpecFields_To_v1beta2_ResolvedPortSpecFields(&in.ResolvedPortSpecFields, &out.ResolvedPortSpecFields, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ResolvedPortSpec_To_v1beta2_ResolvedPortSpec is an autogenerated conversion function. +func Convert_v1beta1_ResolvedPortSpec_To_v1beta2_ResolvedPortSpec(in *ResolvedPortSpec, out *v1beta2.ResolvedPortSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ResolvedPortSpec_To_v1beta2_ResolvedPortSpec(in, out, s) +} + +func autoConvert_v1beta2_ResolvedPortSpec_To_v1beta1_ResolvedPortSpec(in *v1beta2.ResolvedPortSpec, out *ResolvedPortSpec, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.NetworkID = in.NetworkID + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.Trunk = (optional.Bool)(unsafe.Pointer(in.Trunk)) + out.FixedIPs = *(*[]ResolvedFixedIP)(unsafe.Pointer(&in.FixedIPs)) + out.SecurityGroups = *(*[]string)(unsafe.Pointer(&in.SecurityGroups)) + if err := Convert_v1beta2_ResolvedPortSpecFields_To_v1beta1_ResolvedPortSpecFields(&in.ResolvedPortSpecFields, &out.ResolvedPortSpecFields, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_ResolvedPortSpec_To_v1beta1_ResolvedPortSpec is an autogenerated conversion function. +func Convert_v1beta2_ResolvedPortSpec_To_v1beta1_ResolvedPortSpec(in *v1beta2.ResolvedPortSpec, out *ResolvedPortSpec, s conversion.Scope) error { + return autoConvert_v1beta2_ResolvedPortSpec_To_v1beta1_ResolvedPortSpec(in, out, s) +} + +func autoConvert_v1beta1_ResolvedPortSpecFields_To_v1beta2_ResolvedPortSpecFields(in *ResolvedPortSpecFields, out *v1beta2.ResolvedPortSpecFields, s conversion.Scope) error { + out.AdminStateUp = (*bool)(unsafe.Pointer(in.AdminStateUp)) + out.MACAddress = (optional.String)(unsafe.Pointer(in.MACAddress)) + out.AllowedAddressPairs = *(*[]v1beta2.AddressPair)(unsafe.Pointer(&in.AllowedAddressPairs)) + out.HostID = (optional.String)(unsafe.Pointer(in.HostID)) + out.VNICType = (optional.String)(unsafe.Pointer(in.VNICType)) + out.Profile = (*v1beta2.BindingProfile)(unsafe.Pointer(in.Profile)) + out.DisablePortSecurity = (*bool)(unsafe.Pointer(in.DisablePortSecurity)) + out.PropagateUplinkStatus = (*bool)(unsafe.Pointer(in.PropagateUplinkStatus)) + out.ValueSpecs = *(*[]v1beta2.ValueSpec)(unsafe.Pointer(&in.ValueSpecs)) + return nil +} + +// Convert_v1beta1_ResolvedPortSpecFields_To_v1beta2_ResolvedPortSpecFields is an autogenerated conversion function. +func Convert_v1beta1_ResolvedPortSpecFields_To_v1beta2_ResolvedPortSpecFields(in *ResolvedPortSpecFields, out *v1beta2.ResolvedPortSpecFields, s conversion.Scope) error { + return autoConvert_v1beta1_ResolvedPortSpecFields_To_v1beta2_ResolvedPortSpecFields(in, out, s) +} + +func autoConvert_v1beta2_ResolvedPortSpecFields_To_v1beta1_ResolvedPortSpecFields(in *v1beta2.ResolvedPortSpecFields, out *ResolvedPortSpecFields, s conversion.Scope) error { + out.AdminStateUp = (*bool)(unsafe.Pointer(in.AdminStateUp)) + out.MACAddress = (optional.String)(unsafe.Pointer(in.MACAddress)) + out.AllowedAddressPairs = *(*[]AddressPair)(unsafe.Pointer(&in.AllowedAddressPairs)) + out.HostID = (optional.String)(unsafe.Pointer(in.HostID)) + out.VNICType = (optional.String)(unsafe.Pointer(in.VNICType)) + out.Profile = (*BindingProfile)(unsafe.Pointer(in.Profile)) + out.DisablePortSecurity = (*bool)(unsafe.Pointer(in.DisablePortSecurity)) + out.PropagateUplinkStatus = (*bool)(unsafe.Pointer(in.PropagateUplinkStatus)) + out.ValueSpecs = *(*[]ValueSpec)(unsafe.Pointer(&in.ValueSpecs)) + return nil +} + +// Convert_v1beta2_ResolvedPortSpecFields_To_v1beta1_ResolvedPortSpecFields is an autogenerated conversion function. +func Convert_v1beta2_ResolvedPortSpecFields_To_v1beta1_ResolvedPortSpecFields(in *v1beta2.ResolvedPortSpecFields, out *ResolvedPortSpecFields, s conversion.Scope) error { + return autoConvert_v1beta2_ResolvedPortSpecFields_To_v1beta1_ResolvedPortSpecFields(in, out, s) +} + +func autoConvert_v1beta1_ResourceReference_To_v1beta2_ResourceReference(in *ResourceReference, out *v1beta2.ResourceReference, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1beta1_ResourceReference_To_v1beta2_ResourceReference is an autogenerated conversion function. +func Convert_v1beta1_ResourceReference_To_v1beta2_ResourceReference(in *ResourceReference, out *v1beta2.ResourceReference, s conversion.Scope) error { + return autoConvert_v1beta1_ResourceReference_To_v1beta2_ResourceReference(in, out, s) +} + +func autoConvert_v1beta2_ResourceReference_To_v1beta1_ResourceReference(in *v1beta2.ResourceReference, out *ResourceReference, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1beta2_ResourceReference_To_v1beta1_ResourceReference is an autogenerated conversion function. +func Convert_v1beta2_ResourceReference_To_v1beta1_ResourceReference(in *v1beta2.ResourceReference, out *ResourceReference, s conversion.Scope) error { + return autoConvert_v1beta2_ResourceReference_To_v1beta1_ResourceReference(in, out, s) +} + +func autoConvert_v1beta1_RootVolume_To_v1beta2_RootVolume(in *RootVolume, out *v1beta2.RootVolume, s conversion.Scope) error { + out.SizeGiB = in.SizeGiB + if err := Convert_v1beta1_BlockDeviceVolume_To_v1beta2_BlockDeviceVolume(&in.BlockDeviceVolume, &out.BlockDeviceVolume, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_RootVolume_To_v1beta2_RootVolume is an autogenerated conversion function. +func Convert_v1beta1_RootVolume_To_v1beta2_RootVolume(in *RootVolume, out *v1beta2.RootVolume, s conversion.Scope) error { + return autoConvert_v1beta1_RootVolume_To_v1beta2_RootVolume(in, out, s) +} + +func autoConvert_v1beta2_RootVolume_To_v1beta1_RootVolume(in *v1beta2.RootVolume, out *RootVolume, s conversion.Scope) error { + out.SizeGiB = in.SizeGiB + if err := Convert_v1beta2_BlockDeviceVolume_To_v1beta1_BlockDeviceVolume(&in.BlockDeviceVolume, &out.BlockDeviceVolume, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_RootVolume_To_v1beta1_RootVolume is an autogenerated conversion function. +func Convert_v1beta2_RootVolume_To_v1beta1_RootVolume(in *v1beta2.RootVolume, out *RootVolume, s conversion.Scope) error { + return autoConvert_v1beta2_RootVolume_To_v1beta1_RootVolume(in, out, s) +} + +func autoConvert_v1beta1_Router_To_v1beta2_Router(in *Router, out *v1beta2.Router, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs)) + return nil +} + +// Convert_v1beta1_Router_To_v1beta2_Router is an autogenerated conversion function. +func Convert_v1beta1_Router_To_v1beta2_Router(in *Router, out *v1beta2.Router, s conversion.Scope) error { + return autoConvert_v1beta1_Router_To_v1beta2_Router(in, out, s) +} + +func autoConvert_v1beta2_Router_To_v1beta1_Router(in *v1beta2.Router, out *Router, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs)) + return nil +} + +// Convert_v1beta2_Router_To_v1beta1_Router is an autogenerated conversion function. +func Convert_v1beta2_Router_To_v1beta1_Router(in *v1beta2.Router, out *Router, s conversion.Scope) error { + return autoConvert_v1beta2_Router_To_v1beta1_Router(in, out, s) +} + +func autoConvert_v1beta1_RouterFilter_To_v1beta2_RouterFilter(in *RouterFilter, out *v1beta2.RouterFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + if err := Convert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_RouterFilter_To_v1beta2_RouterFilter is an autogenerated conversion function. +func Convert_v1beta1_RouterFilter_To_v1beta2_RouterFilter(in *RouterFilter, out *v1beta2.RouterFilter, s conversion.Scope) error { + return autoConvert_v1beta1_RouterFilter_To_v1beta2_RouterFilter(in, out, s) +} + +func autoConvert_v1beta2_RouterFilter_To_v1beta1_RouterFilter(in *v1beta2.RouterFilter, out *RouterFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + if err := Convert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_RouterFilter_To_v1beta1_RouterFilter is an autogenerated conversion function. +func Convert_v1beta2_RouterFilter_To_v1beta1_RouterFilter(in *v1beta2.RouterFilter, out *RouterFilter, s conversion.Scope) error { + return autoConvert_v1beta2_RouterFilter_To_v1beta1_RouterFilter(in, out, s) +} + +func autoConvert_v1beta1_RouterParam_To_v1beta2_RouterParam(in *RouterParam, out *v1beta2.RouterParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*v1beta2.RouterFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta1_RouterParam_To_v1beta2_RouterParam is an autogenerated conversion function. +func Convert_v1beta1_RouterParam_To_v1beta2_RouterParam(in *RouterParam, out *v1beta2.RouterParam, s conversion.Scope) error { + return autoConvert_v1beta1_RouterParam_To_v1beta2_RouterParam(in, out, s) +} + +func autoConvert_v1beta2_RouterParam_To_v1beta1_RouterParam(in *v1beta2.RouterParam, out *RouterParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*RouterFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta2_RouterParam_To_v1beta1_RouterParam is an autogenerated conversion function. +func Convert_v1beta2_RouterParam_To_v1beta1_RouterParam(in *v1beta2.RouterParam, out *RouterParam, s conversion.Scope) error { + return autoConvert_v1beta2_RouterParam_To_v1beta1_RouterParam(in, out, s) +} + +func autoConvert_v1beta1_SchedulerHintAdditionalProperty_To_v1beta2_SchedulerHintAdditionalProperty(in *SchedulerHintAdditionalProperty, out *v1beta2.SchedulerHintAdditionalProperty, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_v1beta1_SchedulerHintAdditionalValue_To_v1beta2_SchedulerHintAdditionalValue(&in.Value, &out.Value, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_SchedulerHintAdditionalProperty_To_v1beta2_SchedulerHintAdditionalProperty is an autogenerated conversion function. +func Convert_v1beta1_SchedulerHintAdditionalProperty_To_v1beta2_SchedulerHintAdditionalProperty(in *SchedulerHintAdditionalProperty, out *v1beta2.SchedulerHintAdditionalProperty, s conversion.Scope) error { + return autoConvert_v1beta1_SchedulerHintAdditionalProperty_To_v1beta2_SchedulerHintAdditionalProperty(in, out, s) +} + +func autoConvert_v1beta2_SchedulerHintAdditionalProperty_To_v1beta1_SchedulerHintAdditionalProperty(in *v1beta2.SchedulerHintAdditionalProperty, out *SchedulerHintAdditionalProperty, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_v1beta2_SchedulerHintAdditionalValue_To_v1beta1_SchedulerHintAdditionalValue(&in.Value, &out.Value, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_SchedulerHintAdditionalProperty_To_v1beta1_SchedulerHintAdditionalProperty is an autogenerated conversion function. +func Convert_v1beta2_SchedulerHintAdditionalProperty_To_v1beta1_SchedulerHintAdditionalProperty(in *v1beta2.SchedulerHintAdditionalProperty, out *SchedulerHintAdditionalProperty, s conversion.Scope) error { + return autoConvert_v1beta2_SchedulerHintAdditionalProperty_To_v1beta1_SchedulerHintAdditionalProperty(in, out, s) +} + +func autoConvert_v1beta1_SchedulerHintAdditionalValue_To_v1beta2_SchedulerHintAdditionalValue(in *SchedulerHintAdditionalValue, out *v1beta2.SchedulerHintAdditionalValue, s conversion.Scope) error { + out.Type = v1beta2.SchedulerHintValueType(in.Type) + out.Bool = (*bool)(unsafe.Pointer(in.Bool)) + out.Number = (*int)(unsafe.Pointer(in.Number)) + out.String = (*string)(unsafe.Pointer(in.String)) + return nil +} + +// Convert_v1beta1_SchedulerHintAdditionalValue_To_v1beta2_SchedulerHintAdditionalValue is an autogenerated conversion function. +func Convert_v1beta1_SchedulerHintAdditionalValue_To_v1beta2_SchedulerHintAdditionalValue(in *SchedulerHintAdditionalValue, out *v1beta2.SchedulerHintAdditionalValue, s conversion.Scope) error { + return autoConvert_v1beta1_SchedulerHintAdditionalValue_To_v1beta2_SchedulerHintAdditionalValue(in, out, s) +} + +func autoConvert_v1beta2_SchedulerHintAdditionalValue_To_v1beta1_SchedulerHintAdditionalValue(in *v1beta2.SchedulerHintAdditionalValue, out *SchedulerHintAdditionalValue, s conversion.Scope) error { + out.Type = SchedulerHintValueType(in.Type) + out.Bool = (*bool)(unsafe.Pointer(in.Bool)) + out.Number = (*int)(unsafe.Pointer(in.Number)) + out.String = (*string)(unsafe.Pointer(in.String)) + return nil +} + +// Convert_v1beta2_SchedulerHintAdditionalValue_To_v1beta1_SchedulerHintAdditionalValue is an autogenerated conversion function. +func Convert_v1beta2_SchedulerHintAdditionalValue_To_v1beta1_SchedulerHintAdditionalValue(in *v1beta2.SchedulerHintAdditionalValue, out *SchedulerHintAdditionalValue, s conversion.Scope) error { + return autoConvert_v1beta2_SchedulerHintAdditionalValue_To_v1beta1_SchedulerHintAdditionalValue(in, out, s) +} + +func autoConvert_v1beta1_SecurityGroupFilter_To_v1beta2_SecurityGroupFilter(in *SecurityGroupFilter, out *v1beta2.SecurityGroupFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + if err := Convert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_SecurityGroupFilter_To_v1beta2_SecurityGroupFilter is an autogenerated conversion function. +func Convert_v1beta1_SecurityGroupFilter_To_v1beta2_SecurityGroupFilter(in *SecurityGroupFilter, out *v1beta2.SecurityGroupFilter, s conversion.Scope) error { + return autoConvert_v1beta1_SecurityGroupFilter_To_v1beta2_SecurityGroupFilter(in, out, s) +} + +func autoConvert_v1beta2_SecurityGroupFilter_To_v1beta1_SecurityGroupFilter(in *v1beta2.SecurityGroupFilter, out *SecurityGroupFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + if err := Convert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_SecurityGroupFilter_To_v1beta1_SecurityGroupFilter is an autogenerated conversion function. +func Convert_v1beta2_SecurityGroupFilter_To_v1beta1_SecurityGroupFilter(in *v1beta2.SecurityGroupFilter, out *SecurityGroupFilter, s conversion.Scope) error { + return autoConvert_v1beta2_SecurityGroupFilter_To_v1beta1_SecurityGroupFilter(in, out, s) +} + +func autoConvert_v1beta1_SecurityGroupParam_To_v1beta2_SecurityGroupParam(in *SecurityGroupParam, out *v1beta2.SecurityGroupParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*v1beta2.SecurityGroupFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta1_SecurityGroupParam_To_v1beta2_SecurityGroupParam is an autogenerated conversion function. +func Convert_v1beta1_SecurityGroupParam_To_v1beta2_SecurityGroupParam(in *SecurityGroupParam, out *v1beta2.SecurityGroupParam, s conversion.Scope) error { + return autoConvert_v1beta1_SecurityGroupParam_To_v1beta2_SecurityGroupParam(in, out, s) +} + +func autoConvert_v1beta2_SecurityGroupParam_To_v1beta1_SecurityGroupParam(in *v1beta2.SecurityGroupParam, out *SecurityGroupParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*SecurityGroupFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta2_SecurityGroupParam_To_v1beta1_SecurityGroupParam is an autogenerated conversion function. +func Convert_v1beta2_SecurityGroupParam_To_v1beta1_SecurityGroupParam(in *v1beta2.SecurityGroupParam, out *SecurityGroupParam, s conversion.Scope) error { + return autoConvert_v1beta2_SecurityGroupParam_To_v1beta1_SecurityGroupParam(in, out, s) +} + +func autoConvert_v1beta1_SecurityGroupRuleSpec_To_v1beta2_SecurityGroupRuleSpec(in *SecurityGroupRuleSpec, out *v1beta2.SecurityGroupRuleSpec, s conversion.Scope) error { + out.Name = in.Name + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Direction = in.Direction + out.EtherType = (*string)(unsafe.Pointer(in.EtherType)) + out.PortRangeMin = (*int)(unsafe.Pointer(in.PortRangeMin)) + out.PortRangeMax = (*int)(unsafe.Pointer(in.PortRangeMax)) + out.Protocol = (*string)(unsafe.Pointer(in.Protocol)) + out.RemoteGroupID = (*string)(unsafe.Pointer(in.RemoteGroupID)) + out.RemoteIPPrefix = (*string)(unsafe.Pointer(in.RemoteIPPrefix)) + out.RemoteManagedGroups = *(*[]v1beta2.ManagedSecurityGroupName)(unsafe.Pointer(&in.RemoteManagedGroups)) + return nil +} + +// Convert_v1beta1_SecurityGroupRuleSpec_To_v1beta2_SecurityGroupRuleSpec is an autogenerated conversion function. +func Convert_v1beta1_SecurityGroupRuleSpec_To_v1beta2_SecurityGroupRuleSpec(in *SecurityGroupRuleSpec, out *v1beta2.SecurityGroupRuleSpec, s conversion.Scope) error { + return autoConvert_v1beta1_SecurityGroupRuleSpec_To_v1beta2_SecurityGroupRuleSpec(in, out, s) +} + +func autoConvert_v1beta2_SecurityGroupRuleSpec_To_v1beta1_SecurityGroupRuleSpec(in *v1beta2.SecurityGroupRuleSpec, out *SecurityGroupRuleSpec, s conversion.Scope) error { + out.Name = in.Name + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Direction = in.Direction + out.EtherType = (*string)(unsafe.Pointer(in.EtherType)) + out.PortRangeMin = (*int)(unsafe.Pointer(in.PortRangeMin)) + out.PortRangeMax = (*int)(unsafe.Pointer(in.PortRangeMax)) + out.Protocol = (*string)(unsafe.Pointer(in.Protocol)) + out.RemoteGroupID = (*string)(unsafe.Pointer(in.RemoteGroupID)) + out.RemoteIPPrefix = (*string)(unsafe.Pointer(in.RemoteIPPrefix)) + out.RemoteManagedGroups = *(*[]ManagedSecurityGroupName)(unsafe.Pointer(&in.RemoteManagedGroups)) + return nil +} + +// Convert_v1beta2_SecurityGroupRuleSpec_To_v1beta1_SecurityGroupRuleSpec is an autogenerated conversion function. +func Convert_v1beta2_SecurityGroupRuleSpec_To_v1beta1_SecurityGroupRuleSpec(in *v1beta2.SecurityGroupRuleSpec, out *SecurityGroupRuleSpec, s conversion.Scope) error { + return autoConvert_v1beta2_SecurityGroupRuleSpec_To_v1beta1_SecurityGroupRuleSpec(in, out, s) +} + +func autoConvert_v1beta1_SecurityGroupStatus_To_v1beta2_SecurityGroupStatus(in *SecurityGroupStatus, out *v1beta2.SecurityGroupStatus, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + return nil +} + +// Convert_v1beta1_SecurityGroupStatus_To_v1beta2_SecurityGroupStatus is an autogenerated conversion function. +func Convert_v1beta1_SecurityGroupStatus_To_v1beta2_SecurityGroupStatus(in *SecurityGroupStatus, out *v1beta2.SecurityGroupStatus, s conversion.Scope) error { + return autoConvert_v1beta1_SecurityGroupStatus_To_v1beta2_SecurityGroupStatus(in, out, s) +} + +func autoConvert_v1beta2_SecurityGroupStatus_To_v1beta1_SecurityGroupStatus(in *v1beta2.SecurityGroupStatus, out *SecurityGroupStatus, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + return nil +} + +// Convert_v1beta2_SecurityGroupStatus_To_v1beta1_SecurityGroupStatus is an autogenerated conversion function. +func Convert_v1beta2_SecurityGroupStatus_To_v1beta1_SecurityGroupStatus(in *v1beta2.SecurityGroupStatus, out *SecurityGroupStatus, s conversion.Scope) error { + return autoConvert_v1beta2_SecurityGroupStatus_To_v1beta1_SecurityGroupStatus(in, out, s) +} + +func autoConvert_v1beta1_ServerGroupFilter_To_v1beta2_ServerGroupFilter(in *ServerGroupFilter, out *v1beta2.ServerGroupFilter, s conversion.Scope) error { + out.Name = (optional.String)(unsafe.Pointer(in.Name)) + return nil +} + +// Convert_v1beta1_ServerGroupFilter_To_v1beta2_ServerGroupFilter is an autogenerated conversion function. +func Convert_v1beta1_ServerGroupFilter_To_v1beta2_ServerGroupFilter(in *ServerGroupFilter, out *v1beta2.ServerGroupFilter, s conversion.Scope) error { + return autoConvert_v1beta1_ServerGroupFilter_To_v1beta2_ServerGroupFilter(in, out, s) +} + +func autoConvert_v1beta2_ServerGroupFilter_To_v1beta1_ServerGroupFilter(in *v1beta2.ServerGroupFilter, out *ServerGroupFilter, s conversion.Scope) error { + out.Name = (optional.String)(unsafe.Pointer(in.Name)) + return nil +} + +// Convert_v1beta2_ServerGroupFilter_To_v1beta1_ServerGroupFilter is an autogenerated conversion function. +func Convert_v1beta2_ServerGroupFilter_To_v1beta1_ServerGroupFilter(in *v1beta2.ServerGroupFilter, out *ServerGroupFilter, s conversion.Scope) error { + return autoConvert_v1beta2_ServerGroupFilter_To_v1beta1_ServerGroupFilter(in, out, s) +} + +func autoConvert_v1beta1_ServerGroupParam_To_v1beta2_ServerGroupParam(in *ServerGroupParam, out *v1beta2.ServerGroupParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*v1beta2.ServerGroupFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta1_ServerGroupParam_To_v1beta2_ServerGroupParam is an autogenerated conversion function. +func Convert_v1beta1_ServerGroupParam_To_v1beta2_ServerGroupParam(in *ServerGroupParam, out *v1beta2.ServerGroupParam, s conversion.Scope) error { + return autoConvert_v1beta1_ServerGroupParam_To_v1beta2_ServerGroupParam(in, out, s) +} + +func autoConvert_v1beta2_ServerGroupParam_To_v1beta1_ServerGroupParam(in *v1beta2.ServerGroupParam, out *ServerGroupParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*ServerGroupFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta2_ServerGroupParam_To_v1beta1_ServerGroupParam is an autogenerated conversion function. +func Convert_v1beta2_ServerGroupParam_To_v1beta1_ServerGroupParam(in *v1beta2.ServerGroupParam, out *ServerGroupParam, s conversion.Scope) error { + return autoConvert_v1beta2_ServerGroupParam_To_v1beta1_ServerGroupParam(in, out, s) +} + +func autoConvert_v1beta1_ServerMetadata_To_v1beta2_ServerMetadata(in *ServerMetadata, out *v1beta2.ServerMetadata, s conversion.Scope) error { + out.Key = in.Key + out.Value = in.Value + return nil +} + +// Convert_v1beta1_ServerMetadata_To_v1beta2_ServerMetadata is an autogenerated conversion function. +func Convert_v1beta1_ServerMetadata_To_v1beta2_ServerMetadata(in *ServerMetadata, out *v1beta2.ServerMetadata, s conversion.Scope) error { + return autoConvert_v1beta1_ServerMetadata_To_v1beta2_ServerMetadata(in, out, s) +} + +func autoConvert_v1beta2_ServerMetadata_To_v1beta1_ServerMetadata(in *v1beta2.ServerMetadata, out *ServerMetadata, s conversion.Scope) error { + out.Key = in.Key + out.Value = in.Value + return nil +} + +// Convert_v1beta2_ServerMetadata_To_v1beta1_ServerMetadata is an autogenerated conversion function. +func Convert_v1beta2_ServerMetadata_To_v1beta1_ServerMetadata(in *v1beta2.ServerMetadata, out *ServerMetadata, s conversion.Scope) error { + return autoConvert_v1beta2_ServerMetadata_To_v1beta1_ServerMetadata(in, out, s) +} + +func autoConvert_v1beta1_Subnet_To_v1beta2_Subnet(in *Subnet, out *v1beta2.Subnet, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.CIDR = in.CIDR + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + return nil +} + +// Convert_v1beta1_Subnet_To_v1beta2_Subnet is an autogenerated conversion function. +func Convert_v1beta1_Subnet_To_v1beta2_Subnet(in *Subnet, out *v1beta2.Subnet, s conversion.Scope) error { + return autoConvert_v1beta1_Subnet_To_v1beta2_Subnet(in, out, s) +} + +func autoConvert_v1beta2_Subnet_To_v1beta1_Subnet(in *v1beta2.Subnet, out *Subnet, s conversion.Scope) error { + out.Name = in.Name + out.ID = in.ID + out.CIDR = in.CIDR + out.Tags = *(*[]string)(unsafe.Pointer(&in.Tags)) + return nil +} + +// Convert_v1beta2_Subnet_To_v1beta1_Subnet is an autogenerated conversion function. +func Convert_v1beta2_Subnet_To_v1beta1_Subnet(in *v1beta2.Subnet, out *Subnet, s conversion.Scope) error { + return autoConvert_v1beta2_Subnet_To_v1beta1_Subnet(in, out, s) +} + +func autoConvert_v1beta1_SubnetFilter_To_v1beta2_SubnetFilter(in *SubnetFilter, out *v1beta2.SubnetFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + out.IPVersion = in.IPVersion + out.GatewayIP = in.GatewayIP + out.CIDR = in.CIDR + out.IPv6AddressMode = in.IPv6AddressMode + out.IPv6RAMode = in.IPv6RAMode + if err := Convert_v1beta1_FilterByNeutronTags_To_v1beta2_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_SubnetFilter_To_v1beta2_SubnetFilter is an autogenerated conversion function. +func Convert_v1beta1_SubnetFilter_To_v1beta2_SubnetFilter(in *SubnetFilter, out *v1beta2.SubnetFilter, s conversion.Scope) error { + return autoConvert_v1beta1_SubnetFilter_To_v1beta2_SubnetFilter(in, out, s) +} + +func autoConvert_v1beta2_SubnetFilter_To_v1beta1_SubnetFilter(in *v1beta2.SubnetFilter, out *SubnetFilter, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.ProjectID = in.ProjectID + out.IPVersion = in.IPVersion + out.GatewayIP = in.GatewayIP + out.CIDR = in.CIDR + out.IPv6AddressMode = in.IPv6AddressMode + out.IPv6RAMode = in.IPv6RAMode + if err := Convert_v1beta2_FilterByNeutronTags_To_v1beta1_FilterByNeutronTags(&in.FilterByNeutronTags, &out.FilterByNeutronTags, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_SubnetFilter_To_v1beta1_SubnetFilter is an autogenerated conversion function. +func Convert_v1beta2_SubnetFilter_To_v1beta1_SubnetFilter(in *v1beta2.SubnetFilter, out *SubnetFilter, s conversion.Scope) error { + return autoConvert_v1beta2_SubnetFilter_To_v1beta1_SubnetFilter(in, out, s) +} + +func autoConvert_v1beta1_SubnetParam_To_v1beta2_SubnetParam(in *SubnetParam, out *v1beta2.SubnetParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*v1beta2.SubnetFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta1_SubnetParam_To_v1beta2_SubnetParam is an autogenerated conversion function. +func Convert_v1beta1_SubnetParam_To_v1beta2_SubnetParam(in *SubnetParam, out *v1beta2.SubnetParam, s conversion.Scope) error { + return autoConvert_v1beta1_SubnetParam_To_v1beta2_SubnetParam(in, out, s) +} + +func autoConvert_v1beta2_SubnetParam_To_v1beta1_SubnetParam(in *v1beta2.SubnetParam, out *SubnetParam, s conversion.Scope) error { + out.ID = (optional.String)(unsafe.Pointer(in.ID)) + out.Filter = (*SubnetFilter)(unsafe.Pointer(in.Filter)) + return nil +} + +// Convert_v1beta2_SubnetParam_To_v1beta1_SubnetParam is an autogenerated conversion function. +func Convert_v1beta2_SubnetParam_To_v1beta1_SubnetParam(in *v1beta2.SubnetParam, out *SubnetParam, s conversion.Scope) error { + return autoConvert_v1beta2_SubnetParam_To_v1beta1_SubnetParam(in, out, s) +} + +func autoConvert_v1beta1_SubnetSpec_To_v1beta2_SubnetSpec(in *SubnetSpec, out *v1beta2.SubnetSpec, s conversion.Scope) error { + out.CIDR = in.CIDR + out.DNSNameservers = *(*[]string)(unsafe.Pointer(&in.DNSNameservers)) + out.AllocationPools = *(*[]v1beta2.AllocationPool)(unsafe.Pointer(&in.AllocationPools)) + return nil +} + +// Convert_v1beta1_SubnetSpec_To_v1beta2_SubnetSpec is an autogenerated conversion function. +func Convert_v1beta1_SubnetSpec_To_v1beta2_SubnetSpec(in *SubnetSpec, out *v1beta2.SubnetSpec, s conversion.Scope) error { + return autoConvert_v1beta1_SubnetSpec_To_v1beta2_SubnetSpec(in, out, s) +} + +func autoConvert_v1beta2_SubnetSpec_To_v1beta1_SubnetSpec(in *v1beta2.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { + out.CIDR = in.CIDR + out.DNSNameservers = *(*[]string)(unsafe.Pointer(&in.DNSNameservers)) + out.AllocationPools = *(*[]AllocationPool)(unsafe.Pointer(&in.AllocationPools)) + return nil +} + +// Convert_v1beta2_SubnetSpec_To_v1beta1_SubnetSpec is an autogenerated conversion function. +func Convert_v1beta2_SubnetSpec_To_v1beta1_SubnetSpec(in *v1beta2.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { + return autoConvert_v1beta2_SubnetSpec_To_v1beta1_SubnetSpec(in, out, s) +} + +func autoConvert_v1beta1_ValueSpec_To_v1beta2_ValueSpec(in *ValueSpec, out *v1beta2.ValueSpec, s conversion.Scope) error { + out.Name = in.Name + out.Key = in.Key + out.Value = in.Value + return nil +} + +// Convert_v1beta1_ValueSpec_To_v1beta2_ValueSpec is an autogenerated conversion function. +func Convert_v1beta1_ValueSpec_To_v1beta2_ValueSpec(in *ValueSpec, out *v1beta2.ValueSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ValueSpec_To_v1beta2_ValueSpec(in, out, s) +} + +func autoConvert_v1beta2_ValueSpec_To_v1beta1_ValueSpec(in *v1beta2.ValueSpec, out *ValueSpec, s conversion.Scope) error { + out.Name = in.Name + out.Key = in.Key + out.Value = in.Value + return nil +} + +// Convert_v1beta2_ValueSpec_To_v1beta1_ValueSpec is an autogenerated conversion function. +func Convert_v1beta2_ValueSpec_To_v1beta1_ValueSpec(in *v1beta2.ValueSpec, out *ValueSpec, s conversion.Scope) error { + return autoConvert_v1beta2_ValueSpec_To_v1beta1_ValueSpec(in, out, s) +} + +func autoConvert_v1beta1_VolumeAvailabilityZone_To_v1beta2_VolumeAvailabilityZone(in *VolumeAvailabilityZone, out *v1beta2.VolumeAvailabilityZone, s conversion.Scope) error { + out.From = v1beta2.VolumeAZSource(in.From) + out.Name = (*v1beta2.VolumeAZName)(unsafe.Pointer(in.Name)) + return nil +} + +// Convert_v1beta1_VolumeAvailabilityZone_To_v1beta2_VolumeAvailabilityZone is an autogenerated conversion function. +func Convert_v1beta1_VolumeAvailabilityZone_To_v1beta2_VolumeAvailabilityZone(in *VolumeAvailabilityZone, out *v1beta2.VolumeAvailabilityZone, s conversion.Scope) error { + return autoConvert_v1beta1_VolumeAvailabilityZone_To_v1beta2_VolumeAvailabilityZone(in, out, s) +} + +func autoConvert_v1beta2_VolumeAvailabilityZone_To_v1beta1_VolumeAvailabilityZone(in *v1beta2.VolumeAvailabilityZone, out *VolumeAvailabilityZone, s conversion.Scope) error { + out.From = VolumeAZSource(in.From) + out.Name = (*VolumeAZName)(unsafe.Pointer(in.Name)) + return nil +} + +// Convert_v1beta2_VolumeAvailabilityZone_To_v1beta1_VolumeAvailabilityZone is an autogenerated conversion function. +func Convert_v1beta2_VolumeAvailabilityZone_To_v1beta1_VolumeAvailabilityZone(in *v1beta2.VolumeAvailabilityZone, out *VolumeAvailabilityZone, s conversion.Scope) error { + return autoConvert_v1beta2_VolumeAvailabilityZone_To_v1beta1_VolumeAvailabilityZone(in, out, s) +} diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index b93422b7a..743bf197c 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ //go:build !ignore_autogenerated /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ package v1beta1 import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" + errors "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) @@ -280,6 +280,21 @@ func (in *BlockDeviceVolume) DeepCopy() *BlockDeviceVolume { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInitialization) DeepCopyInto(out *ClusterInitialization) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitialization. +func (in *ClusterInitialization) DeepCopy() *ClusterInitialization { + if in == nil { + return nil + } + out := new(ClusterInitialization) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalRouterIPParam) DeepCopyInto(out *ExternalRouterIPParam) { *out = *in @@ -441,6 +456,21 @@ func (in *LoadBalancer) DeepCopy() *LoadBalancer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineInitialization) DeepCopyInto(out *MachineInitialization) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineInitialization. +func (in *MachineInitialization) DeepCopy() *MachineInitialization { + if in == nil { + return nil + } + out := new(MachineInitialization) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineResources) DeepCopyInto(out *MachineResources) { *out = *in @@ -581,6 +611,21 @@ func (in *NetworkStatusWithSubnets) DeepCopy() *NetworkStatusWithSubnets { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeInfo) DeepCopyInto(out *NodeInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInfo. +func (in *NodeInfo) DeepCopy() *NodeInfo { + if in == nil { + return nil + } + out := new(NodeInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackCluster) DeepCopyInto(out *OpenStackCluster) { *out = *in @@ -765,6 +810,11 @@ func (in *OpenStackClusterSpec) DeepCopy() *OpenStackClusterSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackClusterStatus) DeepCopyInto(out *OpenStackClusterStatus) { *out = *in + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(ClusterInitialization) + **out = **in + } if in.Network != nil { in, out := &in.Network, &out.Network *out = new(NetworkStatusWithSubnets) @@ -822,6 +872,13 @@ func (in *OpenStackClusterStatus) DeepCopyInto(out *OpenStackClusterStatus) { *out = new(string) **out = **in } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(corev1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterStatus. @@ -1095,6 +1152,11 @@ func (in *OpenStackMachineSpec) DeepCopy() *OpenStackMachineSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackMachineStatus) DeepCopyInto(out *OpenStackMachineStatus) { *out = *in + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(MachineInitialization) + **out = **in + } if in.InstanceID != nil { in, out := &in.InstanceID, &out.InstanceID *out = new(string) @@ -1155,6 +1217,7 @@ func (in *OpenStackMachineTemplate) DeepCopyInto(out *OpenStackMachineTemplate) out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplate. @@ -1239,6 +1302,36 @@ func (in *OpenStackMachineTemplateSpec) DeepCopy() *OpenStackMachineTemplateSpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineTemplateStatus) DeepCopyInto(out *OpenStackMachineTemplateStatus) { + *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(v1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + out.NodeInfo = in.NodeInfo + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(corev1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplateStatus. +func (in *OpenStackMachineTemplateStatus) DeepCopy() *OpenStackMachineTemplateStatus { + if in == nil { + return nil + } + out := new(OpenStackMachineTemplateStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PortOpts) DeepCopyInto(out *PortOpts) { *out = *in diff --git a/api/v1beta2/conditions_consts.go b/api/v1beta2/conditions_consts.go new file mode 100644 index 000000000..66be0e58f --- /dev/null +++ b/api/v1beta2/conditions_consts.go @@ -0,0 +1,110 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +const ( + // InstanceReadyCondition reports on current status of the OpenStack instance. Ready indicates the instance is in a Running state. + InstanceReadyCondition string = "InstanceReady" + + // WaitingForClusterInfrastructureReason used when machine is waiting for cluster infrastructure to be ready before proceeding. + WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" + // WaitingForBootstrapDataReason used when machine is waiting for bootstrap data to be ready before proceeding. + WaitingForBootstrapDataReason = "WaitingForBootstrapData" + // InvalidMachineSpecReason used when the machine spec is invalid. + InvalidMachineSpecReason = "InvalidMachineSpec" + // InstanceCreateFailedReason used when creating the instance failed. + InstanceCreateFailedReason = "InstanceCreateFailed" + // InstanceNotFoundReason used when the instance couldn't be retrieved. + InstanceNotFoundReason = "InstanceNotFound" + // InstanceStateErrorReason used when the instance is in error state. + InstanceStateErrorReason = "InstanceStateError" + // InstanceDeletedReason used when the instance is in a deleted state. + InstanceDeletedReason = "InstanceDeleted" + // InstanceNotReadyReason used when the instance is in a pending state. + InstanceNotReadyReason = "InstanceNotReady" + // InstanceDeleteFailedReason used when deleting the instance failed. + InstanceDeleteFailedReason = "InstanceDeleteFailed" + // OpenstackErrorReason used when there is an error communicating with OpenStack. + OpenStackErrorReason = "OpenStackError" + // DependencyFailedReason indicates that a dependent object failed. + DependencyFailedReason = "DependencyFailed" + + // ServerUnexpectedDeletedMessage is the message used when the server is unexpectedly deleted via an external agent. + ServerUnexpectedDeletedMessage = "The server was unexpectedly deleted" +) + +const ( + // APIServerIngressReadyCondition reports on the current status of the network ingress (Loadbalancer, Floating IP) for Control Plane machines. Ready indicates that the instance can receive requests. + APIServerIngressReadyCondition string = "APIServerIngressReady" + + // LoadBalancerMemberErrorReason used when the instance could not be added as a loadbalancer member. + LoadBalancerMemberErrorReason = "LoadBalancerMemberError" + // FloatingIPErrorReason used when the floating ip could not be created or attached. + FloatingIPErrorReason = "FloatingIPError" +) + +const ( + // FloatingAddressFromPoolReadyCondition reports on the current status of the Floating IPs from ipam pool. + FloatingAddressFromPoolReadyCondition string = "FloatingAddressFromPoolReady" + // WaitingForIpamProviderReason used when machine is waiting for ipam provider to be ready before proceeding. + FloatingAddressFromPoolWaitingForIpamProviderReason = "WaitingForIPAMProvider" + // FloatingAddressFromPoolErrorReason is used when there is an error attaching an IP from the pool to an machine. + FloatingAddressFromPoolErrorReason = "FloatingIPError" + // UnableToFindFloatingIPNetworkReason is used when the floating ip network is not found. + UnableToFindFloatingIPNetworkReason = "UnableToFindFloatingIPNetwork" + // PortCreateFailedReason used when creating a port failed. + PortCreateFailedReason = "PortCreateFailed" +) + +const ( + // OpenStackAuthenticationSucceeded reports on the current status of the OpenStack credentials. + OpenStackAuthenticationSucceeded string = "OpenStackAuthenticationSucceeded" + + // OpenStackAuthenticationFailedReason is used when the controller fails to authenticate with OpenStack. + OpenStackAuthenticationFailedReason = "OpenStackAuthenticationFailed" +) + +const ( + // NetworkReadyCondition reports on the current status of the cluster network infrastructure. + // Ready indicates that the network, subnets, and related resources have been successfully provisioned. + NetworkReadyCondition string = "NetworkReady" + + // RouterReadyCondition reports on the current status of the cluster router infrastructure. + // Ready indicates that the router and its interfaces have been successfully provisioned. + RouterReadyCondition string = "RouterReady" + + // SecurityGroupsReadyCondition reports on the current status of the cluster security groups. + // Ready indicates that all required security groups have been successfully provisioned. + SecurityGroupsReadyCondition string = "SecurityGroupsReady" + + // APIEndpointReadyCondition reports on the current status of the cluster API endpoint. + // Ready indicates that the control plane endpoint has been successfully configured. + APIEndpointReadyCondition string = "APIEndpointReady" + + // ReadyConditionReason is the reason used when the resource is ready. + ReadyConditionReason = "Ready" + // NetworkReconcileFailedReason is used when network reconciliation fails. + NetworkReconcileFailedReason = "NetworkCreateFailed" + // SubnetReconcileFailedReason is used when subnet reconciliation fails. + SubnetReconcileFailedReason = "SubnetCreateFailed" + // RouterReconcileFailedReason is used when router reconciliation fails. + RouterReconcileFailedReason = "RouterCreateFailed" + // SecurityGroupReconcileFailedReason is used when security group reconciliation fails. + SecurityGroupReconcileFailedReason = "SecurityGroupCreateFailed" + // APIEndpointConfigFailedReason is used when API endpoint configuration fails. + APIEndpointConfigFailedReason = "APIEndpointConfigFailed" +) diff --git a/api/v1beta2/conversion.go b/api/v1beta2/conversion.go new file mode 100644 index 000000000..b2747c3ac --- /dev/null +++ b/api/v1beta2/conversion.go @@ -0,0 +1,41 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +// Hub marks OpenStackCluster as a conversion hub. +func (*OpenStackCluster) Hub() {} + +// Hub marks OpenStackClusterList as a conversion hub. +func (*OpenStackClusterList) Hub() {} + +// Hub marks OpenStackClusterTemplate as a conversion hub. +func (*OpenStackClusterTemplate) Hub() {} + +// Hub marks OpenStackClusterTemplateList as a conversion hub. +func (*OpenStackClusterTemplateList) Hub() {} + +// Hub marks OpenStackMachine as a conversion hub. +func (*OpenStackMachine) Hub() {} + +// Hub marks OpenStackMachineList as a conversion hub. +func (*OpenStackMachineList) Hub() {} + +// Hub marks OpenStackMachineTemplate as a conversion hub. +func (*OpenStackMachineTemplate) Hub() {} + +// Hub marks OpenStackMachineTemplateList as a conversion hub. +func (*OpenStackMachineTemplateList) Hub() {} diff --git a/api/v1beta2/conversion_helpers.go b/api/v1beta2/conversion_helpers.go new file mode 100644 index 000000000..29cfed94e --- /dev/null +++ b/api/v1beta2/conversion_helpers.go @@ -0,0 +1,73 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" +) + +// ConvertConditionsToV1Beta2 converts CAPI v1beta1 conditions to metav1.Condition slice. +func ConvertConditionsToV1Beta2(src clusterv1beta1.Conditions, observedGeneration int64) []metav1.Condition { + if src == nil { + return nil + } + + dst := make([]metav1.Condition, len(src)) + for i, c := range src { + dst[i] = metav1.Condition{ + Type: string(c.Type), + Status: metav1.ConditionStatus(c.Status), + ObservedGeneration: observedGeneration, + LastTransitionTime: c.LastTransitionTime, + Reason: c.Reason, + Message: c.Message, + } + } + return dst +} + +// ConvertConditionsFromV1Beta2 converts metav1.Condition slice to CAPI v1beta1 conditions. +func ConvertConditionsFromV1Beta2(src []metav1.Condition) clusterv1beta1.Conditions { + if src == nil { + return nil + } + + dst := make(clusterv1beta1.Conditions, len(src)) + for i, c := range src { + dst[i] = clusterv1beta1.Condition{ + Type: clusterv1beta1.ConditionType(c.Type), + Status: corev1.ConditionStatus(c.Status), + Severity: clusterv1beta1.ConditionSeverityNone, // Lost in conversion + LastTransitionTime: c.LastTransitionTime, + Reason: c.Reason, + Message: c.Message, + } + } + return dst +} + +// IsReady checks if the Ready condition is True. +func IsReady(conditions []metav1.Condition) bool { + for _, c := range conditions { + if c.Type == "Ready" && c.Status == metav1.ConditionTrue { + return true + } + } + return false +} diff --git a/api/v1beta2/doc.go b/api/v1beta2/doc.go new file mode 100644 index 000000000..e8644536b --- /dev/null +++ b/api/v1beta2/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1beta2 contains API Schema definitions for the infrastructure v1beta2 API group. +// +kubebuilder:object:generate=true +// +groupName=infrastructure.cluster.x-k8s.io +// +k8s:openapi-gen=true +package v1beta2 diff --git a/api/v1beta2/groupversion_info.go b/api/v1beta2/groupversion_info.go new file mode 100644 index 000000000..65b879132 --- /dev/null +++ b/api/v1beta2/groupversion_info.go @@ -0,0 +1,53 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// package v1beta2 contains API Schema definitions for the infrastructure v1beta2 API group +// +kubebuilder:object:generate=true +// +groupName=infrastructure.cluster.x-k8s.io +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package. +const GroupName = "infrastructure.cluster.x-k8s.io" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta2"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // schemeBuilder is used to add go types to the GroupVersionKind scheme. + schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = schemeBuilder.AddToScheme + + objectTypes = []runtime.Object{} +) + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, objectTypes...) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/api/v1beta2/identity_types.go b/api/v1beta2/identity_types.go new file mode 100644 index 000000000..1d68142c8 --- /dev/null +++ b/api/v1beta2/identity_types.go @@ -0,0 +1,54 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +// OpenStackIdentityReference is a reference to an infrastructure +// provider identity to be used to provision cluster resources. +// +kubebuilder:validation:XValidation:rule="(!has(self.region) && !has(oldSelf.region)) || self.region == oldSelf.region",message="region is immutable" +type OpenStackIdentityReference struct { + // Type specifies the identity reference type. Defaults to Secret for backward compatibility. + // +kubebuilder:validation:Enum=Secret;ClusterIdentity + // +kubebuilder:default=Secret + // +kubebuilder:validation:Required + Type string `json:"type,omitempty"` + + // Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + // or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + // The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + // The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 + Name string `json:"name"` + + // CloudName specifies the name of the entry in the clouds.yaml file to use. + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 + CloudName string `json:"cloudName"` + + // Region specifies an OpenStack region to use. If specified, it overrides + // any value in clouds.yaml. If specified for an OpenStackMachine, its + // value will be included in providerID. + // +optional + Region string `json:"region,omitempty"` +} + +// IdentityRefProvider is an interface for obtaining OpenStack credentials from an API object +// +kubebuilder:object:generate:=false +type IdentityRefProvider interface { + // GetIdentifyRef returns the object's namespace and IdentityRef if it has an IdentityRef, or nulls if it does not + GetIdentityRef() (*string, *OpenStackIdentityReference) +} diff --git a/api/v1beta2/openstackcluster_types.go b/api/v1beta2/openstackcluster_types.go new file mode 100644 index 000000000..8342b6063 --- /dev/null +++ b/api/v1beta2/openstackcluster_types.go @@ -0,0 +1,339 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + + "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional" +) + +const ( + // ClusterFinalizer allows ReconcileOpenStackCluster to clean up OpenStack resources associated with OpenStackCluster before + // removing it from the apiserver. + ClusterFinalizer = "openstackcluster.infrastructure.cluster.x-k8s.io" +) + +// OpenStackClusterSpec defines the desired state of OpenStackCluster. +// +kubebuilder:validation:XValidation:rule="has(self.disableExternalNetwork) && self.disableExternalNetwork ? !has(self.bastion) || !has(self.bastion.floatingIP) : true",message="bastion floating IP cannot be set when disableExternalNetwork is true" +// +kubebuilder:validation:XValidation:rule="has(self.disableExternalNetwork) && self.disableExternalNetwork ? has(self.disableAPIServerFloatingIP) && self.disableAPIServerFloatingIP : true",message="disableAPIServerFloatingIP cannot be false when disableExternalNetwork is true" +type OpenStackClusterSpec struct { + // ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network, + // subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4 + // subnet is supported. If you leave this empty, no network will be created. + // +kubebuilder:validation:MaxItems=1 + // +listType=atomic + // +optional + ManagedSubnets []SubnetSpec `json:"managedSubnets,omitempty"` + + // Router specifies an existing router to be used if ManagedSubnets are + // specified. If specified, no new router will be created. + // +optional + Router *RouterParam `json:"router,omitempty"` + + // Network specifies an existing network to use if no ManagedSubnets + // are specified. + // +optional + Network *NetworkParam `json:"network,omitempty"` + + // Subnets specifies existing subnets to use if not ManagedSubnets are + // specified. All subnets must be in the network specified by Network. + // There can be zero, one, or two subnets. If no subnets are specified, + // all subnets in Network will be used. If 2 subnets are specified, one + // must be IPv4 and the other IPv6. + // +kubebuilder:validation:MaxItems=2 + // +listType=atomic + // +optional + Subnets []SubnetParam `json:"subnets,omitempty"` + + // NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID. + // This value will be used only if the Cluster actuator creates the network. + // If left empty, the network will have the default MTU defined in Openstack network service. + // To use this field, the Openstack installation requires the net-mtu neutron API extension. + // +optional + NetworkMTU optional.Int `json:"networkMTU,omitempty"` + + // ExternalRouterIPs is an array of externalIPs on the respective subnets. + // This is necessary if the router needs a fixed ip in a specific subnet. + // +listType=atomic + // +optional + ExternalRouterIPs []ExternalRouterIPParam `json:"externalRouterIPs,omitempty"` + + // ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs. + // This option is ignored if DisableExternalNetwork is set to true. + // + // If ExternalNetwork is defined it must refer to exactly one external network. + // + // If ExternalNetwork is not defined or is empty the controller will use any + // existing external network as long as there is only one. It is an + // error if ExternalNetwork is not defined and there are multiple + // external networks unless DisableExternalNetwork is also set. + // + // If ExternalNetwork is not defined and there are no external networks + // the controller will proceed as though DisableExternalNetwork was set. + // +optional + ExternalNetwork *NetworkParam `json:"externalNetwork,omitempty"` + + // DisableExternalNetwork specifies whether or not to attempt to connect the cluster + // to an external network. This allows for the creation of clusters when connecting + // to an external network is not possible or desirable, e.g. if using a provider network. + // +optional + DisableExternalNetwork optional.Bool `json:"disableExternalNetwork,omitempty"` + + // APIServerLoadBalancer configures the optional LoadBalancer for the APIServer. + // If not specified, no load balancer will be created for the API server. + // +optional + APIServerLoadBalancer *APIServerLoadBalancer `json:"apiServerLoadBalancer,omitempty"` + + // DisableAPIServerFloatingIP determines whether or not to attempt to attach a floating + // IP to the API server. This allows for the creation of clusters when attaching a floating + // IP to the API server (and hence, in many cases, exposing the API server to the internet) + // is not possible or desirable, e.g. if using a shared VLAN for communication between + // management and workload clusters or when the management cluster is inside the + // project network. + // This option requires that the API server use a VIP on the cluster network so that the + // underlying machines can change without changing ControlPlaneEndpoint.Host. + // When using a managed load balancer, this VIP will be managed automatically. + // If not using a managed load balancer, cluster configuration will fail without additional + // configuration to manage the VIP on the control plane machines, which falls outside of + // the scope of this controller. + // +optional + DisableAPIServerFloatingIP optional.Bool `json:"disableAPIServerFloatingIP,omitempty"` + + // APIServerFloatingIP is the floatingIP which will be associated with the API server. + // The floatingIP will be created if it does not already exist. + // If not specified, a new floatingIP is allocated. + // This field is not used if DisableAPIServerFloatingIP is set to true. + // +optional + APIServerFloatingIP optional.String `json:"apiServerFloatingIP,omitempty"` + + // APIServerFixedIP is the fixed IP which will be associated with the API server. + // In the case where the API server has a floating IP but not a managed load balancer, + // this field is not used. + // If a managed load balancer is used and this field is not specified, a fixed IP will + // be dynamically allocated for the load balancer. + // If a managed load balancer is not used AND the API server floating IP is disabled, + // this field MUST be specified and should correspond to a pre-allocated port that + // holds the fixed IP to be used as a VIP. + // +optional + APIServerFixedIP optional.String `json:"apiServerFixedIP,omitempty"` + + // APIServerPort is the port on which the listener on the APIServer + // will be created. If specified, it must be an integer between 0 and 65535. + // +optional + APIServerPort optional.UInt16 `json:"apiServerPort,omitempty"` + + // ManagedSecurityGroups determines whether OpenStack security groups for the cluster + // will be managed by the OpenStack provider or whether pre-existing security groups will + // be specified as part of the configuration. + // By default, the managed security groups have rules that allow the Kubelet, etcd, and the + // Kubernetes API server to function correctly. + // It's possible to add additional rules to the managed security groups. + // When defined to an empty struct, the managed security groups will be created with the default rules. + // +optional + ManagedSecurityGroups *ManagedSecurityGroups `json:"managedSecurityGroups,omitempty"` + + // DisablePortSecurity disables the port security of the network created for the + // Kubernetes cluster, which also disables SecurityGroups + // +optional + DisablePortSecurity optional.Bool `json:"disablePortSecurity,omitempty"` + + // Tags to set on all resources in cluster which support tags + // +listType=set + // +optional + Tags []string `json:"tags,omitempty"` + + // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // It is normally populated automatically by the OpenStackCluster + // controller during cluster provisioning. If it is set on creation the + // control plane endpoint will use the values set here in preference to + // values set elsewhere. + // ControlPlaneEndpoint cannot be modified after ControlPlaneEndpoint.Host has been set. + // +optional + ControlPlaneEndpoint *clusterv1.APIEndpoint `json:"controlPlaneEndpoint,omitempty"` + + // ControlPlaneAvailabilityZones is the set of availability zones which + // control plane machines may be deployed to. + // +listType=set + // +optional + ControlPlaneAvailabilityZones []string `json:"controlPlaneAvailabilityZones,omitempty"` + + // ControlPlaneOmitAvailabilityZone causes availability zone to be + // omitted when creating control plane nodes, allowing the Nova + // scheduler to make a decision on which availability zone to use based + // on other scheduling constraints + // +optional + ControlPlaneOmitAvailabilityZone optional.Bool `json:"controlPlaneOmitAvailabilityZone,omitempty"` + + // Bastion is the OpenStack instance to login the nodes + // + // As a rolling update is not ideal during a bastion host session, we + // prevent changes to a running bastion configuration. To make changes, it's required + // to first set `enabled: false` which will remove the bastion and then changes can be made. + //+optional + Bastion *Bastion `json:"bastion,omitempty"` + + // IdentityRef is a reference to a secret holding OpenStack credentials + // to be used when reconciling this cluster. It is also to reconcile + // machines unless overridden in the machine spec. + // +kubebuilder:validation:Required + IdentityRef OpenStackIdentityReference `json:"identityRef"` +} + +// ClusterInitialization represents the initialization status of the cluster. +type ClusterInitialization struct { + // Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + // +optional + Provisioned bool `json:"provisioned,omitempty"` +} + +// OpenStackClusterStatus defines the observed state of OpenStackCluster. +type OpenStackClusterStatus struct { + // Initialization contains information about the initialization status of the cluster. + // +optional + Initialization *ClusterInitialization `json:"initialization,omitempty"` + + // Network contains information about the created OpenStack Network. + // +optional + Network *NetworkStatusWithSubnets `json:"network,omitempty"` + + // ExternalNetwork contains information about the external network used for default ingress and egress traffic. + // +optional + ExternalNetwork *NetworkStatus `json:"externalNetwork,omitempty"` + + // Router describes the default cluster router + // +optional + Router *Router `json:"router,omitempty"` + + // APIServerLoadBalancer describes the api server load balancer if one exists + // +optional + APIServerLoadBalancer *LoadBalancer `json:"apiServerLoadBalancer,omitempty"` + + // FailureDomains represent OpenStack availability zones + FailureDomains []clusterv1.FailureDomain `json:"failureDomains,omitempty"` + + // ControlPlaneSecurityGroup contains the information about the + // OpenStack Security Group that needs to be applied to control plane + // nodes. + // +optional + ControlPlaneSecurityGroup *SecurityGroupStatus `json:"controlPlaneSecurityGroup,omitempty"` + + // WorkerSecurityGroup contains the information about the OpenStack + // Security Group that needs to be applied to worker nodes. + // +optional + WorkerSecurityGroup *SecurityGroupStatus `json:"workerSecurityGroup,omitempty"` + + // BastionSecurityGroup contains the information about the OpenStack + // Security Group that needs to be applied to worker nodes. + // +optional + BastionSecurityGroup *SecurityGroupStatus `json:"bastionSecurityGroup,omitempty"` + + // Bastion contains the information about the deployed bastion host + // +optional + Bastion *BastionStatus `json:"bastion,omitempty"` + + // Conditions defines current service state of the OpenStackCluster. + // This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + // (both during initial provisioning and after the initial provisioning is completed). + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:resource:path=openstackclusters,scope=Namespaced,categories=cluster-api,shortName=osc +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this OpenStackCluster belongs" +// +kubebuilder:printcolumn:name="Network",type="string",JSONPath=".status.network.id",description="Network the cluster is using" +// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.controlPlaneEndpoint.host",description="API Endpoint",priority=1 +// +kubebuilder:printcolumn:name="Bastion IP",type="string",JSONPath=".status.bastion.floatingIP",description="Bastion address for breakglass access" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackCluster" + +// OpenStackCluster is the Schema for the openstackclusters API. +type OpenStackCluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpenStackClusterSpec `json:"spec,omitempty"` + Status OpenStackClusterStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// OpenStackClusterList contains a list of OpenStackCluster. +type OpenStackClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpenStackCluster `json:"items"` +} + +// ManagedSecurityGroups defines the desired state of security groups and rules for the cluster. +type ManagedSecurityGroups struct { + // allNodesSecurityGroupRules defines the rules that should be applied to all nodes. + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + AllNodesSecurityGroupRules []SecurityGroupRuleSpec `json:"allNodesSecurityGroupRules,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // controlPlaneNodesSecurityGroupRules defines the rules that should be applied to control plane nodes. + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + ControlPlaneNodesSecurityGroupRules []SecurityGroupRuleSpec `json:"controlPlaneNodesSecurityGroupRules,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // workerNodesSecurityGroupRules defines the rules that should be applied to worker nodes. + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + WorkerNodesSecurityGroupRules []SecurityGroupRuleSpec `json:"workerNodesSecurityGroupRules,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // AllowAllInClusterTraffic allows all ingress and egress traffic between cluster nodes when set to true. + // +kubebuilder:default=false + // +kubebuilder:validation:Required + AllowAllInClusterTraffic bool `json:"allowAllInClusterTraffic"` +} + +var _ IdentityRefProvider = &OpenStackCluster{} + +// GetConditions returns the observations of the operational state of the OpenStackCluster resource. +func (c *OpenStackCluster) GetConditions() []metav1.Condition { + return c.Status.Conditions +} + +// SetConditions sets the underlying service state of the OpenStackCluster to the predescribed clusterv1.Conditions. +func (c *OpenStackCluster) SetConditions(conditions []metav1.Condition) { + c.Status.Conditions = conditions +} + +// GetIdentifyRef returns the cluster's namespace and IdentityRef. +func (c *OpenStackCluster) GetIdentityRef() (*string, *OpenStackIdentityReference) { + return &c.Namespace, &c.Spec.IdentityRef +} + +func init() { + objectTypes = append(objectTypes, &OpenStackCluster{}, &OpenStackClusterList{}) +} diff --git a/api/v1beta2/openstackclustertemplate_types.go b/api/v1beta2/openstackclustertemplate_types.go new file mode 100644 index 000000000..f707084a6 --- /dev/null +++ b/api/v1beta2/openstackclustertemplate_types.go @@ -0,0 +1,57 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// OpenStackClusterTemplateResource describes the data needed to create a OpenStackCluster from a template. +type OpenStackClusterTemplateResource struct { + Spec OpenStackClusterSpec `json:"spec"` +} + +// OpenStackClusterTemplateSpec defines the desired state of OpenStackClusterTemplate. +type OpenStackClusterTemplateSpec struct { + Template OpenStackClusterTemplateResource `json:"template"` +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:resource:path=openstackclustertemplates,scope=Namespaced,categories=cluster-api,shortName=osct + +// OpenStackClusterTemplate is the Schema for the openstackclustertemplates API. +type OpenStackClusterTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpenStackClusterTemplateSpec `json:"spec,omitempty"` +} + +//+kubebuilder:object:root=true + +// OpenStackClusterTemplateList contains a list of OpenStackClusterTemplate. +type OpenStackClusterTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpenStackClusterTemplate `json:"items"` +} + +func init() { + objectTypes = append(objectTypes, &OpenStackClusterTemplate{}, &OpenStackClusterTemplateList{}) +} diff --git a/api/v1beta2/openstackmachine_types.go b/api/v1beta2/openstackmachine_types.go new file mode 100644 index 000000000..b3ee66997 --- /dev/null +++ b/api/v1beta2/openstackmachine_types.go @@ -0,0 +1,279 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional" +) + +const ( + // MachineFinalizer allows ReconcileOpenStackMachine to clean up OpenStack resources associated with OpenStackMachine before + // removing it from the apiserver. + MachineFinalizer = "openstackmachine.infrastructure.cluster.x-k8s.io" + IPClaimMachineFinalizer = "openstackmachine.infrastructure.cluster.x-k8s.io/ip-claim" +) + +// SchedulerHintValueType is the type that represents allowed values for the Type field. +// +kubebuilder:validation:Enum=Bool;String;Number +type SchedulerHintValueType string + +// Constants representing the allowed types for SchedulerHintAdditionalValue. +const ( + SchedulerHintTypeBool SchedulerHintValueType = "Bool" + SchedulerHintTypeString SchedulerHintValueType = "String" + SchedulerHintTypeNumber SchedulerHintValueType = "Number" +) + +// SchedulerHintAdditionalValue represents the value of a scheduler hint property. +// The value can be of various types: Bool, String, or Number. +// The Type field indicates the type of the value being used. +// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Bool' ? has(self.bool) : !has(self.bool)",message="bool is required when type is Bool, and forbidden otherwise" +// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Number' ? has(self.number) : !has(self.number)",message="number is required when type is Number, and forbidden otherwise" +// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'String' ? has(self.string) : !has(self.string)",message="string is required when type is String, and forbidden otherwise" +// +union. +type SchedulerHintAdditionalValue struct { + // Type represents the type of the value. + // Valid values are Bool, String, and Number. + // +kubebuilder:validation:Required + // +unionDiscriminator + Type SchedulerHintValueType `json:"type"` + + // Bool is the boolean value of the scheduler hint, used when Type is "Bool". + // This field is required if type is 'Bool', and must not be set otherwise. + // +unionMember,optional + Bool *bool `json:"bool,omitempty"` + + // Number is the integer value of the scheduler hint, used when Type is "Number". + // This field is required if type is 'Number', and must not be set otherwise. + // +unionMember,optional + Number *int `json:"number,omitempty"` + + // String is the string value of the scheduler hint, used when Type is "String". + // This field is required if type is 'String', and must not be set otherwise. + // +unionMember,optional + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + String *string `json:"string,omitempty"` +} + +// SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. +// It includes a Name to identify the property and a Value that can be of various types. +type SchedulerHintAdditionalProperty struct { + // Name is the name of the scheduler hint property. + // It is a unique identifier for the property. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:Required + Name string `json:"name"` + + // Value is the value of the scheduler hint property, which can be of various types + // (e.g., bool, string, int). The type is indicated by the Value.Type field. + // +kubebuilder:validation:Required + Value SchedulerHintAdditionalValue `json:"value"` +} + +// OpenStackMachineSpec defines the desired state of OpenStackMachine. +// +kubebuilder:validation:XValidation:message="at least one of flavor or flavorID must be set",rule=(has(self.flavor) || has(self.flavorID)) +type OpenStackMachineSpec struct { + // ProviderID is the unique identifier as specified by the cloud provider. + ProviderID *string `json:"providerID,omitempty"` + + // The flavor reference for the flavor for your server instance. + // +kubebuilder:validation:MinLength=1 + Flavor *string `json:"flavor,omitempty"` + + // FlavorID allows flavors to be specified by ID. This field takes precedence + // over Flavor. + // +kubebuilder:validation:MinLength=1 + FlavorID *string `json:"flavorID,omitempty"` + + // The image to use for your server instance. + // If the rootVolume is specified, this will be used when creating the root volume. + // +required + Image ImageParam `json:"image"` + + // The ssh key to inject in the instance + SSHKeyName string `json:"sshKeyName,omitempty"` + + // Ports to be attached to the server instance. They are created if a port with the given name does not already exist. + // If not specified a default port will be added for the default cluster network. + Ports []PortOpts `json:"ports,omitempty"` + + // The names of the security groups to assign to the instance + SecurityGroups []SecurityGroupParam `json:"securityGroups,omitempty"` + + // Whether the server instance is created on a trunk port or not. + Trunk bool `json:"trunk,omitempty"` + + // Tags which will be added to the machine and all dependent resources + // which support them. These are in addition to Tags defined on the + // cluster. + // Requires Nova api 2.52 minimum! + // +listType=set + Tags []string `json:"tags,omitempty"` + + // Metadata mapping. Allows you to create a map of key value pairs to add to the server instance. + // +listType=map + // +listMapKey=key + ServerMetadata []ServerMetadata `json:"serverMetadata,omitempty"` + + // Config Drive support + ConfigDrive *bool `json:"configDrive,omitempty"` + + // The volume metadata to boot from + RootVolume *RootVolume `json:"rootVolume,omitempty"` + + // AdditionalBlockDevices is a list of specifications for additional block devices to attach to the server instance + // +listType=map + // +listMapKey=name + // +optional + AdditionalBlockDevices []AdditionalBlockDevice `json:"additionalBlockDevices,omitempty"` + + // The server group to assign the machine to. + // +optional + ServerGroup *ServerGroupParam `json:"serverGroup,omitempty"` + + // IdentityRef is a reference to a secret holding OpenStack credentials + // to be used when reconciling this machine. If not specified, the + // credentials specified in the cluster will be used. + // +optional + IdentityRef *OpenStackIdentityReference `json:"identityRef,omitempty"` + + // floatingIPPoolRef is a reference to a IPPool that will be assigned + // to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP + // will be assigned to the OpenStackMachine. + // +optional + FloatingIPPoolRef *corev1.TypedLocalObjectReference `json:"floatingIPPoolRef,omitempty"` + + // SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + // to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + // such as specifying certain host aggregates or availability zones. + // +optional + // +listType=map + // +listMapKey=name + SchedulerHintAdditionalProperties []SchedulerHintAdditionalProperty `json:"schedulerHintAdditionalProperties,omitempty"` +} + +type ServerMetadata struct { + // Key is the server metadata key + // +kubebuilder:validation:MaxLength:=255 + // +kubebuilder:validation:Required + Key string `json:"key"` + + // Value is the server metadata value + // +kubebuilder:validation:MaxLength:=255 + // +kubebuilder:validation:Required + Value string `json:"value"` +} + +// MachineInitialization contains information about the initialization status of the machine. +type MachineInitialization struct { + // Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + // +optional + Provisioned bool `json:"provisioned,omitempty"` +} + +// OpenStackMachineStatus defines the observed state of OpenStackMachine. +type OpenStackMachineStatus struct { + // Initialization contains information about the initialization status of the machine. + // +optional + Initialization *MachineInitialization `json:"initialization,omitempty"` + + // InstanceID is the OpenStack instance ID for this machine. + // +optional + InstanceID optional.String `json:"instanceID,omitempty"` + + // Addresses contains the OpenStack instance associated addresses. + Addresses []corev1.NodeAddress `json:"addresses,omitempty"` + + // InstanceState is the state of the OpenStack instance for this machine. + // This field is not set anymore by the OpenStackMachine controller. + // Instead, it's set by the OpenStackServer controller. + // +optional + InstanceState *InstanceState `json:"instanceState,omitempty"` + + // Resolved contains parts of the machine spec with all external + // references fully resolved. + // +optional + Resolved *ResolvedMachineSpec `json:"resolved,omitempty"` + + // Resources contains references to OpenStack resources created for the machine. + // +optional + Resources *MachineResources `json:"resources,omitempty"` + + // Conditions defines current service state of the OpenStackMachine. + // This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + // (both during initial provisioning and after the initial provisioning is completed). + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:resource:path=openstackmachines,scope=Namespaced,categories=cluster-api,shortName=osm +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this OpenStackMachine belongs" +// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="OpenStack instance ID" +// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns with this OpenStackMachine" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackMachine" + +// OpenStackMachine is the Schema for the openstackmachines API. +type OpenStackMachine struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpenStackMachineSpec `json:"spec,omitempty"` + Status OpenStackMachineStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// OpenStackMachineList contains a list of OpenStackMachine. +type OpenStackMachineList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpenStackMachine `json:"items"` +} + +// GetConditions returns the observations of the operational state of the OpenStackMachine resource. +func (r *OpenStackMachine) GetConditions() []metav1.Condition { + return r.Status.Conditions +} + +// SetConditions sets the underlying service state of the OpenStackMachine to the predescribed clusterv1.Conditions. +func (r *OpenStackMachine) SetConditions(conditions []metav1.Condition) { + r.Status.Conditions = conditions +} + +var _ IdentityRefProvider = &OpenStackMachine{} + +// GetIdentifyRef returns the object's namespace and IdentityRef if it has an IdentityRef, or nulls if it does not. +func (r *OpenStackMachine) GetIdentityRef() (*string, *OpenStackIdentityReference) { + if r.Spec.IdentityRef != nil { + return &r.Namespace, r.Spec.IdentityRef + } + return nil, nil +} + +func init() { + objectTypes = append(objectTypes, &OpenStackMachine{}, &OpenStackMachineList{}) +} diff --git a/api/v1beta2/openstackmachinetemplate_types.go b/api/v1beta2/openstackmachinetemplate_types.go new file mode 100644 index 000000000..5a82a17c3 --- /dev/null +++ b/api/v1beta2/openstackmachinetemplate_types.go @@ -0,0 +1,99 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// OpenStackMachineTemplateSpec defines the desired state of OpenStackMachineTemplate. +type OpenStackMachineTemplateSpec struct { + Template OpenStackMachineTemplateResource `json:"template"` +} + +// OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate. +type OpenStackMachineTemplateStatus struct { + // Capacity defines the resource capacity for this machine. + // This value is used for autoscaling from zero operations as defined in: + // https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + // +optional + Capacity corev1.ResourceList `json:"capacity,omitempty"` + // +optional + NodeInfo NodeInfo `json:"nodeInfo,omitempty,omitzero"` + + // Conditions defines current service state of the OpenStackMachineTemplate. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. + // (both during initial provisioning and after the initial provisioning is completed). + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +// NodeInfo contains information about the node's architecture and operating system. +// +kubebuilder:validation:MinProperties=1 +type NodeInfo struct { + // operatingSystem is a string representing the operating system of the node. + // This may be a string like 'linux' or 'windows'. + // +optional + OperatingSystem string `json:"operatingSystem,omitempty"` +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:resource:path=openstackmachinetemplates,scope=Namespaced,categories=cluster-api,shortName=osmt +// +kubebuilder:subresource:status + +// OpenStackMachineTemplate is the Schema for the openstackmachinetemplates API. +type OpenStackMachineTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpenStackMachineTemplateSpec `json:"spec,omitempty"` + Status OpenStackMachineTemplateStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// OpenStackMachineTemplateList contains a list of OpenStackMachineTemplate. +type OpenStackMachineTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpenStackMachineTemplate `json:"items"` +} + +// GetIdentityRef returns the object's namespace and IdentityRef if it has an IdentityRef, or nulls if it does not. +func (r *OpenStackMachineTemplate) GetIdentityRef() (*string, *OpenStackIdentityReference) { + if r.Spec.Template.Spec.IdentityRef != nil { + return &r.Namespace, r.Spec.Template.Spec.IdentityRef + } + return nil, nil +} + +func init() { + objectTypes = append(objectTypes, &OpenStackMachineTemplate{}, &OpenStackMachineTemplateList{}) +} + +// GetConditions returns the observations of the operational state of the OpenStackMachineTemplate resource. +func (r *OpenStackMachineTemplate) GetConditions() []metav1.Condition { + return r.Status.Conditions +} + +// SetConditions sets the underlying service state of the OpenStackMachineTemplate to the predescribed clusterv1.Conditions. +func (r *OpenStackMachineTemplate) SetConditions(conditions []metav1.Condition) { + r.Status.Conditions = conditions +} diff --git a/api/v1beta2/types.go b/api/v1beta2/types.go new file mode 100644 index 000000000..5ba41644a --- /dev/null +++ b/api/v1beta2/types.go @@ -0,0 +1,982 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta2 + +import ( + "strings" + + "k8s.io/utils/ptr" + + "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional" +) + +// OpenStackMachineTemplateResource describes the data needed to create a OpenStackMachine from a template. +type OpenStackMachineTemplateResource struct { + // Spec is the specification of the desired behavior of the machine. + Spec OpenStackMachineSpec `json:"spec"` +} + +type ResourceReference struct { + // Name is the name of the referenced resource + Name string `json:"name"` +} + +// ImageParam describes a glance image. It can be specified by ID, filter, or a +// reference to an ORC Image. +// +kubebuilder:validation:MaxProperties:=1 +// +kubebuilder:validation:MinProperties:=1 +type ImageParam struct { + // ID is the uuid of the image. ID will not be validated before use. + // +kubebuilder:validation:Format:=uuid + // +optional + ID optional.String `json:"id,omitempty"` + + // Filter describes a query for an image. If specified, the combination + // of name and tags must return a single matching image or an error will + // be raised. + // +optional + Filter *ImageFilter `json:"filter,omitempty"` + + // ImageRef is a reference to an ORC Image in the same namespace as the + // referring object. + // +optional + ImageRef *ResourceReference `json:"imageRef,omitempty"` +} + +// ImageFilter describes a query for an image. +// +kubebuilder:validation:MinProperties:=1 +type ImageFilter struct { + // The name of the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised. + // +optional + Name optional.String `json:"name,omitempty"` + + // The tags associated with the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised. + // +listType=set + // +optional + Tags []string `json:"tags,omitempty"` +} + +func (f *ImageFilter) IsZero() bool { + if f == nil { + return true + } + return f.Name == nil && len(f.Tags) == 0 +} + +type ExternalRouterIPParam struct { + // The FixedIP in the corresponding subnet + FixedIP string `json:"fixedIP,omitempty"` + // The subnet in which the FixedIP is used for the Gateway of this router + Subnet SubnetParam `json:"subnet"` +} + +// NeutronTag represents a tag on a Neutron resource. +// It may not be empty and may not contain commas. +// +kubebuilder:validation:Pattern:="^[^,]+$" +// +kubebuilder:validation:MinLength:=1 +type NeutronTag string + +type FilterByNeutronTags struct { + // Tags is a list of tags to filter by. If specified, the resource must + // have all of the tags specified to be included in the result. + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` + + // TagsAny is a list of tags to filter by. If specified, the resource + // must have at least one of the tags specified to be included in the + // result. + // +listType=set + // +optional + TagsAny []NeutronTag `json:"tagsAny,omitempty"` + + // NotTags is a list of tags to filter by. If specified, resources which + // contain all of the given tags will be excluded from the result. + // +listType=set + // +optional + NotTags []NeutronTag `json:"notTags,omitempty"` + + // NotTagsAny is a list of tags to filter by. If specified, resources + // which contain any of the given tags will be excluded from the result. + // +listType=set + // +optional + NotTagsAny []NeutronTag `json:"notTagsAny,omitempty"` +} + +func (f *FilterByNeutronTags) IsZero() bool { + return f == nil || (len(f.Tags) == 0 && len(f.TagsAny) == 0 && len(f.NotTags) == 0 && len(f.NotTagsAny) == 0) +} + +// SecurityGroupParam specifies an OpenStack security group. It may be specified by ID or filter, but not both. +// +kubebuilder:validation:MaxProperties:=1 +// +kubebuilder:validation:MinProperties:=1 +type SecurityGroupParam struct { + // ID is the ID of the security group to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + // +kubebuilder:validation:Format:=uuid + // +optional + ID optional.String `json:"id,omitempty"` + + // Filter specifies a query to select an OpenStack security group. If provided, cannot be empty. + // +optional + Filter *SecurityGroupFilter `json:"filter,omitempty"` +} + +// SecurityGroupFilter specifies a query to select an OpenStack security group. At least one property must be set. +// +kubebuilder:validation:MinProperties:=1 +type SecurityGroupFilter struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + ProjectID string `json:"projectID,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +func (f *SecurityGroupFilter) IsZero() bool { + if f == nil { + return true + } + return f.Name == "" && + f.Description == "" && + f.ProjectID == "" && + f.FilterByNeutronTags.IsZero() +} + +// NetworkParam specifies an OpenStack network. It may be specified by either ID or Filter, but not both. +// +kubebuilder:validation:MaxProperties:=1 +// +kubebuilder:validation:MinProperties:=1 +type NetworkParam struct { + // ID is the ID of the network to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + // +kubebuilder:validation:Format:=uuid + // +optional + ID optional.String `json:"id,omitempty"` + + // Filter specifies a filter to select an OpenStack network. If provided, cannot be empty. + // +optional + Filter *NetworkFilter `json:"filter,omitempty"` +} + +// NetworkFilter specifies a query to select an OpenStack network. At least one property must be set. +// +kubebuilder:validation:MinProperties:=1 +type NetworkFilter struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + ProjectID string `json:"projectID,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +func (networkFilter *NetworkFilter) IsZero() bool { + if networkFilter == nil { + return true + } + return networkFilter.Name == "" && + networkFilter.Description == "" && + networkFilter.ProjectID == "" && + networkFilter.FilterByNeutronTags.IsZero() +} + +// SubnetParam specifies an OpenStack subnet to use. It may be specified by either ID or filter, but not both. +// +kubebuilder:validation:MaxProperties:=1 +// +kubebuilder:validation:MinProperties:=1 +type SubnetParam struct { + // ID is the uuid of the subnet. It will not be validated. + // +kubebuilder:validation:Format:=uuid + // +optional + ID optional.String `json:"id,omitempty"` + + // Filter specifies a filter to select the subnet. It must match exactly one subnet. + // +optional + Filter *SubnetFilter `json:"filter,omitempty"` +} + +// SubnetFilter specifies a filter to select a subnet. At least one parameter must be specified. +// +kubebuilder:validation:MinProperties:=1 +type SubnetFilter struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + ProjectID string `json:"projectID,omitempty"` + IPVersion int `json:"ipVersion,omitempty"` + GatewayIP string `json:"gatewayIP,omitempty"` + CIDR string `json:"cidr,omitempty"` + IPv6AddressMode string `json:"ipv6AddressMode,omitempty"` + IPv6RAMode string `json:"ipv6RAMode,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +func (subnetFilter *SubnetFilter) IsZero() bool { + if subnetFilter == nil { + return true + } + return subnetFilter.Name == "" && + subnetFilter.Description == "" && + subnetFilter.ProjectID == "" && + subnetFilter.IPVersion == 0 && + subnetFilter.GatewayIP == "" && + subnetFilter.CIDR == "" && + subnetFilter.IPv6AddressMode == "" && + subnetFilter.IPv6RAMode == "" && + subnetFilter.FilterByNeutronTags.IsZero() +} + +// RouterParam specifies an OpenStack router to use. It may be specified by either ID or filter, but not both. +// +kubebuilder:validation:MaxProperties:=1 +// +kubebuilder:validation:MinProperties:=1 +type RouterParam struct { + // ID is the ID of the router to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + // +kubebuilder:validation:Format:=uuid + // +optional + ID optional.String `json:"id,omitempty"` + + // Filter specifies a filter to select an OpenStack router. If provided, cannot be empty. + Filter *RouterFilter `json:"filter,omitempty"` +} + +// RouterFilter specifies a query to select an OpenStack router. At least one property must be set. +// +kubebuilder:validation:MinProperties:=1 +type RouterFilter struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + ProjectID string `json:"projectID,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +func (f *RouterFilter) IsZero() bool { + if f == nil { + return true + } + return f.Name == "" && + f.Description == "" && + f.ProjectID == "" && + f.FilterByNeutronTags.IsZero() +} + +type SubnetSpec struct { + // CIDR is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. + // This field is required when defining a subnet. + // +required + CIDR string `json:"cidr"` + + // DNSNameservers holds a list of DNS server addresses that will be provided when creating + // the subnet. These addresses need to have the same IP version as CIDR. + DNSNameservers []string `json:"dnsNameservers,omitempty"` + + // AllocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. + // If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from + // outside of these ranges manually. + AllocationPools []AllocationPool `json:"allocationPools,omitempty"` +} + +type AllocationPool struct { + // Start represents the start of the AllocationPool, that is the lowest IP of the pool. + // +required + Start string `json:"start"` + + // End represents the end of the AlloctionPool, that is the highest IP of the pool. + // +required + End string `json:"end"` +} + +type PortOpts struct { + // Network is a query for an openstack network that the port will be created or discovered on. + // This will fail if the query returns more than one network. + // +optional + Network *NetworkParam `json:"network,omitempty"` + + // Description is a human-readable description for the port. + // +optional + Description optional.String `json:"description,omitempty"` + + // NameSuffix will be appended to the name of the port if specified. If unspecified, instead the 0-based index of the port in the list is used. + // +optional + NameSuffix optional.String `json:"nameSuffix,omitempty"` + + // FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network. + // +optional + // +listType=atomic + FixedIPs []FixedIP `json:"fixedIPs,omitempty"` + + // SecurityGroups is a list of the names, uuids, filters or any combination these of the security groups to assign to the instance. + // +optional + // +listType=atomic + SecurityGroups []SecurityGroupParam `json:"securityGroups,omitempty"` + + // Tags applied to the port (and corresponding trunk, if a trunk is configured.) + // These tags are applied in addition to the instance's tags, which will also be applied to the port. + // +listType=set + // +optional + Tags []string `json:"tags,omitempty"` + + // Trunk specifies whether trunking is enabled at the port level. If not + // provided the value is inherited from the machine, or false for a + // bastion host. + // +optional + Trunk *bool `json:"trunk,omitempty"` + + ResolvedPortSpecFields `json:",inline"` +} + +// ResolvePortSpecFields is a convenience struct containing all fields of a +// PortOpts which don't contain references which need to be resolved, and can +// therefore be shared with ResolvedPortSpec. +type ResolvedPortSpecFields struct { + // AdminStateUp specifies whether the port should be created in the up (true) or down (false) state. The default is up. + // +optional + AdminStateUp *bool `json:"adminStateUp,omitempty"` + + // MACAddress specifies the MAC address of the port. If not specified, the MAC address will be generated. + // +optional + MACAddress optional.String `json:"macAddress,omitempty"` + + // AllowedAddressPairs is a list of address pairs which Neutron will + // allow the port to send traffic from in addition to the port's + // addresses. If not specified, the MAC Address will be the MAC Address + // of the port. Depending on the configuration of Neutron, it may be + // supported to specify a CIDR instead of a specific IP address. + // +optional + AllowedAddressPairs []AddressPair `json:"allowedAddressPairs,omitempty"` + + // HostID specifies the ID of the host where the port resides. + // +optional + HostID optional.String `json:"hostID,omitempty"` + + // VNICType specifies the type of vNIC which this port should be + // attached to. This is used to determine which mechanism driver(s) to + // be used to bind the port. The valid values are normal, macvtap, + // direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + // remote-managed, although these values will not be validated in this + // API to ensure compatibility with future neutron changes or custom + // implementations. What type of vNIC is actually available depends on + // deployments. If not specified, the Neutron default value is used. + // +optional + VNICType optional.String `json:"vnicType,omitempty"` + + // Profile is a set of key-value pairs that are used for binding + // details. We intentionally don't expose this as a map[string]string + // because we only want to enable the users to set the values of the + // keys that are known to work in OpenStack Networking API. See + // https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + // To set profiles, your tenant needs permissions rule:create_port, and + // rule:create_port:binding:profile + // +optional + Profile *BindingProfile `json:"profile,omitempty"` + + // DisablePortSecurity enables or disables the port security when set. + // When not set, it takes the value of the corresponding field at the network level. + // +optional + DisablePortSecurity *bool `json:"disablePortSecurity,omitempty"` + + // PropageteUplinkStatus enables or disables the propagate uplink status on the port. + // +optional + PropagateUplinkStatus *bool `json:"propagateUplinkStatus,omitempty"` + + // Value specs are extra parameters to include in the API request with OpenStack. + // This is an extension point for the API, so what they do and if they are supported, + // depends on the specific OpenStack implementation. + // +optional + // +listType=map + // +listMapKey=name + ValueSpecs []ValueSpec `json:"valueSpecs,omitempty"` +} + +// ResolvedPortSpec is a PortOpts with all contained references fully resolved. +type ResolvedPortSpec struct { + // Name is the name of the port. + Name string `json:"name"` + + // Description is a human-readable description for the port. + Description string `json:"description"` + + // NetworkID is the ID of the network the port will be created in. + NetworkID string `json:"networkID"` + + // Tags applied to the port (and corresponding trunk, if a trunk is configured.) + // +listType=set + // +optional + Tags []string `json:"tags,omitempty"` + + // Trunk specifies whether trunking is enabled at the port level. + // +optional + Trunk optional.Bool `json:"trunk,omitempty"` + + // FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network. + // +optional + // +listType=atomic + FixedIPs []ResolvedFixedIP `json:"fixedIPs,omitempty"` + + // SecurityGroups is a list of security group IDs to assign to the port. + // +optional + // +listType=atomic + SecurityGroups []string `json:"securityGroups,omitempty"` + + ResolvedPortSpecFields `json:",inline"` +} + +type PortStatus struct { + // ID is the unique identifier of the port. + // +required + ID string `json:"id"` +} + +type BindingProfile struct { + // OVSHWOffload enables or disables the OVS hardware offload feature. + // This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + // See: https://bugs.launchpad.net/nova/+bug/2020813 + // +optional + OVSHWOffload *bool `json:"ovsHWOffload,omitempty"` + + // TrustedVF enables or disables the “trusted mode” for the VF. + // +optional + TrustedVF *bool `json:"trustedVF,omitempty"` +} + +type FixedIP struct { + // Subnet is an openstack subnet query that will return the id of a subnet to create + // the fixed IP of a port in. This query must not return more than one subnet. + // +optional + Subnet *SubnetParam `json:"subnet,omitempty"` + + // IPAddress is a specific IP address to assign to the port. If Subnet + // is also specified, IPAddress must be a valid IP address in the + // subnet. If Subnet is not specified, IPAddress must be a valid IP + // address in any subnet of the port's network. + // +optional + IPAddress optional.String `json:"ipAddress,omitempty"` +} + +// ResolvedFixedIP is a FixedIP with the Subnet resolved to an ID. +type ResolvedFixedIP struct { + // SubnetID is the id of a subnet to create the fixed IP of a port in. + // +optional + SubnetID optional.String `json:"subnet,omitempty"` + + // IPAddress is a specific IP address to assign to the port. If SubnetID + // is also specified, IPAddress must be a valid IP address in the + // subnet. If Subnet is not specified, IPAddress must be a valid IP + // address in any subnet of the port's network. + // +optional + IPAddress optional.String `json:"ipAddress,omitempty"` +} + +type AddressPair struct { + // IPAddress is the IP address of the allowed address pair. Depending on + // the configuration of Neutron, it may be supported to specify a CIDR + // instead of a specific IP address. + // +kubebuilder:validation:Required + IPAddress string `json:"ipAddress"` + + // MACAddress is the MAC address of the allowed address pair. If not + // specified, the MAC address will be the MAC address of the port. + // +optional + MACAddress optional.String `json:"macAddress,omitempty"` +} + +type BastionStatus struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + SSHKeyName string `json:"sshKeyName,omitempty"` + State InstanceState `json:"state,omitempty"` + IP string `json:"ip,omitempty"` + FloatingIP string `json:"floatingIP,omitempty"` + + // Resolved contains parts of the bastion's machine spec with all + // external references fully resolved. + // +optional + Resolved *ResolvedMachineSpec `json:"resolved,omitempty"` + + // Resources contains references to OpenStack resources created for the bastion. + // +optional + Resources *MachineResources `json:"resources,omitempty"` +} + +type RootVolume struct { + // SizeGiB is the size of the block device in gibibytes (GiB). + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum:=1 + SizeGiB int `json:"sizeGiB"` + + BlockDeviceVolume `json:",inline"` +} + +// BlockDeviceStorage is the storage type of a block device to create and +// contains additional storage options. +// +union +// +//nolint:godot +type BlockDeviceStorage struct { + // Type is the type of block device to create. + // This can be either "Volume" or "Local". + // +unionDiscriminator + Type BlockDeviceType `json:"type"` + + // Volume contains additional storage options for a volume block device. + // +optional + // +unionMember,optional + Volume *BlockDeviceVolume `json:"volume,omitempty"` +} + +// BlockDeviceVolume contains additional storage options for a volume block device. +type BlockDeviceVolume struct { + // Type is the Cinder volume type of the volume. + // If omitted, the default Cinder volume type that is configured in the OpenStack cloud + // will be used. + // +optional + Type string `json:"type,omitempty"` + + // AvailabilityZone is the volume availability zone to create the volume + // in. If not specified, the volume will be created without an explicit + // availability zone. + // +optional + AvailabilityZone *VolumeAvailabilityZone `json:"availabilityZone,omitempty"` +} + +// VolumeAZSource specifies where to obtain the availability zone for a volume. +// +kubebuilder:validation:Enum=Name;Machine +type VolumeAZSource string + +const ( + VolumeAZFromName VolumeAZSource = "Name" + VolumeAZFromMachine VolumeAZSource = "Machine" +) + +// VolumeAZName is the name of a volume availability zone. It may not contain spaces. +// +kubebuilder:validation:Pattern:="^[^ ]+$" +// +kubebuilder:validation:MinLength:=1 +type VolumeAZName string + +// VolumeAvailabilityZone specifies the availability zone for a volume. +// +kubebuilder:validation:XValidation:rule="!has(self.from) || self.from == 'Name' ? has(self.name) : !has(self.name)",message="name is required when from is 'Name' or default" +type VolumeAvailabilityZone struct { + // From specifies where we will obtain the availability zone for the + // volume. The options are "Name" and "Machine". If "Name" is specified + // then the Name field must also be specified. If "Machine" is specified + // the volume will use the value of FailureDomain, if any, from the + // associated Machine. + // +kubebuilder:default:=Name + // +optional + From VolumeAZSource `json:"from,omitempty"` + + // Name is the name of a volume availability zone to use. It is required + // if From is "Name". The volume availability zone name may not contain + // spaces. + // +optional + Name *VolumeAZName `json:"name,omitempty"` +} + +// AdditionalBlockDevice is a block device to attach to the server. +type AdditionalBlockDevice struct { + // Name of the block device in the context of a machine. + // If the block device is a volume, the Cinder volume will be named + // as a combination of the machine name and this name. + // Also, this name will be used for tagging the block device. + // Information about the block device tag can be obtained from the OpenStack + // metadata API or the config drive. + // Name cannot be 'root', which is reserved for the root volume. + // +kubebuilder:validation:Required + Name string `json:"name"` + + // SizeGiB is the size of the block device in gibibytes (GiB). + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum:=1 + SizeGiB int `json:"sizeGiB"` + + // Storage specifies the storage type of the block device and + // additional storage options. + Storage BlockDeviceStorage `json:"storage"` +} + +// ServerGroupParam specifies an OpenStack server group. It may be specified by ID or filter, but not both. +// +kubebuilder:validation:MaxProperties:=1 +// +kubebuilder:validation:MinProperties:=1 +type ServerGroupParam struct { + // ID is the ID of the server group to use. + // +kubebuilder:validation:Format:=uuid + ID optional.String `json:"id,omitempty"` + + // Filter specifies a query to select an OpenStack server group. If provided, it cannot be empty. + Filter *ServerGroupFilter `json:"filter,omitempty"` +} + +// ServerGroupFilter specifies a query to select an OpenStack server group. At least one property must be set. +// +kubebuilder:validation:MinProperties:=1 +type ServerGroupFilter struct { + // Name is the name of a server group to look for. + Name optional.String `json:"name,omitempty"` +} + +func (f *ServerGroupFilter) IsZero() bool { + if f == nil { + return true + } + return f.Name == nil +} + +// BlockDeviceType defines the type of block device to create. +type BlockDeviceType string + +const ( + // LocalBlockDevice is an ephemeral block device attached to the server. + LocalBlockDevice BlockDeviceType = "Local" + + // VolumeBlockDevice is a volume block device attached to the server. + VolumeBlockDevice BlockDeviceType = "Volume" +) + +// NetworkStatus contains basic information about an existing neutron network. +type NetworkStatus struct { + Name string `json:"name"` + ID string `json:"id"` + + //+optional + Tags []string `json:"tags,omitempty"` +} + +// NetworkStatusWithSubnets represents basic information about an existing neutron network and an associated set of subnets. +type NetworkStatusWithSubnets struct { + NetworkStatus `json:",inline"` + + // Subnets is a list of subnets associated with the default cluster network. Machines which use the default cluster network will get an address from all of these subnets. + Subnets []Subnet `json:"subnets,omitempty"` +} + +// Subnet represents basic information about the associated OpenStack Neutron Subnet. +type Subnet struct { + Name string `json:"name"` + ID string `json:"id"` + + CIDR string `json:"cidr"` + + //+optional + Tags []string `json:"tags,omitempty"` +} + +// Router represents basic information about the associated OpenStack Neutron Router. +type Router struct { + Name string `json:"name"` + ID string `json:"id"` + //+optional + Tags []string `json:"tags,omitempty"` + //+optional + IPs []string `json:"ips,omitempty"` +} + +// LoadBalancer represents basic information about the associated OpenStack LoadBalancer. +type LoadBalancer struct { + Name string `json:"name"` + ID string `json:"id"` + IP string `json:"ip"` + InternalIP string `json:"internalIP"` + //+optional + AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` + //+optional + Tags []string `json:"tags,omitempty"` + // LoadBalancerNetwork contains information about network and/or subnets which the + // loadbalancer is allocated on. + // If subnets are specified within the LoadBalancerNetwork currently only the first + // subnet in the list is taken into account. + // +optional + LoadBalancerNetwork *NetworkStatusWithSubnets `json:"loadBalancerNetwork,omitempty"` +} + +// SecurityGroupStatus represents the basic information of the associated +// OpenStack Neutron Security Group. +type SecurityGroupStatus struct { + // name of the security group + // +kubebuilder:validation:Required + Name string `json:"name"` + + // id of the security group + // +kubebuilder:validation:Required + ID string `json:"id"` +} + +// SecurityGroupRuleSpec represent the basic information of the associated OpenStack +// Security Group Role. +// For now this is only used for the allNodesSecurityGroupRules but when we add +// other security groups, we'll need to add a validation because +// Remote* fields are mutually exclusive. +type SecurityGroupRuleSpec struct { + // name of the security group rule. + // It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + // +kubebuilder:validation:Required + Name string `json:"name"` + + // description of the security group rule. + // +optional + Description *string `json:"description,omitempty"` + + // direction in which the security group rule is applied. The only values + // allowed are "ingress" or "egress". For a compute instance, an ingress + // security group rule is applied to incoming (ingress) traffic for that + // instance. An egress rule is applied to traffic leaving the instance. + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=ingress;egress + Direction string `json:"direction"` + + // etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + // ingress or egress rules. + // +kubebuilder:validation:Enum=IPv4;IPv6 + // +optional + EtherType *string `json:"etherType,omitempty"` + + // portRangeMin is a number in the range that is matched by the security group + // rule. If the protocol is TCP or UDP, this value must be less than or equal + // to the value of the portRangeMax attribute. + // +optional + PortRangeMin *int `json:"portRangeMin,omitempty"` + + // portRangeMax is a number in the range that is matched by the security group + // rule. The portRangeMin attribute constrains the portRangeMax attribute. + // +optional + PortRangeMax *int `json:"portRangeMax,omitempty"` + + // protocol is the protocol that is matched by the security group rule. + // +optional + Protocol *string `json:"protocol,omitempty"` + + // remoteGroupID is the remote group ID to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + // +optional + RemoteGroupID *string `json:"remoteGroupID,omitempty"` + + // remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + // +optional + RemoteIPPrefix *string `json:"remoteIPPrefix,omitempty"` + + // remoteManagedGroups is the remote managed groups to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + // +optional + RemoteManagedGroups []ManagedSecurityGroupName `json:"remoteManagedGroups,omitempty"` +} + +// +kubebuilder:validation:Enum=bastion;controlplane;worker +type ManagedSecurityGroupName string + +func (m ManagedSecurityGroupName) String() string { + return string(m) +} + +// InstanceState describes the state of an OpenStack instance. +type InstanceState string + +var ( + // InstanceStateBuild is the string representing an instance in a build state. + InstanceStateBuild = InstanceState("BUILD") + + // InstanceStateActive is the string representing an instance in an active state. + InstanceStateActive = InstanceState("ACTIVE") + + // InstanceStateError is the string representing an instance in an error state. + InstanceStateError = InstanceState("ERROR") + + // InstanceStateStopped is the string representing an instance in a stopped state. + InstanceStateStopped = InstanceState("STOPPED") + + // InstanceStateShutoff is the string representing an instance in a shutoff state. + InstanceStateShutoff = InstanceState("SHUTOFF") + + // InstanceStateDeleted is the string representing an instance in a deleted state. + InstanceStateDeleted = InstanceState("DELETED") + + // InstanceStateSoftDeleted is the string representing an instance in a soft-deleted state. + // This state occurs when OpenStack is configured with a reclaim_instance_interval > 0, + // allowing recovery of deleted instances within the reclaim period. + InstanceStateSoftDeleted = InstanceState("SOFT_DELETED") + + // InstanceStateUndefined is the string representing an undefined instance state. + InstanceStateUndefined = InstanceState("") +) + +// Bastion represents basic information about the bastion node. If you enable bastion, the spec has to be specified. +// +kubebuilder:validation:XValidation:rule="!self.enabled || has(self.spec)",message="spec is required if bastion is enabled" +type Bastion struct { + // Enabled means that bastion is enabled. The bastion is enabled by + // default if this field is not specified. Set this field to false to disable the + // bastion. + // + // It is not currently possible to remove the bastion from the cluster + // spec without first disabling it by setting this field to false and + // waiting until the bastion has been deleted. + // +kubebuilder:default:=true + // +optional + Enabled *bool `json:"enabled,omitempty"` + + // Spec for the bastion itself + Spec *OpenStackMachineSpec `json:"spec,omitempty"` + + // AvailabilityZone is the failure domain that will be used to create the Bastion Spec. + //+optional + AvailabilityZone optional.String `json:"availabilityZone,omitempty"` + + // FloatingIP which will be associated to the bastion machine. It's the IP address, not UUID. + // The floating IP should already exist and should not be associated with a port. If FIP of this address does not + // exist, CAPO will try to create it, but by default only OpenStack administrators have privileges to do so. + //+optional + //+kubebuilder:validation:Format:=ipv4 + FloatingIP optional.String `json:"floatingIP,omitempty"` +} + +func (b *Bastion) IsEnabled() bool { + if b == nil { + return false + } + return b.Enabled == nil || *b.Enabled +} + +type APIServerLoadBalancer struct { + // Enabled defines whether a load balancer should be created. This value + // defaults to true if an APIServerLoadBalancer is given. + // + // There is no reason to set this to false. To disable creation of the + // API server loadbalancer, omit the APIServerLoadBalancer field in the + // cluster spec instead. + // + // +kubebuilder:validation:Required + // +kubebuilder:default:=true + Enabled *bool `json:"enabled"` + + // AdditionalPorts adds additional tcp ports to the load balancer. + // +optional + // +listType=set + AdditionalPorts []int `json:"additionalPorts,omitempty"` + + // AllowedCIDRs restrict access to all API-Server listeners to the given address CIDRs. + // +optional + // +listType=set + AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` + + // Provider specifies name of a specific Octavia provider to use for the + // API load balancer. The Octavia default will be used if it is not + // specified. + // +optional + Provider optional.String `json:"provider,omitempty"` + + // Network defines which network should the load balancer be allocated on. + //+optional + Network *NetworkParam `json:"network,omitempty"` + + // Subnets define which subnets should the load balancer be allocated on. + // It is expected that subnets are located on the network specified in this resource. + // Only the first element is taken into account. + // +optional + // +listType=atomic + // kubebuilder:validation:MaxLength:=2 + Subnets []SubnetParam `json:"subnets,omitempty"` + + // AvailabilityZone is the failure domain that will be used to create the APIServerLoadBalancer Spec. + //+optional + AvailabilityZone optional.String `json:"availabilityZone,omitempty"` + + // Flavor is the flavor name that will be used to create the APIServerLoadBalancer Spec. + //+optional + Flavor optional.String `json:"flavor,omitempty"` + + // Monitor contains configuration for the load balancer health monitor. + //+optional + Monitor *APIServerLoadBalancerMonitor `json:"monitor,omitempty"` +} + +// APIServerLoadBalancerMonitor contains configuration for the load balancer health monitor. +type APIServerLoadBalancerMonitor struct { + // Delay is the time in seconds between sending probes to members. + //+optional + //+kubebuilder:validation:Minimum=0 + //+kubebuilder:default:10 + Delay int `json:"delay,omitempty"` + + // Timeout is the maximum time in seconds for a monitor to wait for a connection to be established before it times out. + //+optional + //+kubebuilder:validation:Minimum=0 + //+kubebuilder:default:5 + Timeout int `json:"timeout,omitempty"` + + // MaxRetries is the number of successful checks before changing the operating status of the member to ONLINE. + //+optional + //+kubebuilder:validation:Minimum=0 + //+kubebuilder:validation:Maximum=10 + //+kubebuilder:default:5 + MaxRetries int `json:"maxRetries,omitempty"` + + // MaxRetriesDown is the number of allowed check failures before changing the operating status of the member to ERROR. + //+optional + //+kubebuilder:validation:Minimum=1 + //+kubebuilder:validation:Maximum=10 + //+kubebuilder:default:3 + MaxRetriesDown int `json:"maxRetriesDown,omitempty"` +} + +func (s *APIServerLoadBalancer) IsZero() bool { + return s == nil || ((s.Enabled == nil || !*s.Enabled) && len(s.AdditionalPorts) == 0 && len(s.AllowedCIDRs) == 0 && ptr.Deref(s.Provider, "") == "") +} + +func (s *APIServerLoadBalancer) IsEnabled() bool { + // The CRD default value for Enabled is true, so if the field is nil, it should be considered as true. + return s != nil && (s.Enabled == nil || *s.Enabled) +} + +// ResolvedMachineSpec contains resolved references to resources required by the machine. +type ResolvedMachineSpec struct { + // ServerGroupID is the ID of the server group the machine should be added to and is calculated based on ServerGroupFilter. + // +optional + ServerGroupID string `json:"serverGroupID,omitempty"` + + // ImageID is the ID of the image to use for the machine and is calculated based on ImageFilter. + // +optional + ImageID string `json:"imageID,omitempty"` + + // FlavorID is the ID of the flavor to use. + // +optional + FlavorID string `json:"flavorID,omitempty"` + + // Ports is the fully resolved list of ports to create for the machine. + // +optional + Ports []ResolvedPortSpec `json:"ports,omitempty"` +} + +type MachineResources struct { + // Ports is the status of the ports created for the machine. + // +optional + Ports []PortStatus `json:"ports,omitempty"` +} + +// ValueSpec represents a single value_spec key-value pair. +type ValueSpec struct { + // Name is the name of the key-value pair. + // This is just for identifying the pair and will not be sent to the OpenStack API. + // +kubebuilder:validation:Required + Name string `json:"name"` + // Key is the key in the key-value pair. + // +kubebuilder:validation:Required + Key string `json:"key"` + // Value is the value in the key-value pair. + // +kubebuilder:validation:Required + Value string `json:"value"` +} + +// JoinTags joins a slice of tags into a comma separated list of tags. +func JoinTags(tags []NeutronTag) string { + var b strings.Builder + for i := range tags { + if i > 0 { + b.WriteString(",") + } + b.WriteString(string(tags[i])) + } + return b.String() +} diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go new file mode 100644 index 000000000..242e04a2c --- /dev/null +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -0,0 +1,1965 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta2 + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIServerLoadBalancer) DeepCopyInto(out *APIServerLoadBalancer) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.AdditionalPorts != nil { + in, out := &in.AdditionalPorts, &out.AdditionalPorts + *out = make([]int, len(*in)) + copy(*out, *in) + } + if in.AllowedCIDRs != nil { + in, out := &in.AllowedCIDRs, &out.AllowedCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Provider != nil { + in, out := &in.Provider, &out.Provider + *out = new(string) + **out = **in + } + if in.Network != nil { + in, out := &in.Network, &out.Network + *out = new(NetworkParam) + (*in).DeepCopyInto(*out) + } + if in.Subnets != nil { + in, out := &in.Subnets, &out.Subnets + *out = make([]SubnetParam, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.Flavor != nil { + in, out := &in.Flavor, &out.Flavor + *out = new(string) + **out = **in + } + if in.Monitor != nil { + in, out := &in.Monitor, &out.Monitor + *out = new(APIServerLoadBalancerMonitor) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerLoadBalancer. +func (in *APIServerLoadBalancer) DeepCopy() *APIServerLoadBalancer { + if in == nil { + return nil + } + out := new(APIServerLoadBalancer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIServerLoadBalancerMonitor) DeepCopyInto(out *APIServerLoadBalancerMonitor) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerLoadBalancerMonitor. +func (in *APIServerLoadBalancerMonitor) DeepCopy() *APIServerLoadBalancerMonitor { + if in == nil { + return nil + } + out := new(APIServerLoadBalancerMonitor) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AdditionalBlockDevice) DeepCopyInto(out *AdditionalBlockDevice) { + *out = *in + in.Storage.DeepCopyInto(&out.Storage) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalBlockDevice. +func (in *AdditionalBlockDevice) DeepCopy() *AdditionalBlockDevice { + if in == nil { + return nil + } + out := new(AdditionalBlockDevice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressPair) DeepCopyInto(out *AddressPair) { + *out = *in + if in.MACAddress != nil { + in, out := &in.MACAddress, &out.MACAddress + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressPair. +func (in *AddressPair) DeepCopy() *AddressPair { + if in == nil { + return nil + } + out := new(AddressPair) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationPool) DeepCopyInto(out *AllocationPool) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationPool. +func (in *AllocationPool) DeepCopy() *AllocationPool { + if in == nil { + return nil + } + out := new(AllocationPool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Bastion) DeepCopyInto(out *Bastion) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(OpenStackMachineSpec) + (*in).DeepCopyInto(*out) + } + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(string) + **out = **in + } + if in.FloatingIP != nil { + in, out := &in.FloatingIP, &out.FloatingIP + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bastion. +func (in *Bastion) DeepCopy() *Bastion { + if in == nil { + return nil + } + out := new(Bastion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BastionStatus) DeepCopyInto(out *BastionStatus) { + *out = *in + if in.Resolved != nil { + in, out := &in.Resolved, &out.Resolved + *out = new(ResolvedMachineSpec) + (*in).DeepCopyInto(*out) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(MachineResources) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BastionStatus. +func (in *BastionStatus) DeepCopy() *BastionStatus { + if in == nil { + return nil + } + out := new(BastionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BindingProfile) DeepCopyInto(out *BindingProfile) { + *out = *in + if in.OVSHWOffload != nil { + in, out := &in.OVSHWOffload, &out.OVSHWOffload + *out = new(bool) + **out = **in + } + if in.TrustedVF != nil { + in, out := &in.TrustedVF, &out.TrustedVF + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingProfile. +func (in *BindingProfile) DeepCopy() *BindingProfile { + if in == nil { + return nil + } + out := new(BindingProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlockDeviceStorage) DeepCopyInto(out *BlockDeviceStorage) { + *out = *in + if in.Volume != nil { + in, out := &in.Volume, &out.Volume + *out = new(BlockDeviceVolume) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceStorage. +func (in *BlockDeviceStorage) DeepCopy() *BlockDeviceStorage { + if in == nil { + return nil + } + out := new(BlockDeviceStorage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlockDeviceVolume) DeepCopyInto(out *BlockDeviceVolume) { + *out = *in + if in.AvailabilityZone != nil { + in, out := &in.AvailabilityZone, &out.AvailabilityZone + *out = new(VolumeAvailabilityZone) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceVolume. +func (in *BlockDeviceVolume) DeepCopy() *BlockDeviceVolume { + if in == nil { + return nil + } + out := new(BlockDeviceVolume) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInitialization) DeepCopyInto(out *ClusterInitialization) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitialization. +func (in *ClusterInitialization) DeepCopy() *ClusterInitialization { + if in == nil { + return nil + } + out := new(ClusterInitialization) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalRouterIPParam) DeepCopyInto(out *ExternalRouterIPParam) { + *out = *in + in.Subnet.DeepCopyInto(&out.Subnet) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalRouterIPParam. +func (in *ExternalRouterIPParam) DeepCopy() *ExternalRouterIPParam { + if in == nil { + return nil + } + out := new(ExternalRouterIPParam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FilterByNeutronTags) DeepCopyInto(out *FilterByNeutronTags) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.TagsAny != nil { + in, out := &in.TagsAny, &out.TagsAny + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.NotTags != nil { + in, out := &in.NotTags, &out.NotTags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.NotTagsAny != nil { + in, out := &in.NotTagsAny, &out.NotTagsAny + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterByNeutronTags. +func (in *FilterByNeutronTags) DeepCopy() *FilterByNeutronTags { + if in == nil { + return nil + } + out := new(FilterByNeutronTags) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FixedIP) DeepCopyInto(out *FixedIP) { + *out = *in + if in.Subnet != nil { + in, out := &in.Subnet, &out.Subnet + *out = new(SubnetParam) + (*in).DeepCopyInto(*out) + } + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FixedIP. +func (in *FixedIP) DeepCopy() *FixedIP { + if in == nil { + return nil + } + out := new(FixedIP) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageFilter) DeepCopyInto(out *ImageFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageFilter. +func (in *ImageFilter) DeepCopy() *ImageFilter { + if in == nil { + return nil + } + out := new(ImageFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageParam) DeepCopyInto(out *ImageParam) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(ImageFilter) + (*in).DeepCopyInto(*out) + } + if in.ImageRef != nil { + in, out := &in.ImageRef, &out.ImageRef + *out = new(ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageParam. +func (in *ImageParam) DeepCopy() *ImageParam { + if in == nil { + return nil + } + out := new(ImageParam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) { + *out = *in + if in.AllowedCIDRs != nil { + in, out := &in.AllowedCIDRs, &out.AllowedCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.LoadBalancerNetwork != nil { + in, out := &in.LoadBalancerNetwork, &out.LoadBalancerNetwork + *out = new(NetworkStatusWithSubnets) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. +func (in *LoadBalancer) DeepCopy() *LoadBalancer { + if in == nil { + return nil + } + out := new(LoadBalancer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineInitialization) DeepCopyInto(out *MachineInitialization) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineInitialization. +func (in *MachineInitialization) DeepCopy() *MachineInitialization { + if in == nil { + return nil + } + out := new(MachineInitialization) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineResources) DeepCopyInto(out *MachineResources) { + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]PortStatus, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineResources. +func (in *MachineResources) DeepCopy() *MachineResources { + if in == nil { + return nil + } + out := new(MachineResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSecurityGroups) DeepCopyInto(out *ManagedSecurityGroups) { + *out = *in + if in.AllNodesSecurityGroupRules != nil { + in, out := &in.AllNodesSecurityGroupRules, &out.AllNodesSecurityGroupRules + *out = make([]SecurityGroupRuleSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ControlPlaneNodesSecurityGroupRules != nil { + in, out := &in.ControlPlaneNodesSecurityGroupRules, &out.ControlPlaneNodesSecurityGroupRules + *out = make([]SecurityGroupRuleSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.WorkerNodesSecurityGroupRules != nil { + in, out := &in.WorkerNodesSecurityGroupRules, &out.WorkerNodesSecurityGroupRules + *out = make([]SecurityGroupRuleSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSecurityGroups. +func (in *ManagedSecurityGroups) DeepCopy() *ManagedSecurityGroups { + if in == nil { + return nil + } + out := new(ManagedSecurityGroups) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkFilter) DeepCopyInto(out *NetworkFilter) { + *out = *in + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkFilter. +func (in *NetworkFilter) DeepCopy() *NetworkFilter { + if in == nil { + return nil + } + out := new(NetworkFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkParam) DeepCopyInto(out *NetworkParam) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(NetworkFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkParam. +func (in *NetworkParam) DeepCopy() *NetworkParam { + if in == nil { + return nil + } + out := new(NetworkParam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus. +func (in *NetworkStatus) DeepCopy() *NetworkStatus { + if in == nil { + return nil + } + out := new(NetworkStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkStatusWithSubnets) DeepCopyInto(out *NetworkStatusWithSubnets) { + *out = *in + in.NetworkStatus.DeepCopyInto(&out.NetworkStatus) + if in.Subnets != nil { + in, out := &in.Subnets, &out.Subnets + *out = make([]Subnet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatusWithSubnets. +func (in *NetworkStatusWithSubnets) DeepCopy() *NetworkStatusWithSubnets { + if in == nil { + return nil + } + out := new(NetworkStatusWithSubnets) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeInfo) DeepCopyInto(out *NodeInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInfo. +func (in *NodeInfo) DeepCopy() *NodeInfo { + if in == nil { + return nil + } + out := new(NodeInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackCluster) DeepCopyInto(out *OpenStackCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackCluster. +func (in *OpenStackCluster) DeepCopy() *OpenStackCluster { + if in == nil { + return nil + } + out := new(OpenStackCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackCluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterList) DeepCopyInto(out *OpenStackClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterList. +func (in *OpenStackClusterList) DeepCopy() *OpenStackClusterList { + if in == nil { + return nil + } + out := new(OpenStackClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterSpec) DeepCopyInto(out *OpenStackClusterSpec) { + *out = *in + if in.ManagedSubnets != nil { + in, out := &in.ManagedSubnets, &out.ManagedSubnets + *out = make([]SubnetSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Router != nil { + in, out := &in.Router, &out.Router + *out = new(RouterParam) + (*in).DeepCopyInto(*out) + } + if in.Network != nil { + in, out := &in.Network, &out.Network + *out = new(NetworkParam) + (*in).DeepCopyInto(*out) + } + if in.Subnets != nil { + in, out := &in.Subnets, &out.Subnets + *out = make([]SubnetParam, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NetworkMTU != nil { + in, out := &in.NetworkMTU, &out.NetworkMTU + *out = new(int) + **out = **in + } + if in.ExternalRouterIPs != nil { + in, out := &in.ExternalRouterIPs, &out.ExternalRouterIPs + *out = make([]ExternalRouterIPParam, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExternalNetwork != nil { + in, out := &in.ExternalNetwork, &out.ExternalNetwork + *out = new(NetworkParam) + (*in).DeepCopyInto(*out) + } + if in.DisableExternalNetwork != nil { + in, out := &in.DisableExternalNetwork, &out.DisableExternalNetwork + *out = new(bool) + **out = **in + } + if in.APIServerLoadBalancer != nil { + in, out := &in.APIServerLoadBalancer, &out.APIServerLoadBalancer + *out = new(APIServerLoadBalancer) + (*in).DeepCopyInto(*out) + } + if in.DisableAPIServerFloatingIP != nil { + in, out := &in.DisableAPIServerFloatingIP, &out.DisableAPIServerFloatingIP + *out = new(bool) + **out = **in + } + if in.APIServerFloatingIP != nil { + in, out := &in.APIServerFloatingIP, &out.APIServerFloatingIP + *out = new(string) + **out = **in + } + if in.APIServerFixedIP != nil { + in, out := &in.APIServerFixedIP, &out.APIServerFixedIP + *out = new(string) + **out = **in + } + if in.APIServerPort != nil { + in, out := &in.APIServerPort, &out.APIServerPort + *out = new(uint16) + **out = **in + } + if in.ManagedSecurityGroups != nil { + in, out := &in.ManagedSecurityGroups, &out.ManagedSecurityGroups + *out = new(ManagedSecurityGroups) + (*in).DeepCopyInto(*out) + } + if in.DisablePortSecurity != nil { + in, out := &in.DisablePortSecurity, &out.DisablePortSecurity + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ControlPlaneEndpoint != nil { + in, out := &in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint + *out = new(corev1beta2.APIEndpoint) + **out = **in + } + if in.ControlPlaneAvailabilityZones != nil { + in, out := &in.ControlPlaneAvailabilityZones, &out.ControlPlaneAvailabilityZones + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ControlPlaneOmitAvailabilityZone != nil { + in, out := &in.ControlPlaneOmitAvailabilityZone, &out.ControlPlaneOmitAvailabilityZone + *out = new(bool) + **out = **in + } + if in.Bastion != nil { + in, out := &in.Bastion, &out.Bastion + *out = new(Bastion) + (*in).DeepCopyInto(*out) + } + out.IdentityRef = in.IdentityRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterSpec. +func (in *OpenStackClusterSpec) DeepCopy() *OpenStackClusterSpec { + if in == nil { + return nil + } + out := new(OpenStackClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterStatus) DeepCopyInto(out *OpenStackClusterStatus) { + *out = *in + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(ClusterInitialization) + **out = **in + } + if in.Network != nil { + in, out := &in.Network, &out.Network + *out = new(NetworkStatusWithSubnets) + (*in).DeepCopyInto(*out) + } + if in.ExternalNetwork != nil { + in, out := &in.ExternalNetwork, &out.ExternalNetwork + *out = new(NetworkStatus) + (*in).DeepCopyInto(*out) + } + if in.Router != nil { + in, out := &in.Router, &out.Router + *out = new(Router) + (*in).DeepCopyInto(*out) + } + if in.APIServerLoadBalancer != nil { + in, out := &in.APIServerLoadBalancer, &out.APIServerLoadBalancer + *out = new(LoadBalancer) + (*in).DeepCopyInto(*out) + } + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make([]corev1beta2.FailureDomain, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ControlPlaneSecurityGroup != nil { + in, out := &in.ControlPlaneSecurityGroup, &out.ControlPlaneSecurityGroup + *out = new(SecurityGroupStatus) + **out = **in + } + if in.WorkerSecurityGroup != nil { + in, out := &in.WorkerSecurityGroup, &out.WorkerSecurityGroup + *out = new(SecurityGroupStatus) + **out = **in + } + if in.BastionSecurityGroup != nil { + in, out := &in.BastionSecurityGroup, &out.BastionSecurityGroup + *out = new(SecurityGroupStatus) + **out = **in + } + if in.Bastion != nil { + in, out := &in.Bastion, &out.Bastion + *out = new(BastionStatus) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterStatus. +func (in *OpenStackClusterStatus) DeepCopy() *OpenStackClusterStatus { + if in == nil { + return nil + } + out := new(OpenStackClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterTemplate) DeepCopyInto(out *OpenStackClusterTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterTemplate. +func (in *OpenStackClusterTemplate) DeepCopy() *OpenStackClusterTemplate { + if in == nil { + return nil + } + out := new(OpenStackClusterTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackClusterTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterTemplateList) DeepCopyInto(out *OpenStackClusterTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackClusterTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterTemplateList. +func (in *OpenStackClusterTemplateList) DeepCopy() *OpenStackClusterTemplateList { + if in == nil { + return nil + } + out := new(OpenStackClusterTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackClusterTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterTemplateResource) DeepCopyInto(out *OpenStackClusterTemplateResource) { + *out = *in + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterTemplateResource. +func (in *OpenStackClusterTemplateResource) DeepCopy() *OpenStackClusterTemplateResource { + if in == nil { + return nil + } + out := new(OpenStackClusterTemplateResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterTemplateSpec) DeepCopyInto(out *OpenStackClusterTemplateSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterTemplateSpec. +func (in *OpenStackClusterTemplateSpec) DeepCopy() *OpenStackClusterTemplateSpec { + if in == nil { + return nil + } + out := new(OpenStackClusterTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackIdentityReference) DeepCopyInto(out *OpenStackIdentityReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackIdentityReference. +func (in *OpenStackIdentityReference) DeepCopy() *OpenStackIdentityReference { + if in == nil { + return nil + } + out := new(OpenStackIdentityReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachine) DeepCopyInto(out *OpenStackMachine) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachine. +func (in *OpenStackMachine) DeepCopy() *OpenStackMachine { + if in == nil { + return nil + } + out := new(OpenStackMachine) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackMachine) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineList) DeepCopyInto(out *OpenStackMachineList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackMachine, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineList. +func (in *OpenStackMachineList) DeepCopy() *OpenStackMachineList { + if in == nil { + return nil + } + out := new(OpenStackMachineList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackMachineList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineSpec) DeepCopyInto(out *OpenStackMachineSpec) { + *out = *in + if in.ProviderID != nil { + in, out := &in.ProviderID, &out.ProviderID + *out = new(string) + **out = **in + } + if in.Flavor != nil { + in, out := &in.Flavor, &out.Flavor + *out = new(string) + **out = **in + } + if in.FlavorID != nil { + in, out := &in.FlavorID, &out.FlavorID + *out = new(string) + **out = **in + } + in.Image.DeepCopyInto(&out.Image) + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]PortOpts, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]SecurityGroupParam, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ServerMetadata != nil { + in, out := &in.ServerMetadata, &out.ServerMetadata + *out = make([]ServerMetadata, len(*in)) + copy(*out, *in) + } + if in.ConfigDrive != nil { + in, out := &in.ConfigDrive, &out.ConfigDrive + *out = new(bool) + **out = **in + } + if in.RootVolume != nil { + in, out := &in.RootVolume, &out.RootVolume + *out = new(RootVolume) + (*in).DeepCopyInto(*out) + } + if in.AdditionalBlockDevices != nil { + in, out := &in.AdditionalBlockDevices, &out.AdditionalBlockDevices + *out = make([]AdditionalBlockDevice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ServerGroup != nil { + in, out := &in.ServerGroup, &out.ServerGroup + *out = new(ServerGroupParam) + (*in).DeepCopyInto(*out) + } + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(OpenStackIdentityReference) + **out = **in + } + if in.FloatingIPPoolRef != nil { + in, out := &in.FloatingIPPoolRef, &out.FloatingIPPoolRef + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } + if in.SchedulerHintAdditionalProperties != nil { + in, out := &in.SchedulerHintAdditionalProperties, &out.SchedulerHintAdditionalProperties + *out = make([]SchedulerHintAdditionalProperty, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineSpec. +func (in *OpenStackMachineSpec) DeepCopy() *OpenStackMachineSpec { + if in == nil { + return nil + } + out := new(OpenStackMachineSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineStatus) DeepCopyInto(out *OpenStackMachineStatus) { + *out = *in + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(MachineInitialization) + **out = **in + } + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]corev1.NodeAddress, len(*in)) + copy(*out, *in) + } + if in.InstanceState != nil { + in, out := &in.InstanceState, &out.InstanceState + *out = new(InstanceState) + **out = **in + } + if in.Resolved != nil { + in, out := &in.Resolved, &out.Resolved + *out = new(ResolvedMachineSpec) + (*in).DeepCopyInto(*out) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(MachineResources) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineStatus. +func (in *OpenStackMachineStatus) DeepCopy() *OpenStackMachineStatus { + if in == nil { + return nil + } + out := new(OpenStackMachineStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineTemplate) DeepCopyInto(out *OpenStackMachineTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplate. +func (in *OpenStackMachineTemplate) DeepCopy() *OpenStackMachineTemplate { + if in == nil { + return nil + } + out := new(OpenStackMachineTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackMachineTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineTemplateList) DeepCopyInto(out *OpenStackMachineTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackMachineTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplateList. +func (in *OpenStackMachineTemplateList) DeepCopy() *OpenStackMachineTemplateList { + if in == nil { + return nil + } + out := new(OpenStackMachineTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackMachineTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineTemplateResource) DeepCopyInto(out *OpenStackMachineTemplateResource) { + *out = *in + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplateResource. +func (in *OpenStackMachineTemplateResource) DeepCopy() *OpenStackMachineTemplateResource { + if in == nil { + return nil + } + out := new(OpenStackMachineTemplateResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineTemplateSpec) DeepCopyInto(out *OpenStackMachineTemplateSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplateSpec. +func (in *OpenStackMachineTemplateSpec) DeepCopy() *OpenStackMachineTemplateSpec { + if in == nil { + return nil + } + out := new(OpenStackMachineTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineTemplateStatus) DeepCopyInto(out *OpenStackMachineTemplateStatus) { + *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + out.NodeInfo = in.NodeInfo + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplateStatus. +func (in *OpenStackMachineTemplateStatus) DeepCopy() *OpenStackMachineTemplateStatus { + if in == nil { + return nil + } + out := new(OpenStackMachineTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortOpts) DeepCopyInto(out *PortOpts) { + *out = *in + if in.Network != nil { + in, out := &in.Network, &out.Network + *out = new(NetworkParam) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.NameSuffix != nil { + in, out := &in.NameSuffix, &out.NameSuffix + *out = new(string) + **out = **in + } + if in.FixedIPs != nil { + in, out := &in.FixedIPs, &out.FixedIPs + *out = make([]FixedIP, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]SecurityGroupParam, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Trunk != nil { + in, out := &in.Trunk, &out.Trunk + *out = new(bool) + **out = **in + } + in.ResolvedPortSpecFields.DeepCopyInto(&out.ResolvedPortSpecFields) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortOpts. +func (in *PortOpts) DeepCopy() *PortOpts { + if in == nil { + return nil + } + out := new(PortOpts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortStatus) DeepCopyInto(out *PortStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortStatus. +func (in *PortStatus) DeepCopy() *PortStatus { + if in == nil { + return nil + } + out := new(PortStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResolvedFixedIP) DeepCopyInto(out *ResolvedFixedIP) { + *out = *in + if in.SubnetID != nil { + in, out := &in.SubnetID, &out.SubnetID + *out = new(string) + **out = **in + } + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResolvedFixedIP. +func (in *ResolvedFixedIP) DeepCopy() *ResolvedFixedIP { + if in == nil { + return nil + } + out := new(ResolvedFixedIP) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResolvedMachineSpec) DeepCopyInto(out *ResolvedMachineSpec) { + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]ResolvedPortSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResolvedMachineSpec. +func (in *ResolvedMachineSpec) DeepCopy() *ResolvedMachineSpec { + if in == nil { + return nil + } + out := new(ResolvedMachineSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResolvedPortSpec) DeepCopyInto(out *ResolvedPortSpec) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Trunk != nil { + in, out := &in.Trunk, &out.Trunk + *out = new(bool) + **out = **in + } + if in.FixedIPs != nil { + in, out := &in.FixedIPs, &out.FixedIPs + *out = make([]ResolvedFixedIP, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.ResolvedPortSpecFields.DeepCopyInto(&out.ResolvedPortSpecFields) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResolvedPortSpec. +func (in *ResolvedPortSpec) DeepCopy() *ResolvedPortSpec { + if in == nil { + return nil + } + out := new(ResolvedPortSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResolvedPortSpecFields) DeepCopyInto(out *ResolvedPortSpecFields) { + *out = *in + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + if in.MACAddress != nil { + in, out := &in.MACAddress, &out.MACAddress + *out = new(string) + **out = **in + } + if in.AllowedAddressPairs != nil { + in, out := &in.AllowedAddressPairs, &out.AllowedAddressPairs + *out = make([]AddressPair, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HostID != nil { + in, out := &in.HostID, &out.HostID + *out = new(string) + **out = **in + } + if in.VNICType != nil { + in, out := &in.VNICType, &out.VNICType + *out = new(string) + **out = **in + } + if in.Profile != nil { + in, out := &in.Profile, &out.Profile + *out = new(BindingProfile) + (*in).DeepCopyInto(*out) + } + if in.DisablePortSecurity != nil { + in, out := &in.DisablePortSecurity, &out.DisablePortSecurity + *out = new(bool) + **out = **in + } + if in.PropagateUplinkStatus != nil { + in, out := &in.PropagateUplinkStatus, &out.PropagateUplinkStatus + *out = new(bool) + **out = **in + } + if in.ValueSpecs != nil { + in, out := &in.ValueSpecs, &out.ValueSpecs + *out = make([]ValueSpec, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResolvedPortSpecFields. +func (in *ResolvedPortSpecFields) DeepCopy() *ResolvedPortSpecFields { + if in == nil { + return nil + } + out := new(ResolvedPortSpecFields) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceReference) DeepCopyInto(out *ResourceReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReference. +func (in *ResourceReference) DeepCopy() *ResourceReference { + if in == nil { + return nil + } + out := new(ResourceReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RootVolume) DeepCopyInto(out *RootVolume) { + *out = *in + in.BlockDeviceVolume.DeepCopyInto(&out.BlockDeviceVolume) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootVolume. +func (in *RootVolume) DeepCopy() *RootVolume { + if in == nil { + return nil + } + out := new(RootVolume) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Router) DeepCopyInto(out *Router) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.IPs != nil { + in, out := &in.IPs, &out.IPs + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Router. +func (in *Router) DeepCopy() *Router { + if in == nil { + return nil + } + out := new(Router) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterFilter) DeepCopyInto(out *RouterFilter) { + *out = *in + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterFilter. +func (in *RouterFilter) DeepCopy() *RouterFilter { + if in == nil { + return nil + } + out := new(RouterFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterParam) DeepCopyInto(out *RouterParam) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(RouterFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterParam. +func (in *RouterParam) DeepCopy() *RouterParam { + if in == nil { + return nil + } + out := new(RouterParam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchedulerHintAdditionalProperty) DeepCopyInto(out *SchedulerHintAdditionalProperty) { + *out = *in + in.Value.DeepCopyInto(&out.Value) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerHintAdditionalProperty. +func (in *SchedulerHintAdditionalProperty) DeepCopy() *SchedulerHintAdditionalProperty { + if in == nil { + return nil + } + out := new(SchedulerHintAdditionalProperty) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchedulerHintAdditionalValue) DeepCopyInto(out *SchedulerHintAdditionalValue) { + *out = *in + if in.Bool != nil { + in, out := &in.Bool, &out.Bool + *out = new(bool) + **out = **in + } + if in.Number != nil { + in, out := &in.Number, &out.Number + *out = new(int) + **out = **in + } + if in.String != nil { + in, out := &in.String, &out.String + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerHintAdditionalValue. +func (in *SchedulerHintAdditionalValue) DeepCopy() *SchedulerHintAdditionalValue { + if in == nil { + return nil + } + out := new(SchedulerHintAdditionalValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupFilter) DeepCopyInto(out *SecurityGroupFilter) { + *out = *in + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupFilter. +func (in *SecurityGroupFilter) DeepCopy() *SecurityGroupFilter { + if in == nil { + return nil + } + out := new(SecurityGroupFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupParam) DeepCopyInto(out *SecurityGroupParam) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(SecurityGroupFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupParam. +func (in *SecurityGroupParam) DeepCopy() *SecurityGroupParam { + if in == nil { + return nil + } + out := new(SecurityGroupParam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleSpec) DeepCopyInto(out *SecurityGroupRuleSpec) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EtherType != nil { + in, out := &in.EtherType, &out.EtherType + *out = new(string) + **out = **in + } + if in.PortRangeMin != nil { + in, out := &in.PortRangeMin, &out.PortRangeMin + *out = new(int) + **out = **in + } + if in.PortRangeMax != nil { + in, out := &in.PortRangeMax, &out.PortRangeMax + *out = new(int) + **out = **in + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.RemoteGroupID != nil { + in, out := &in.RemoteGroupID, &out.RemoteGroupID + *out = new(string) + **out = **in + } + if in.RemoteIPPrefix != nil { + in, out := &in.RemoteIPPrefix, &out.RemoteIPPrefix + *out = new(string) + **out = **in + } + if in.RemoteManagedGroups != nil { + in, out := &in.RemoteManagedGroups, &out.RemoteManagedGroups + *out = make([]ManagedSecurityGroupName, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleSpec. +func (in *SecurityGroupRuleSpec) DeepCopy() *SecurityGroupRuleSpec { + if in == nil { + return nil + } + out := new(SecurityGroupRuleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupStatus) DeepCopyInto(out *SecurityGroupStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupStatus. +func (in *SecurityGroupStatus) DeepCopy() *SecurityGroupStatus { + if in == nil { + return nil + } + out := new(SecurityGroupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupFilter) DeepCopyInto(out *ServerGroupFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupFilter. +func (in *ServerGroupFilter) DeepCopy() *ServerGroupFilter { + if in == nil { + return nil + } + out := new(ServerGroupFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupParam) DeepCopyInto(out *ServerGroupParam) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(ServerGroupFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupParam. +func (in *ServerGroupParam) DeepCopy() *ServerGroupParam { + if in == nil { + return nil + } + out := new(ServerGroupParam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerMetadata) DeepCopyInto(out *ServerMetadata) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerMetadata. +func (in *ServerMetadata) DeepCopy() *ServerMetadata { + if in == nil { + return nil + } + out := new(ServerMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Subnet) DeepCopyInto(out *Subnet) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet. +func (in *Subnet) DeepCopy() *Subnet { + if in == nil { + return nil + } + out := new(Subnet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetFilter) DeepCopyInto(out *SubnetFilter) { + *out = *in + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetFilter. +func (in *SubnetFilter) DeepCopy() *SubnetFilter { + if in == nil { + return nil + } + out := new(SubnetFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetParam) DeepCopyInto(out *SubnetParam) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(SubnetFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetParam. +func (in *SubnetParam) DeepCopy() *SubnetParam { + if in == nil { + return nil + } + out := new(SubnetParam) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec) { + *out = *in + if in.DNSNameservers != nil { + in, out := &in.DNSNameservers, &out.DNSNameservers + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllocationPools != nil { + in, out := &in.AllocationPools, &out.AllocationPools + *out = make([]AllocationPool, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec. +func (in *SubnetSpec) DeepCopy() *SubnetSpec { + if in == nil { + return nil + } + out := new(SubnetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValueSpec) DeepCopyInto(out *ValueSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueSpec. +func (in *ValueSpec) DeepCopy() *ValueSpec { + if in == nil { + return nil + } + out := new(ValueSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeAvailabilityZone) DeepCopyInto(out *VolumeAvailabilityZone) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(VolumeAZName) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAvailabilityZone. +func (in *VolumeAvailabilityZone) DeepCopy() *VolumeAvailabilityZone { + if in == nil { + return nil + } + out := new(VolumeAvailabilityZone) + in.DeepCopyInto(out) + return out +} diff --git a/api_violations.report b/api_violations.report index baf94dfee..ec7217488 100644 --- a/api_violations.report +++ b/api_violations.report @@ -1,10 +1,12 @@ API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackFloatingIPPoolSpec,PreAllocatedFloatingIPs API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackFloatingIPPoolStatus,AvailableIPs API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackFloatingIPPoolStatus,ClaimedIPs +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackFloatingIPPoolStatus,Conditions API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackFloatingIPPoolStatus,FailedIPs API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackServerSpec,Ports API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackServerSpec,SecurityGroups API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackServerStatus,Addresses +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,OpenStackServerStatus,Conditions API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,ResolvedServerSpec,Ports API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1,ServerResources,Ports API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,LoadBalancer,AllowedCIDRs @@ -23,6 +25,26 @@ API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,Subnet,Tags API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetSpec,AllocationPools API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetSpec,DNSNameservers +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,LoadBalancer,AllowedCIDRs +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,LoadBalancer,Tags +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,MachineResources,Ports +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,NetworkStatus,Tags +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,NetworkStatusWithSubnets,Subnets +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackClusterStatus,Conditions +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackClusterStatus,FailureDomains +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineSpec,Ports +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineSpec,SecurityGroups +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineStatus,Addresses +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineStatus,Conditions +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,OpenStackMachineTemplateStatus,Conditions +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,ResolvedMachineSpec,Ports +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,ResolvedPortSpecFields,AllowedAddressPairs +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,Router,IPs +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,Router,Tags +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SecurityGroupRuleSpec,RemoteManagedGroups +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,Subnet,Tags +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SubnetSpec,AllocationPools +API rule violation: list_type_missing,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SubnetSpec,DNSNameservers API rule violation: list_type_missing,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterClassPatch,Definitions API rule violation: list_type_missing,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterClassSpec,Patches API rule violation: list_type_missing,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterClassSpec,Variables @@ -73,6 +95,12 @@ API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,RBDPool API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,RadosUser API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,CephFS API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,StorageOS +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,Format +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,d +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,i +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,Quantity,s +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,scale +API rule violation: names_match,k8s.io/apimachinery/pkg/api/resource,int64Amount,value API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object @@ -86,6 +114,10 @@ API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,Router,IPs API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetFilter,IPv6AddressMode API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetFilter,IPv6RAMode +API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,ResolvedFixedIP,SubnetID +API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,Router,IPs +API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SubnetFilter,IPv6AddressMode +API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2,SubnetFilter,IPv6RAMode API rule violation: names_match,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterClassStatus,V1Beta2 API rule violation: names_match,sigs.k8s.io/cluster-api/api/core/v1beta1,ClusterStatus,V1Beta2 API rule violation: names_match,sigs.k8s.io/cluster-api/api/core/v1beta1,JSONSchemaProps,XIntOrString diff --git a/cloudbuild-nightly.yaml b/cloudbuild-nightly.yaml index 1fef4a3b1..9c1b180ef 100644 --- a/cloudbuild-nightly.yaml +++ b/cloudbuild-nightly.yaml @@ -4,15 +4,15 @@ options: substitution_option: ALLOW_LOOSE machineType: 'N1_HIGHCPU_8' steps: - - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20250513-9264efb079' - entrypoint: make - env: - - DOCKER_CLI_EXPERIMENTAL=enabled - - TAG=$_GIT_TAG - - PULL_BASE_REF=$_PULL_BASE_REF - - DOCKER_BUILDKIT=1 - args: - - release-staging-nightly +- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:8d6a3a5b895e6776dbe9115b75db1412fbe57299b8db329d45cb54680e462b0b' # v20251211-4c812d4cd8 + entrypoint: make + env: + - DOCKER_CLI_EXPERIMENTAL=enabled + - TAG=$_GIT_TAG + - PULL_BASE_REF=$_PULL_BASE_REF + - DOCKER_BUILDKIT=1 + args: + - release-staging-nightly substitutions: # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and # can be used as a substitution diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 7e5314311..c4bc43f9f 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -8,7 +8,7 @@ steps: # docker run --rm -it -v $(pwd):/workspace gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:${TAG} # make clean # make sure we have something to build # make staging-manifests -- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20250513-9264efb079' +- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:8d6a3a5b895e6776dbe9115b75db1412fbe57299b8db329d45cb54680e462b0b' # v20251211-4c812d4cd8 entrypoint: make env: - DOCKER_CLI_EXPERIMENTAL=enabled diff --git a/cmd/models-schema/zz_generated.openapi.go b/cmd/models-schema/zz_generated.openapi.go index a6c2ea433..508668c8a 100644 --- a/cmd/models-schema/zz_generated.openapi.go +++ b/cmd/models-schema/zz_generated.openapi.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +23,10 @@ package main import ( v1 "k8s.io/api/core/v1" + resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + version "k8s.io/apimachinery/pkg/version" common "k8s.io/kube-openapi/pkg/common" spec "k8s.io/kube-openapi/pkg/validation/spec" v1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" @@ -32,289 +35,297 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), - "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), - "k8s.io/api/core/v1.AppArmorProfile": schema_k8sio_api_core_v1_AppArmorProfile(ref), - "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), - "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), - "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), - "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), - "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), - "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), - "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), - "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), - "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), - "k8s.io/api/core/v1.ClusterTrustBundleProjection": schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref), - "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), - "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), - "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), - "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), - "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), - "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), - "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), - "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), - "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), - "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), - "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), - "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), - "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), - "k8s.io/api/core/v1.ContainerResizePolicy": schema_k8sio_api_core_v1_ContainerResizePolicy(ref), - "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), - "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), - "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), - "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), - "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), - "k8s.io/api/core/v1.ContainerUser": schema_k8sio_api_core_v1_ContainerUser(ref), - "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), - "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), - "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), - "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), - "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), - "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), - "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), - "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), - "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), - "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), - "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), - "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), - "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), - "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), - "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), - "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), - "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), - "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), - "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), - "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), - "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), - "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), - "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), - "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), - "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), - "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), - "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), - "k8s.io/api/core/v1.HostIP": schema_k8sio_api_core_v1_HostIP(ref), - "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), - "k8s.io/api/core/v1.ImageVolumeSource": schema_k8sio_api_core_v1_ImageVolumeSource(ref), - "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), - "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), - "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), - "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), - "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), - "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), - "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), - "k8s.io/api/core/v1.LinuxContainerUser": schema_k8sio_api_core_v1_LinuxContainerUser(ref), - "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), - "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), - "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), - "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), - "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), - "k8s.io/api/core/v1.ModifyVolumeStatus": schema_k8sio_api_core_v1_ModifyVolumeStatus(ref), - "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), - "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), - "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), - "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), - "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), - "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), - "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), - "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), - "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), - "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), - "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), - "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), - "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), - "k8s.io/api/core/v1.NodeFeatures": schema_k8sio_api_core_v1_NodeFeatures(ref), - "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), - "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), - "k8s.io/api/core/v1.NodeRuntimeHandler": schema_k8sio_api_core_v1_NodeRuntimeHandler(ref), - "k8s.io/api/core/v1.NodeRuntimeHandlerFeatures": schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref), - "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), - "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), - "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), - "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), - "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), - "k8s.io/api/core/v1.NodeSwapStatus": schema_k8sio_api_core_v1_NodeSwapStatus(ref), - "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), - "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), - "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), - "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), - "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), - "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), - "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), - "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), - "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), - "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), - "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), - "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), - "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), - "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), - "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), - "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), - "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), - "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), - "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), - "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), - "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), - "k8s.io/api/core/v1.PodResourceClaim": schema_k8sio_api_core_v1_PodResourceClaim(ref), - "k8s.io/api/core/v1.PodResourceClaimStatus": schema_k8sio_api_core_v1_PodResourceClaimStatus(ref), - "k8s.io/api/core/v1.PodSchedulingGate": schema_k8sio_api_core_v1_PodSchedulingGate(ref), - "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), - "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), - "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), - "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), - "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), - "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), - "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), - "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), - "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), - "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), - "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), - "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), - "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), - "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), - "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), - "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), - "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), - "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), - "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), - "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), - "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), - "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), - "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), - "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), - "k8s.io/api/core/v1.ResourceClaim": schema_k8sio_api_core_v1_ResourceClaim(ref), - "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), - "k8s.io/api/core/v1.ResourceHealth": schema_k8sio_api_core_v1_ResourceHealth(ref), - "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), - "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), - "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), - "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), - "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), - "k8s.io/api/core/v1.ResourceStatus": schema_k8sio_api_core_v1_ResourceStatus(ref), - "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), - "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), - "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), - "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), - "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), - "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), - "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), - "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), - "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), - "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), - "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), - "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), - "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), - "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), - "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), - "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), - "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), - "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), - "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), - "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), - "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), - "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), - "k8s.io/api/core/v1.SleepAction": schema_k8sio_api_core_v1_SleepAction(ref), - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), - "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), - "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), - "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), - "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), - "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), - "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), - "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), - "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), - "k8s.io/api/core/v1.TypedObjectReference": schema_k8sio_api_core_v1_TypedObjectReference(ref), - "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), - "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), - "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), - "k8s.io/api/core/v1.VolumeMountStatus": schema_k8sio_api_core_v1_VolumeMountStatus(ref), - "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), - "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), - "k8s.io/api/core/v1.VolumeResourceRequirements": schema_k8sio_api_core_v1_VolumeResourceRequirements(ref), - "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), - "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), - "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement": schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + v1.Affinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Affinity(ref), + v1.AppArmorProfile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AppArmorProfile(ref), + v1.AttachedVolume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AttachedVolume(ref), + v1.AvoidPods{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AvoidPods(ref), + v1.AzureDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), + v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), + v1.AzureFileVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), + v1.Binding{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Binding(ref), + v1.CSIPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), + v1.CSIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CSIVolumeSource(ref), + v1.Capabilities{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Capabilities(ref), + v1.CephFSPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), + v1.CephFSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CephFSVolumeSource(ref), + v1.CinderPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), + v1.CinderVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CinderVolumeSource(ref), + v1.ClientIPConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ClientIPConfig(ref), + v1.ClusterTrustBundleProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref), + v1.ComponentCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentCondition(ref), + v1.ComponentStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentStatus(ref), + v1.ComponentStatusList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentStatusList(ref), + v1.ConfigMap{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMap(ref), + v1.ConfigMapEnvSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), + v1.ConfigMapKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), + v1.ConfigMapList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapList(ref), + v1.ConfigMapNodeConfigSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), + v1.ConfigMapProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapProjection(ref), + v1.ConfigMapVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), + v1.Container{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Container(ref), + v1.ContainerExtendedResourceRequest{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerExtendedResourceRequest(ref), + v1.ContainerImage{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerImage(ref), + v1.ContainerPort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerPort(ref), + v1.ContainerResizePolicy{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerResizePolicy(ref), + v1.ContainerRestartRule{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerRestartRule(ref), + v1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerRestartRuleOnExitCodes(ref), + v1.ContainerState{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerState(ref), + v1.ContainerStateRunning{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateRunning(ref), + v1.ContainerStateTerminated{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateTerminated(ref), + v1.ContainerStateWaiting{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateWaiting(ref), + v1.ContainerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStatus(ref), + v1.ContainerUser{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerUser(ref), + v1.DaemonEndpoint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DaemonEndpoint(ref), + v1.DownwardAPIProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIProjection(ref), + v1.DownwardAPIVolumeFile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), + v1.DownwardAPIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), + v1.EmptyDirVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), + v1.EndpointAddress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointAddress(ref), + v1.EndpointPort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointPort(ref), + v1.EndpointSubset{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointSubset(ref), + v1.Endpoints{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Endpoints(ref), + v1.EndpointsList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointsList(ref), + v1.EnvFromSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvFromSource(ref), + v1.EnvVar{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvVar(ref), + v1.EnvVarSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvVarSource(ref), + v1.EphemeralContainer{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralContainer(ref), + v1.EphemeralContainerCommon{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), + v1.EphemeralVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), + v1.Event{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Event(ref), + v1.EventList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventList(ref), + v1.EventSeries{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventSeries(ref), + v1.EventSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventSource(ref), + v1.ExecAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ExecAction(ref), + v1.FCVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FCVolumeSource(ref), + v1.FileKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FileKeySelector(ref), + v1.FlexPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), + v1.FlexVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlexVolumeSource(ref), + v1.FlockerVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlockerVolumeSource(ref), + v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + v1.GRPCAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GRPCAction(ref), + v1.GitRepoVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), + v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), + v1.GlusterfsVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), + v1.HTTPGetAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HTTPGetAction(ref), + v1.HTTPHeader{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HTTPHeader(ref), + v1.HostAlias{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostAlias(ref), + v1.HostIP{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostIP(ref), + v1.HostPathVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostPathVolumeSource(ref), + v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), + v1.ISCSIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), + v1.ImageVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ImageVolumeSource(ref), + v1.KeyToPath{}.OpenAPIModelName(): schema_k8sio_api_core_v1_KeyToPath(ref), + v1.Lifecycle{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Lifecycle(ref), + v1.LifecycleHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LifecycleHandler(ref), + v1.LimitRange{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRange(ref), + v1.LimitRangeItem{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeItem(ref), + v1.LimitRangeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeList(ref), + v1.LimitRangeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeSpec(ref), + v1.LinuxContainerUser{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LinuxContainerUser(ref), + v1.List{}.OpenAPIModelName(): schema_k8sio_api_core_v1_List(ref), + v1.LoadBalancerIngress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LoadBalancerIngress(ref), + v1.LoadBalancerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LoadBalancerStatus(ref), + v1.LocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LocalObjectReference(ref), + v1.LocalVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LocalVolumeSource(ref), + v1.ModifyVolumeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ModifyVolumeStatus(ref), + v1.NFSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NFSVolumeSource(ref), + v1.Namespace{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Namespace(ref), + v1.NamespaceCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceCondition(ref), + v1.NamespaceList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceList(ref), + v1.NamespaceSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceSpec(ref), + v1.NamespaceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceStatus(ref), + v1.Node{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Node(ref), + v1.NodeAddress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeAddress(ref), + v1.NodeAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeAffinity(ref), + v1.NodeCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeCondition(ref), + v1.NodeConfigSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeConfigSource(ref), + v1.NodeConfigStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeConfigStatus(ref), + v1.NodeDaemonEndpoints{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), + v1.NodeFeatures{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeFeatures(ref), + v1.NodeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeList(ref), + v1.NodeProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeProxyOptions(ref), + v1.NodeRuntimeHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeRuntimeHandler(ref), + v1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref), + v1.NodeSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelector(ref), + v1.NodeSelectorRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), + v1.NodeSelectorTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelectorTerm(ref), + v1.NodeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSpec(ref), + v1.NodeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeStatus(ref), + v1.NodeSwapStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSwapStatus(ref), + v1.NodeSystemInfo{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSystemInfo(ref), + v1.ObjectFieldSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ObjectFieldSelector(ref), + v1.ObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ObjectReference(ref), + v1.PersistentVolume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolume(ref), + v1.PersistentVolumeClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), + v1.PersistentVolumeClaimCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), + v1.PersistentVolumeClaimList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), + v1.PersistentVolumeClaimSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), + v1.PersistentVolumeClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), + v1.PersistentVolumeClaimTemplate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), + v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + v1.PersistentVolumeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeList(ref), + v1.PersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeSource(ref), + v1.PersistentVolumeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), + v1.PersistentVolumeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), + v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), + v1.Pod{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Pod(ref), + v1.PodAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAffinity(ref), + v1.PodAffinityTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAffinityTerm(ref), + v1.PodAntiAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAntiAffinity(ref), + v1.PodAttachOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAttachOptions(ref), + v1.PodCertificateProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodCertificateProjection(ref), + v1.PodCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodCondition(ref), + v1.PodDNSConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodDNSConfig(ref), + v1.PodDNSConfigOption{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodDNSConfigOption(ref), + v1.PodExecOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodExecOptions(ref), + v1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref), + v1.PodIP{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodIP(ref), + v1.PodList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodList(ref), + v1.PodLogOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodLogOptions(ref), + v1.PodOS{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodOS(ref), + v1.PodPortForwardOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodPortForwardOptions(ref), + v1.PodProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodProxyOptions(ref), + v1.PodReadinessGate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodReadinessGate(ref), + v1.PodResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodResourceClaim(ref), + v1.PodResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodResourceClaimStatus(ref), + v1.PodSchedulingGate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSchedulingGate(ref), + v1.PodSecurityContext{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSecurityContext(ref), + v1.PodSignature{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSignature(ref), + v1.PodSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSpec(ref), + v1.PodStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodStatus(ref), + v1.PodStatusResult{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodStatusResult(ref), + v1.PodTemplate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplate(ref), + v1.PodTemplateList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplateList(ref), + v1.PodTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplateSpec(ref), + v1.PortStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PortStatus(ref), + v1.PortworxVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PortworxVolumeSource(ref), + v1.PreferAvoidPodsEntry{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), + v1.PreferredSchedulingTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), + v1.Probe{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Probe(ref), + v1.ProbeHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ProbeHandler(ref), + v1.ProjectedVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), + v1.QuobyteVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), + v1.RBDPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), + v1.RBDVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RBDVolumeSource(ref), + v1.RangeAllocation{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RangeAllocation(ref), + v1.ReplicationController{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationController(ref), + v1.ReplicationControllerCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), + v1.ReplicationControllerList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerList(ref), + v1.ReplicationControllerSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), + v1.ReplicationControllerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), + v1.ResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceClaim(ref), + v1.ResourceFieldSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceFieldSelector(ref), + v1.ResourceHealth{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceHealth(ref), + v1.ResourceQuota{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuota(ref), + v1.ResourceQuotaList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaList(ref), + v1.ResourceQuotaSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), + v1.ResourceQuotaStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), + v1.ResourceRequirements{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceRequirements(ref), + v1.ResourceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceStatus(ref), + v1.SELinuxOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SELinuxOptions(ref), + v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), + v1.ScaleIOVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), + v1.ScopeSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScopeSelector(ref), + v1.ScopedResourceSelectorRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), + v1.SeccompProfile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SeccompProfile(ref), + v1.Secret{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Secret(ref), + v1.SecretEnvSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretEnvSource(ref), + v1.SecretKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretKeySelector(ref), + v1.SecretList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretList(ref), + v1.SecretProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretProjection(ref), + v1.SecretReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretReference(ref), + v1.SecretVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretVolumeSource(ref), + v1.SecurityContext{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecurityContext(ref), + v1.SerializedReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SerializedReference(ref), + v1.Service{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Service(ref), + v1.ServiceAccount{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccount(ref), + v1.ServiceAccountList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccountList(ref), + v1.ServiceAccountTokenProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), + v1.ServiceList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceList(ref), + v1.ServicePort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServicePort(ref), + v1.ServiceProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceProxyOptions(ref), + v1.ServiceSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceSpec(ref), + v1.ServiceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceStatus(ref), + v1.SessionAffinityConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SessionAffinityConfig(ref), + v1.SleepAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SleepAction(ref), + v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), + v1.StorageOSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), + v1.Sysctl{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Sysctl(ref), + v1.TCPSocketAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TCPSocketAction(ref), + v1.Taint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Taint(ref), + v1.Toleration{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Toleration(ref), + v1.TopologySelectorLabelRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), + v1.TopologySelectorTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySelectorTerm(ref), + v1.TopologySpreadConstraint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), + v1.TypedLocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), + v1.TypedObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TypedObjectReference(ref), + v1.Volume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Volume(ref), + v1.VolumeDevice{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeDevice(ref), + v1.VolumeMount{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeMount(ref), + v1.VolumeMountStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeMountStatus(ref), + v1.VolumeNodeAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), + v1.VolumeProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeProjection(ref), + v1.VolumeResourceRequirements{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeResourceRequirements(ref), + v1.VolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeSource(ref), + v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), + v1.WeightedPodAffinityTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), + v1.WindowsSecurityContextOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), + v1.WorkloadReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WorkloadReference(ref), + resource.Quantity{}.OpenAPIModelName(): schema_apimachinery_pkg_api_resource_Quantity(ref), + metav1.APIGroup{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroup(ref), + metav1.APIGroupList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroupList(ref), + metav1.APIResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResource(ref), + metav1.APIResourceList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResourceList(ref), + metav1.APIVersions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIVersions(ref), + metav1.ApplyOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ApplyOptions(ref), + metav1.Condition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Condition(ref), + metav1.CreateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_CreateOptions(ref), + metav1.DeleteOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_DeleteOptions(ref), + metav1.Duration{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Duration(ref), + metav1.FieldSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), + metav1.FieldsV1{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldsV1(ref), + metav1.GetOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GetOptions(ref), + metav1.GroupKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupKind(ref), + metav1.GroupResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupResource(ref), + metav1.GroupVersion{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersion(ref), + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + metav1.GroupVersionKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionKind(ref), + metav1.GroupVersionResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionResource(ref), + metav1.InternalEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_InternalEvent(ref), + metav1.LabelSelector{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelector(ref), + metav1.LabelSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + metav1.List{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_List(ref), + metav1.ListMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListMeta(ref), + metav1.ListOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListOptions(ref), + metav1.ManagedFieldsEntry{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + metav1.MicroTime{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_MicroTime(ref), + metav1.ObjectMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ObjectMeta(ref), + metav1.OwnerReference{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_OwnerReference(ref), + metav1.PartialObjectMetadata{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + metav1.PartialObjectMetadataList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + metav1.Patch{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Patch(ref), + metav1.PatchOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PatchOptions(ref), + metav1.Preconditions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Preconditions(ref), + metav1.RootPaths{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_RootPaths(ref), + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + metav1.Status{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Status(ref), + metav1.StatusCause{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusCause(ref), + metav1.StatusDetails{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusDetails(ref), + metav1.Table{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Table(ref), + metav1.TableColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + metav1.TableOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableOptions(ref), + metav1.TableRow{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRow(ref), + metav1.TableRowCondition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRowCondition(ref), + metav1.Time{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Time(ref), + metav1.Timestamp{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Timestamp(ref), + metav1.TypeMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TypeMeta(ref), + metav1.UpdateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_UpdateOptions(ref), + metav1.WatchEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_WatchEvent(ref), + runtime.RawExtension{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + runtime.TypeMeta{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + runtime.Unknown{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + version.Info{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_version_Info(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackClusterIdentity": schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClusterIdentity(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackClusterIdentityList": schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClusterIdentityList(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackClusterIdentitySpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClusterIdentitySpec(ref), @@ -339,18 +350,21 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BindingProfile(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BlockDeviceStorage": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceStorage(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BlockDeviceVolume": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceVolume(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ClusterInitialization": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ClusterInitialization(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ExternalRouterIPParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ExternalRouterIPParam(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.FilterByNeutronTags": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FilterByNeutronTags(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.FixedIP": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FixedIP(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageFilter(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageParam(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.LoadBalancer": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_LoadBalancer(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineInitialization": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_MachineInitialization(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineResources": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_MachineResources(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ManagedSecurityGroups": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ManagedSecurityGroups(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkFilter(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkParam(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatus(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatusWithSubnets(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NodeInfo": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NodeInfo(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackCluster": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluster(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterList": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterList(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterSpec(ref), @@ -368,6 +382,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateList": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateList(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateResource": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateResource(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateStatus(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortStatus(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedFixedIP": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedFixedIP(ref), @@ -394,6 +409,75 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetSpec(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ValueSpec(ref), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_VolumeAvailabilityZone(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.APIServerLoadBalancer": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_APIServerLoadBalancer(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.APIServerLoadBalancerMonitor": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_APIServerLoadBalancerMonitor(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AdditionalBlockDevice": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_AdditionalBlockDevice(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AddressPair": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_AddressPair(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AllocationPool": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_AllocationPool(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Bastion": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Bastion(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BastionStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BastionStatus(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BindingProfile": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BindingProfile(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BlockDeviceStorage": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BlockDeviceStorage(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BlockDeviceVolume": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BlockDeviceVolume(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ClusterInitialization": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ClusterInitialization(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ExternalRouterIPParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ExternalRouterIPParam(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.FilterByNeutronTags": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_FilterByNeutronTags(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.FixedIP": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_FixedIP(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ImageFilter(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ImageParam(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.LoadBalancer": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_LoadBalancer(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineInitialization": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_MachineInitialization(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineResources": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_MachineResources(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ManagedSecurityGroups": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ManagedSecurityGroups(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkFilter(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkParam(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkStatus(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatusWithSubnets": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkStatusWithSubnets(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NodeInfo": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NodeInfo(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackCluster": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackCluster(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterList": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterList(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterStatus(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplate": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplate(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplateList": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplateList(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplateResource": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplateResource(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplateSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplateSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackIdentityReference(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachine": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachine(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineList": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineList(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineStatus(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplate": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplate(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateList": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateList(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateResource": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateResource(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateStatus(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortOpts": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_PortOpts(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_PortStatus(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedFixedIP": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedFixedIP(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedMachineSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedMachineSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedPortSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedPortSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedPortSpecFields": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedPortSpecFields(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResourceReference": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResourceReference(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RootVolume": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_RootVolume(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Router": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Router(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RouterFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_RouterFilter(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RouterParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_RouterParam(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalProperty": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SchedulerHintAdditionalProperty(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalValue": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SchedulerHintAdditionalValue(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupFilter(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupParam(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupRuleSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupRuleSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupStatus": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupStatus(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ServerGroupFilter(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ServerGroupParam(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerMetadata": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ServerMetadata(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Subnet": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Subnet(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetFilter": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetFilter(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetParam(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ValueSpec": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ValueSpec(ref), + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.VolumeAvailabilityZone": schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_VolumeAvailabilityZone(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint": schema_cluster_api_api_core_v1beta1_APIEndpoint(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap": schema_cluster_api_api_core_v1beta1_Bootstrap(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster": schema_cluster_api_api_core_v1beta1_Cluster(ref), @@ -405,6 +489,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus": schema_cluster_api_api_core_v1beta1_ClusterClassStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariable": schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariable(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariableDefinition": schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariableDefinition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassUpgrade": schema_cluster_api_api_core_v1beta1_ClusterClassUpgrade(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassUpgradeExternal": schema_cluster_api_api_core_v1beta1_ClusterClassUpgradeExternal(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassV1Beta2Status": schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable": schema_cluster_api_api_core_v1beta1_ClusterClassVariable(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata": schema_cluster_api_api_core_v1beta1_ClusterClassVariableMetadata(ref), @@ -419,6 +505,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass": schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy": schema_cluster_api_api_core_v1beta1_ControlPlaneClassNamingStrategy(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology": schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopologyRolloutSpec": schema_cluster_api_api_core_v1beta1_ControlPlaneTopologyRolloutSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables": schema_cluster_api_api_core_v1beta1_ControlPlaneVariables(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ExternalPatchDefinition": schema_cluster_api_api_core_v1beta1_ExternalPatchDefinition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec": schema_cluster_api_api_core_v1beta1_FailureDomainSpec(ref), @@ -439,6 +526,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus": schema_cluster_api_api_core_v1beta1_MachineDeploymentStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy": schema_cluster_api_api_core_v1beta1_MachineDeploymentStrategy(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopology": schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopologyRolloutSpec": schema_cluster_api_api_core_v1beta1_MachineDeploymentTopologyRolloutSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineDeploymentV1Beta2Status(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables": schema_cluster_api_api_core_v1beta1_MachineDeploymentVariables(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule": schema_cluster_api_api_core_v1beta1_MachineDrainRule(ref), @@ -475,6 +563,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineSetV1Beta2Status(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec": schema_cluster_api_api_core_v1beta1_MachineSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus": schema_cluster_api_api_core_v1beta1_MachineStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint": schema_cluster_api_api_core_v1beta1_MachineTaint(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec": schema_cluster_api_api_core_v1beta1_MachineTemplateSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineV1Beta2Status(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges": schema_cluster_api_api_core_v1beta1_NetworkRanges(ref), @@ -487,6 +576,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta1.RemediationStrategy": schema_cluster_api_api_core_v1beta1_RemediationStrategy(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.Topology": schema_cluster_api_api_core_v1beta1_Topology(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition": schema_cluster_api_api_core_v1beta1_UnhealthyCondition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyMachineCondition": schema_cluster_api_api_core_v1beta1_UnhealthyMachineCondition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.ValidationRule": schema_cluster_api_api_core_v1beta1_ValidationRule(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema": schema_cluster_api_api_core_v1beta1_VariableSchema(ref), "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchemaMetadata": schema_cluster_api_api_core_v1beta1_VariableSchemaMetadata(ref), @@ -507,6 +597,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariable": schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariable(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariableDefinition": schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariableDefinition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassTemplateReference": schema_cluster_api_api_core_v1beta2_ClusterClassTemplateReference(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgrade": schema_cluster_api_api_core_v1beta2_ClusterClassUpgrade(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgradeExternal": schema_cluster_api_api_core_v1beta2_ClusterClassUpgradeExternal(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable": schema_cluster_api_api_core_v1beta2_ClusterClassVariable(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariableMetadata": schema_cluster_api_api_core_v1beta2_ClusterClassVariableMetadata(ref), @@ -535,6 +627,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheckRemediation": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyHealthCheckRemediation(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheckRemediationTriggerIf": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyHealthCheckRemediationTriggerIf(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyMachineDeletionSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyRolloutSpec": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyRolloutSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables": schema_cluster_api_api_core_v1beta2_ControlPlaneVariables(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ExternalPatchDefinition": schema_cluster_api_api_core_v1beta2_ExternalPatchDefinition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain": schema_cluster_api_api_core_v1beta2_FailureDomain(ref), @@ -626,6 +719,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineSetV1Beta1DeprecatedStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec": schema_cluster_api_api_core_v1beta2_MachineSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineStatus": schema_cluster_api_api_core_v1beta2_MachineStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint": schema_cluster_api_api_core_v1beta2_MachineTaint(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec": schema_cluster_api_api_core_v1beta2_MachineTemplateSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineV1Beta1DeprecatedStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.NetworkRanges": schema_cluster_api_api_core_v1beta2_NetworkRanges(ref), @@ -636,6 +730,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachineDeploymentClass": schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachineDeploymentClass(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachinePoolClass": schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachinePoolClass(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.Topology": schema_cluster_api_api_core_v1beta2_Topology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition": schema_cluster_api_api_core_v1beta2_UnhealthyMachineCondition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition": schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ValidationRule": schema_cluster_api_api_core_v1beta2_ValidationRule(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchema": schema_cluster_api_api_core_v1beta2_VariableSchema(ref), @@ -699,26 +794,26 @@ func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.Open "nodeAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes node affinity scheduling rules for the pod.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), + Ref: ref(v1.NodeAffinity{}.OpenAPIModelName()), }, }, "podAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAffinity"), + Ref: ref(v1.PodAffinity{}.OpenAPIModelName()), }, }, "podAntiAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), + Ref: ref(v1.PodAntiAffinity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, + v1.NodeAffinity{}.OpenAPIModelName(), v1.PodAffinity{}.OpenAPIModelName(), v1.PodAntiAffinity{}.OpenAPIModelName()}, } } @@ -814,7 +909,7 @@ func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), + Ref: ref(v1.PreferAvoidPodsEntry{}.OpenAPIModelName()), }, }, }, @@ -824,7 +919,7 @@ func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, + v1.PreferAvoidPodsEntry{}.OpenAPIModelName()}, } } @@ -998,14 +1093,14 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "The target object that you want to bind to the standard object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -1013,7 +1108,7 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1073,31 +1168,31 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall "controllerPublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "nodeStageSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "nodePublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "controllerExpandSecretRef": { SchemaProps: spec.SchemaProps{ Description: "controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "nodeExpandSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, }, @@ -1105,7 +1200,7 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -1157,7 +1252,7 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm "nodePublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -1165,7 +1260,7 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -1273,7 +1368,7 @@ func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceC "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -1288,7 +1383,7 @@ func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -1343,7 +1438,7 @@ func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) c "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -1358,7 +1453,7 @@ func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -1394,7 +1489,7 @@ func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceC "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, }, @@ -1402,7 +1497,7 @@ func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -1438,7 +1533,7 @@ func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) c "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -1446,7 +1541,7 @@ func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -1494,7 +1589,7 @@ func schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref common.ReferenceC "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as \"match nothing\". If set but empty, interpreted as \"match everything\".", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "optional": { @@ -1517,7 +1612,7 @@ func schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -1590,7 +1685,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "conditions": { @@ -1611,7 +1706,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + Ref: ref(v1.ComponentCondition{}.OpenAPIModelName()), }, }, }, @@ -1621,7 +1716,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ComponentCondition{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1650,7 +1745,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -1661,7 +1756,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), + Ref: ref(v1.ComponentStatus{}.OpenAPIModelName()), }, }, }, @@ -1672,7 +1767,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ComponentStatus{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -1701,7 +1796,7 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "immutable": { @@ -1746,7 +1841,7 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1845,7 +1940,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -1856,7 +1951,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ConfigMap"), + Ref: ref(v1.ConfigMap{}.OpenAPIModelName()), }, }, }, @@ -1867,7 +1962,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ConfigMap{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -1951,7 +2046,7 @@ func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -1968,7 +2063,7 @@ func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -2000,7 +2095,7 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -2024,7 +2119,7 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -2116,7 +2211,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(v1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -2129,13 +2224,13 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Description: "List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(v1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -2159,7 +2254,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(v1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -2169,7 +2264,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -2179,13 +2274,13 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Resources resize policy for the container.", + Description: "Resources resize policy for the container. This field cannot be set on ephemeral containers.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(v1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -2193,11 +2288,30 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, "restartPolicy": { SchemaProps: spec.SchemaProps{ - Description: "RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.", + Description: "RestartPolicy defines the restart behavior of individual containers in a pod. This overrides the pod-level restart policy. When this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Additionally, setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.", Type: []string{"string"}, Format: "", }, }, + "restartPolicyRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents a list of rules to be checked to determine if the container should be restarted on exit. The rules are evaluated in order. Once a rule matches a container exit condition, the remaining rules are ignored. If no rule matches the container exit condition, the Container-level restart policy determines the whether the container is restarted or not. Constraints on the rules: - At most 20 rules are allowed. - Rules can have the same action. - Identical rules are not forbidden in validations. When rules are specified, container MUST set RestartPolicy explicitly even it if matches the Pod's RestartPolicy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerRestartRule{}.OpenAPIModelName()), + }, + }, + }, + }, + }, "volumeMounts": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -2216,7 +2330,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(v1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -2240,7 +2354,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(v1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -2249,25 +2363,25 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(v1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -2296,7 +2410,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(v1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -2325,7 +2439,45 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + v1.ContainerPort{}.OpenAPIModelName(), v1.ContainerResizePolicy{}.OpenAPIModelName(), v1.ContainerRestartRule{}.OpenAPIModelName(), v1.EnvFromSource{}.OpenAPIModelName(), v1.EnvVar{}.OpenAPIModelName(), v1.Lifecycle{}.OpenAPIModelName(), v1.Probe{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.SecurityContext{}.OpenAPIModelName(), v1.VolumeDevice{}.OpenAPIModelName(), v1.VolumeMount{}.OpenAPIModelName()}, + } +} + +func schema_k8sio_api_core_v1_ContainerExtendedResourceRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerExtendedResourceRequest has the mapping of container name, extended resource name to the device request name.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "containerName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the container requesting resources.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the extended resource in that container which gets backed by DRA.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "requestName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the request in the special ResourceClaim which corresponds to the extended resource.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"containerName", "resourceName", "requestName"}, + }, + }, } } @@ -2451,6 +2603,76 @@ func schema_k8sio_api_core_v1_ContainerResizePolicy(ref common.ReferenceCallback } } +func schema_k8sio_api_core_v1_ContainerRestartRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerRestartRule describes how a container exit is handled.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "action": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "exitCodes": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the exit codes to check on container exits.", + Ref: ref(v1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName()), + }, + }, + }, + Required: []string{"action"}, + }, + }, + Dependencies: []string{ + v1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName()}, + } +} + +func schema_k8sio_api_core_v1_ContainerRestartRuleOnExitCodes(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerRestartRuleOnExitCodes describes the condition for handling an exited container based on its exit codes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the relationship between the container exit code(s) and the specified values. Possible values are: - In: the requirement is satisfied if the container exit code is in the\n set of specified values.\n- NotIn: the requirement is satisfied if the container exit code is\n not in the set of specified values.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Specifies the set of values to check for container exit codes. At most 255 elements are allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + Required: []string{"operator"}, + }, + }, + } +} + func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -2461,26 +2683,26 @@ func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) commo "waiting": { SchemaProps: spec.SchemaProps{ Description: "Details about a waiting container", - Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), + Ref: ref(v1.ContainerStateWaiting{}.OpenAPIModelName()), }, }, "running": { SchemaProps: spec.SchemaProps{ Description: "Details about a running container", - Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), + Ref: ref(v1.ContainerStateRunning{}.OpenAPIModelName()), }, }, "terminated": { SchemaProps: spec.SchemaProps{ Description: "Details about a terminated container", - Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), + Ref: ref(v1.ContainerStateTerminated{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, + v1.ContainerStateRunning{}.OpenAPIModelName(), v1.ContainerStateTerminated{}.OpenAPIModelName(), v1.ContainerStateWaiting{}.OpenAPIModelName()}, } } @@ -2494,14 +2716,14 @@ func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container was last (re-)started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -2544,13 +2766,13 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which previous execution of the container started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "finishedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container last terminated", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "containerID": { @@ -2565,7 +2787,7 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -2615,14 +2837,14 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "State holds details about the container's current condition.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + Ref: ref(v1.ContainerState{}.OpenAPIModelName()), }, }, "lastState": { SchemaProps: spec.SchemaProps{ Description: "LastTerminationState holds the last termination state of the container to help debug container crashes and restarts. This field is not populated if the container is still running and RestartCount is 0.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + Ref: ref(v1.ContainerState{}.OpenAPIModelName()), }, }, "ready": { @@ -2679,7 +2901,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -2688,7 +2910,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized.", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "volumeMounts": { @@ -2709,7 +2931,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMountStatus"), + Ref: ref(v1.VolumeMountStatus{}.OpenAPIModelName()), }, }, }, @@ -2718,7 +2940,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "user": { SchemaProps: spec.SchemaProps{ Description: "User represents user identity information initially attached to the first process of the container", - Ref: ref("k8s.io/api/core/v1.ContainerUser"), + Ref: ref(v1.ContainerUser{}.OpenAPIModelName()), }, }, "allocatedResourcesStatus": { @@ -2739,7 +2961,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceStatus"), + Ref: ref(v1.ResourceStatus{}.OpenAPIModelName()), }, }, }, @@ -2758,7 +2980,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerState", "k8s.io/api/core/v1.ContainerUser", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.ResourceStatus", "k8s.io/api/core/v1.VolumeMountStatus", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ContainerState{}.OpenAPIModelName(), v1.ContainerUser{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.ResourceStatus{}.OpenAPIModelName(), v1.VolumeMountStatus{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -2772,14 +2994,14 @@ func schema_k8sio_api_core_v1_ContainerUser(ref common.ReferenceCallback) common "linux": { SchemaProps: spec.SchemaProps{ Description: "Linux holds user identity information initially attached to the first process of the containers in Linux. Note that the actual running identity can be changed if the process has enough privilege to do so.", - Ref: ref("k8s.io/api/core/v1.LinuxContainerUser"), + Ref: ref(v1.LinuxContainerUser{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LinuxContainerUser"}, + v1.LinuxContainerUser{}.OpenAPIModelName()}, } } @@ -2825,7 +3047,7 @@ func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Ref: ref(v1.DownwardAPIVolumeFile{}.OpenAPIModelName()), }, }, }, @@ -2835,7 +3057,7 @@ func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + v1.DownwardAPIVolumeFile{}.OpenAPIModelName()}, } } @@ -2857,13 +3079,13 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback "fieldRef": { SchemaProps: spec.SchemaProps{ Description: "Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + Ref: ref(v1.ObjectFieldSelector{}.OpenAPIModelName()), }, }, "resourceFieldRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + Ref: ref(v1.ResourceFieldSelector{}.OpenAPIModelName()), }, }, "mode": { @@ -2878,7 +3100,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, + v1.ObjectFieldSelector{}.OpenAPIModelName(), v1.ResourceFieldSelector{}.OpenAPIModelName()}, } } @@ -2902,7 +3124,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Ref: ref(v1.DownwardAPIVolumeFile{}.OpenAPIModelName()), }, }, }, @@ -2919,7 +3141,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + v1.DownwardAPIVolumeFile{}.OpenAPIModelName()}, } } @@ -2940,14 +3162,14 @@ func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) "sizeLimit": { SchemaProps: spec.SchemaProps{ Description: "sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -2983,7 +3205,7 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm "targetRef": { SchemaProps: spec.SchemaProps{ Description: "Reference to object providing the endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -2996,7 +3218,7 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -3069,7 +3291,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Ref: ref(v1.EndpointAddress{}.OpenAPIModelName()), }, }, }, @@ -3088,7 +3310,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Ref: ref(v1.EndpointAddress{}.OpenAPIModelName()), }, }, }, @@ -3107,7 +3329,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointPort"), + Ref: ref(v1.EndpointPort{}.OpenAPIModelName()), }, }, }, @@ -3117,7 +3339,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, + v1.EndpointAddress{}.OpenAPIModelName(), v1.EndpointPort{}.OpenAPIModelName()}, } } @@ -3146,7 +3368,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subsets": { @@ -3162,7 +3384,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + Ref: ref(v1.EndpointSubset{}.OpenAPIModelName()), }, }, }, @@ -3172,7 +3394,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.EndpointSubset{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -3201,7 +3423,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -3212,7 +3434,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Endpoints"), + Ref: ref(v1.Endpoints{}.OpenAPIModelName()), }, }, }, @@ -3223,7 +3445,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Endpoints{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3236,7 +3458,7 @@ func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common Properties: map[string]spec.Schema{ "prefix": { SchemaProps: spec.SchemaProps{ - Description: "Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER.", + Description: "Optional text to prepend to the name of each environment variable. May consist of any printable ASCII characters except '='.", Type: []string{"string"}, Format: "", }, @@ -3244,20 +3466,20 @@ func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common "configMapRef": { SchemaProps: spec.SchemaProps{ Description: "The ConfigMap to select from", - Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), + Ref: ref(v1.ConfigMapEnvSource{}.OpenAPIModelName()), }, }, "secretRef": { SchemaProps: spec.SchemaProps{ Description: "The Secret to select from", - Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), + Ref: ref(v1.SecretEnvSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, + v1.ConfigMapEnvSource{}.OpenAPIModelName(), v1.SecretEnvSource{}.OpenAPIModelName()}, } } @@ -3270,7 +3492,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - 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 '='.", Default: "", Type: []string{"string"}, Format: "", @@ -3286,7 +3508,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP "valueFrom": { SchemaProps: spec.SchemaProps{ Description: "Source for the environment variable's value. Cannot be used if value is not empty.", - Ref: ref("k8s.io/api/core/v1.EnvVarSource"), + Ref: ref(v1.EnvVarSource{}.OpenAPIModelName()), }, }, }, @@ -3294,7 +3516,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EnvVarSource"}, + v1.EnvVarSource{}.OpenAPIModelName()}, } } @@ -3308,32 +3530,38 @@ func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common. "fieldRef": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + Ref: ref(v1.ObjectFieldSelector{}.OpenAPIModelName()), }, }, "resourceFieldRef": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + Ref: ref(v1.ResourceFieldSelector{}.OpenAPIModelName()), }, }, "configMapKeyRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a key of a ConfigMap.", - Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), + Ref: ref(v1.ConfigMapKeySelector{}.OpenAPIModelName()), }, }, "secretKeyRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a key of a secret in the pod's namespace", - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), + Ref: ref(v1.SecretKeySelector{}.OpenAPIModelName()), + }, + }, + "fileKeyRef": { + SchemaProps: spec.SchemaProps{ + Description: "FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.", + Ref: ref(v1.FileKeySelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, + v1.ConfigMapKeySelector{}.OpenAPIModelName(), v1.FileKeySelector{}.OpenAPIModelName(), v1.ObjectFieldSelector{}.OpenAPIModelName(), v1.ResourceFieldSelector{}.OpenAPIModelName(), v1.SecretKeySelector{}.OpenAPIModelName()}, } } @@ -3425,7 +3653,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(v1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -3438,13 +3666,13 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, }, SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Description: "List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(v1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -3468,7 +3696,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(v1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -3478,7 +3706,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -3494,7 +3722,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(v1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -3502,11 +3730,30 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "restartPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.", + Description: "Restart policy for the container to manage the restart behavior of each container within a pod. You cannot set this field on ephemeral containers.", Type: []string{"string"}, Format: "", }, }, + "restartPolicyRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents a list of rules to be checked to determine if the container should be restarted on exit. You cannot set this field on ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerRestartRule{}.OpenAPIModelName()), + }, + }, + }, + }, + }, "volumeMounts": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -3525,7 +3772,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(v1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -3549,7 +3796,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(v1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -3558,25 +3805,25 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(v1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -3605,7 +3852,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "securityContext": { SchemaProps: spec.SchemaProps{ Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(v1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -3641,7 +3888,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + v1.ContainerPort{}.OpenAPIModelName(), v1.ContainerResizePolicy{}.OpenAPIModelName(), v1.ContainerRestartRule{}.OpenAPIModelName(), v1.EnvFromSource{}.OpenAPIModelName(), v1.EnvVar{}.OpenAPIModelName(), v1.Lifecycle{}.OpenAPIModelName(), v1.Probe{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.SecurityContext{}.OpenAPIModelName(), v1.VolumeDevice{}.OpenAPIModelName(), v1.VolumeMount{}.OpenAPIModelName()}, } } @@ -3733,7 +3980,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(v1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -3746,13 +3993,13 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, }, SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Description: "List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(v1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -3776,7 +4023,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(v1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -3786,7 +4033,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -3802,7 +4049,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(v1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -3810,11 +4057,30 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, "restartPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.", + Description: "Restart policy for the container to manage the restart behavior of each container within a pod. You cannot set this field on ephemeral containers.", Type: []string{"string"}, Format: "", }, }, + "restartPolicyRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents a list of rules to be checked to determine if the container should be restarted on exit. You cannot set this field on ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerRestartRule{}.OpenAPIModelName()), + }, + }, + }, + }, + }, "volumeMounts": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -3833,7 +4099,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(v1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -3857,7 +4123,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(v1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -3866,25 +4132,25 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(v1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -3913,7 +4179,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "securityContext": { SchemaProps: spec.SchemaProps{ Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(v1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -3942,7 +4208,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + v1.ContainerPort{}.OpenAPIModelName(), v1.ContainerResizePolicy{}.OpenAPIModelName(), v1.ContainerRestartRule{}.OpenAPIModelName(), v1.EnvFromSource{}.OpenAPIModelName(), v1.EnvVar{}.OpenAPIModelName(), v1.Lifecycle{}.OpenAPIModelName(), v1.Probe{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.SecurityContext{}.OpenAPIModelName(), v1.VolumeDevice{}.OpenAPIModelName(), v1.VolumeMount{}.OpenAPIModelName()}, } } @@ -3956,14 +4222,14 @@ func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback "volumeClaimTemplate": { SchemaProps: spec.SchemaProps{ Description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), + Ref: ref(v1.PersistentVolumeClaimTemplate{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, + v1.PersistentVolumeClaimTemplate{}.OpenAPIModelName()}, } } @@ -3992,14 +4258,14 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "involvedObject": { SchemaProps: spec.SchemaProps{ Description: "The object that this event is about.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "reason": { @@ -4020,19 +4286,19 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "The component reporting this event. Should be a short machine understandable string.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EventSource"), + Ref: ref(v1.EventSource{}.OpenAPIModelName()), }, }, "firstTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the most recent occurrence of this event was recorded.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "count": { @@ -4052,13 +4318,13 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "eventTime": { SchemaProps: spec.SchemaProps{ Description: "Time when this Event was first observed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "series": { SchemaProps: spec.SchemaProps{ Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/core/v1.EventSeries"), + Ref: ref(v1.EventSeries{}.OpenAPIModelName()), }, }, "action": { @@ -4071,7 +4337,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "related": { SchemaProps: spec.SchemaProps{ Description: "Optional secondary object for more complex actions.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "reportingComponent": { @@ -4095,7 +4361,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + v1.EventSeries{}.OpenAPIModelName(), v1.EventSource{}.OpenAPIModelName(), v1.ObjectReference{}.OpenAPIModelName(), metav1.MicroTime{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -4124,7 +4390,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -4135,7 +4401,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Event"), + Ref: ref(v1.Event{}.OpenAPIModelName()), }, }, }, @@ -4146,7 +4412,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Event{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -4167,14 +4433,14 @@ func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.O "lastObservedTime": { SchemaProps: spec.SchemaProps{ Description: "Time of the last occurrence observed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -4312,6 +4578,57 @@ func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) commo } } +func schema_k8sio_api_core_v1_FileKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FileKeySelector selects a key of the env file.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the volume mount containing the env file.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "key": { + SchemaProps: spec.SchemaProps{ + 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.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + 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.\n\nIf optional is set to false and the specified key does not exist, an error will be returned during Pod creation.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"volumeName", "path", "key"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, + }, + } +} + func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -4337,7 +4654,7 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -4368,7 +4685,7 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -4397,7 +4714,7 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -4428,7 +4745,7 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -4621,7 +4938,7 @@ func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback Properties: map[string]spec.Schema{ "endpoints": { SchemaProps: spec.SchemaProps{ - Description: "endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Description: "endpoints is the endpoint name that details Glusterfs topology.", Default: "", Type: []string{"string"}, Format: "", @@ -4697,7 +5014,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), + Ref: ref(v1.HTTPHeader{}.OpenAPIModelName()), }, }, }, @@ -4708,7 +5025,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + v1.HTTPHeader{}.OpenAPIModelName(), "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } @@ -4926,7 +5243,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "initiatorName": { @@ -4941,7 +5258,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -5035,7 +5352,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "initiatorName": { @@ -5050,7 +5367,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -5129,13 +5446,13 @@ func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.Ope "postStart": { SchemaProps: spec.SchemaProps{ Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + Ref: ref(v1.LifecycleHandler{}.OpenAPIModelName()), }, }, "preStop": { SchemaProps: spec.SchemaProps{ Description: "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + Ref: ref(v1.LifecycleHandler{}.OpenAPIModelName()), }, }, "stopSignal": { @@ -5150,7 +5467,7 @@ func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LifecycleHandler"}, + v1.LifecycleHandler{}.OpenAPIModelName()}, } } @@ -5164,32 +5481,32 @@ func schema_k8sio_api_core_v1_LifecycleHandler(ref common.ReferenceCallback) com "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(v1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(v1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(v1.TCPSocketAction{}.OpenAPIModelName()), }, }, "sleep": { SchemaProps: spec.SchemaProps{ Description: "Sleep represents a duration that the container should sleep.", - Ref: ref("k8s.io/api/core/v1.SleepAction"), + Ref: ref(v1.SleepAction{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.SleepAction", "k8s.io/api/core/v1.TCPSocketAction"}, + v1.ExecAction{}.OpenAPIModelName(), v1.HTTPGetAction{}.OpenAPIModelName(), v1.SleepAction{}.OpenAPIModelName(), v1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -5218,21 +5535,21 @@ func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), + Ref: ref(v1.LimitRangeSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.LimitRangeSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5259,7 +5576,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -5273,7 +5590,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -5287,7 +5604,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -5301,7 +5618,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -5315,7 +5632,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -5326,7 +5643,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -5355,7 +5672,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5366,7 +5683,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRange"), + Ref: ref(v1.LimitRange{}.OpenAPIModelName()), }, }, }, @@ -5377,7 +5694,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.LimitRange{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -5401,7 +5718,7 @@ func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), + Ref: ref(v1.LimitRangeItem{}.OpenAPIModelName()), }, }, }, @@ -5412,7 +5729,7 @@ func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeItem"}, + v1.LimitRangeItem{}.OpenAPIModelName()}, } } @@ -5491,7 +5808,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5501,7 +5818,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -5512,7 +5829,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ListMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -5557,7 +5874,7 @@ func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PortStatus"), + Ref: ref(v1.PortStatus{}.OpenAPIModelName()), }, }, }, @@ -5567,7 +5884,7 @@ func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PortStatus"}, + v1.PortStatus{}.OpenAPIModelName()}, } } @@ -5591,7 +5908,7 @@ func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), + Ref: ref(v1.LoadBalancerIngress{}.OpenAPIModelName()), }, }, }, @@ -5601,7 +5918,7 @@ func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerIngress"}, + v1.LoadBalancerIngress{}.OpenAPIModelName()}, } } @@ -5752,28 +6069,28 @@ func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), + Ref: ref(v1.NamespaceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), + Ref: ref(v1.NamespaceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.NamespaceSpec{}.OpenAPIModelName(), v1.NamespaceStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5803,7 +6120,7 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -5825,7 +6142,7 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -5854,7 +6171,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5865,7 +6182,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Namespace"), + Ref: ref(v1.Namespace{}.OpenAPIModelName()), }, }, }, @@ -5876,7 +6193,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Namespace{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -5946,7 +6263,7 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), + Ref: ref(v1.NamespaceCondition{}.OpenAPIModelName()), }, }, }, @@ -5956,7 +6273,7 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceCondition"}, + v1.NamespaceCondition{}.OpenAPIModelName()}, } } @@ -5985,28 +6302,28 @@ func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSpec"), + Ref: ref(v1.NodeSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeStatus"), + Ref: ref(v1.NodeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.NodeSpec{}.OpenAPIModelName(), v1.NodeStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -6050,7 +6367,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. "requiredDuringSchedulingIgnoredDuringExecution": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(v1.NodeSelector{}.OpenAPIModelName()), }, }, "preferredDuringSchedulingIgnoredDuringExecution": { @@ -6066,7 +6383,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), + Ref: ref(v1.PreferredSchedulingTerm{}.OpenAPIModelName()), }, }, }, @@ -6076,7 +6393,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, + v1.NodeSelector{}.OpenAPIModelName(), v1.PreferredSchedulingTerm{}.OpenAPIModelName()}, } } @@ -6106,13 +6423,13 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common "lastHeartbeatTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we got an update on a given condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -6134,7 +6451,7 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -6148,14 +6465,14 @@ func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) com "configMap": { SchemaProps: spec.SchemaProps{ Description: "ConfigMap is a reference to a Node's ConfigMap", - Ref: ref("k8s.io/api/core/v1.ConfigMapNodeConfigSource"), + Ref: ref(v1.ConfigMapNodeConfigSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapNodeConfigSource"}, + v1.ConfigMapNodeConfigSource{}.OpenAPIModelName()}, } } @@ -6169,19 +6486,19 @@ func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) com "assigned": { SchemaProps: spec.SchemaProps{ Description: "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "active": { SchemaProps: spec.SchemaProps{ Description: "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "lastKnownGood": { SchemaProps: spec.SchemaProps{ Description: "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "error": { @@ -6195,7 +6512,7 @@ func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource"}, + v1.NodeConfigSource{}.OpenAPIModelName()}, } } @@ -6210,14 +6527,14 @@ func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Endpoint on which Kubelet is listening.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), + Ref: ref(v1.DaemonEndpoint{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DaemonEndpoint"}, + v1.DaemonEndpoint{}.OpenAPIModelName()}, } } @@ -6266,7 +6583,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -6277,7 +6594,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Node"), + Ref: ref(v1.Node{}.OpenAPIModelName()), }, }, }, @@ -6288,7 +6605,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Node{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -6344,14 +6661,14 @@ func schema_k8sio_api_core_v1_NodeRuntimeHandler(ref common.ReferenceCallback) c "features": { SchemaProps: spec.SchemaProps{ Description: "Supported features.", - Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"), + Ref: ref(v1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"}, + v1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName()}, } } @@ -6402,7 +6719,7 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + Ref: ref(v1.NodeSelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -6418,7 +6735,7 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, + v1.NodeSelectorTerm{}.OpenAPIModelName()}, } } @@ -6493,7 +6810,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Ref: ref(v1.NodeSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -6512,7 +6829,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Ref: ref(v1.NodeSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -6527,7 +6844,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorRequirement"}, + v1.NodeSelectorRequirement{}.OpenAPIModelName()}, } } @@ -6593,7 +6910,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Taint"), + Ref: ref(v1.Taint{}.OpenAPIModelName()), }, }, }, @@ -6602,7 +6919,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open "configSource": { SchemaProps: spec.SchemaProps{ Description: "Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "externalID": { @@ -6616,7 +6933,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, + v1.NodeConfigSource{}.OpenAPIModelName(), v1.Taint{}.OpenAPIModelName()}, } } @@ -6635,7 +6952,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -6649,7 +6966,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -6681,7 +6998,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeCondition"), + Ref: ref(v1.NodeCondition{}.OpenAPIModelName()), }, }, }, @@ -6705,7 +7022,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeAddress"), + Ref: ref(v1.NodeAddress{}.OpenAPIModelName()), }, }, }, @@ -6715,14 +7032,14 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Endpoints of daemons running on the Node.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), + Ref: ref(v1.NodeDaemonEndpoints{}.OpenAPIModelName()), }, }, "nodeInfo": { SchemaProps: spec.SchemaProps{ Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), + Ref: ref(v1.NodeSystemInfo{}.OpenAPIModelName()), }, }, "images": { @@ -6738,7 +7055,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerImage"), + Ref: ref(v1.ContainerImage{}.OpenAPIModelName()), }, }, }, @@ -6777,7 +7094,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.AttachedVolume"), + Ref: ref(v1.AttachedVolume{}.OpenAPIModelName()), }, }, }, @@ -6786,7 +7103,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op "config": { SchemaProps: spec.SchemaProps{ Description: "Status of the config assigned to the node via the dynamic Kubelet config feature.", - Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"), + Ref: ref(v1.NodeConfigStatus{}.OpenAPIModelName()), }, }, "runtimeHandlers": { @@ -6802,7 +7119,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandler"), + Ref: ref(v1.NodeRuntimeHandler{}.OpenAPIModelName()), }, }, }, @@ -6811,14 +7128,34 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op "features": { SchemaProps: spec.SchemaProps{ Description: "Features describes the set of features implemented by the CRI implementation.", - Ref: ref("k8s.io/api/core/v1.NodeFeatures"), + Ref: ref(v1.NodeFeatures{}.OpenAPIModelName()), + }, + }, + "declaredFeatures": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "DeclaredFeatures represents the features related to feature gates that are declared by the node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeFeatures", "k8s.io/api/core/v1.NodeRuntimeHandler", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.AttachedVolume{}.OpenAPIModelName(), v1.ContainerImage{}.OpenAPIModelName(), v1.NodeAddress{}.OpenAPIModelName(), v1.NodeCondition{}.OpenAPIModelName(), v1.NodeConfigStatus{}.OpenAPIModelName(), v1.NodeDaemonEndpoints{}.OpenAPIModelName(), v1.NodeFeatures{}.OpenAPIModelName(), v1.NodeRuntimeHandler{}.OpenAPIModelName(), v1.NodeSystemInfo{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -6932,7 +7269,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "swap": { SchemaProps: spec.SchemaProps{ Description: "Swap Info reported by the node.", - Ref: ref("k8s.io/api/core/v1.NodeSwapStatus"), + Ref: ref(v1.NodeSwapStatus{}.OpenAPIModelName()), }, }, }, @@ -6940,7 +7277,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSwapStatus"}, + v1.NodeSwapStatus{}.OpenAPIModelName()}, } } @@ -7070,28 +7407,28 @@ func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + Ref: ref(v1.PersistentVolumeSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), + Ref: ref(v1.PersistentVolumeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PersistentVolumeSpec{}.OpenAPIModelName(), v1.PersistentVolumeStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -7120,28 +7457,28 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + Ref: ref(v1.PersistentVolumeClaimSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), + Ref: ref(v1.PersistentVolumeClaimStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PersistentVolumeClaimSpec{}.OpenAPIModelName(), v1.PersistentVolumeClaimStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -7171,13 +7508,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "lastProbeTime is the time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -7199,7 +7536,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -7228,7 +7565,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7239,7 +7576,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Ref: ref(v1.PersistentVolumeClaim{}.OpenAPIModelName()), }, }, }, @@ -7250,7 +7587,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.PersistentVolumeClaim{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -7285,14 +7622,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is a label query over volumes to consider for binding.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Description: "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeResourceRequirements"), + Ref: ref(v1.VolumeResourceRequirements{}.OpenAPIModelName()), }, }, "volumeName": { @@ -7320,18 +7657,18 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall "dataSource": { SchemaProps: spec.SchemaProps{ Description: "dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(v1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, "dataSourceRef": { SchemaProps: spec.SchemaProps{ Description: "dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While dataSource ignores disallowed values (dropping them), dataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n* While dataSource only allows local objects, dataSourceRef allows objects\n in any namespaces.\n(Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.", - Ref: ref("k8s.io/api/core/v1.TypedObjectReference"), + Ref: ref(v1.TypedObjectReference{}.OpenAPIModelName()), }, }, "volumeAttributesClassName": { SchemaProps: spec.SchemaProps{ - Description: "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).", + Description: "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string or nil value indicates that no VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, this field can be reset to its previous value (including nil) to cancel the modification. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/", Type: []string{"string"}, Format: "", }, @@ -7340,7 +7677,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/core/v1.TypedObjectReference", "k8s.io/api/core/v1.VolumeResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.TypedLocalObjectReference{}.OpenAPIModelName(), v1.TypedObjectReference{}.OpenAPIModelName(), v1.VolumeResourceRequirements{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -7388,7 +7725,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -7412,7 +7749,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), + Ref: ref(v1.PersistentVolumeClaimCondition{}.OpenAPIModelName()), }, }, }, @@ -7420,13 +7757,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, "allocatedResources": { SchemaProps: spec.SchemaProps{ - Description: "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Description: "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -7439,7 +7776,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, }, SchemaProps: spec.SchemaProps{ - Description: "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Description: "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -7456,22 +7793,22 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, "currentVolumeAttributesClassName": { SchemaProps: spec.SchemaProps{ - Description: "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", + Description: "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim", Type: []string{"string"}, Format: "", }, }, "modifyVolumeStatus": { SchemaProps: spec.SchemaProps{ - Description: "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", - Ref: ref("k8s.io/api/core/v1.ModifyVolumeStatus"), + Description: "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted.", + Ref: ref(v1.ModifyVolumeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ModifyVolumeStatus", "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ModifyVolumeStatus{}.OpenAPIModelName(), v1.PersistentVolumeClaimCondition{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -7486,14 +7823,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + Ref: ref(v1.PersistentVolumeClaimSpec{}.OpenAPIModelName()), }, }, }, @@ -7501,7 +7838,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PersistentVolumeClaimSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -7559,7 +7896,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7570,7 +7907,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolume"), + Ref: ref(v1.PersistentVolume{}.OpenAPIModelName()), }, }, }, @@ -7581,7 +7918,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.PersistentVolume{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -7595,140 +7932,140 @@ func schema_k8sio_api_core_v1_PersistentVolumeSource(ref common.ReferenceCallbac "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + Ref: ref(v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + Ref: ref(v1.RBDPersistentVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + Ref: ref(v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + Ref: ref(v1.CinderPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + Ref: ref(v1.CephFSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + Ref: ref(v1.FlexPersistentVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + Ref: ref(v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + Ref: ref(v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName()), }, }, "local": { SchemaProps: spec.SchemaProps{ Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + Ref: ref(v1.LocalVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + Ref: ref(v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi represents storage that is handled by an external CSI driver.", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + Ref: ref(v1.CSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(), v1.CSIPersistentVolumeSource{}.OpenAPIModelName(), v1.CephFSPersistentVolumeSource{}.OpenAPIModelName(), v1.CinderPersistentVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexPersistentVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(), v1.LocalVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDPersistentVolumeSource{}.OpenAPIModelName(), v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(), v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -7747,7 +8084,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -7756,133 +8093,133 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + Ref: ref(v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + Ref: ref(v1.RBDPersistentVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + Ref: ref(v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + Ref: ref(v1.CinderPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + Ref: ref(v1.CephFSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + Ref: ref(v1.FlexPersistentVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + Ref: ref(v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + Ref: ref(v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName()), }, }, "local": { SchemaProps: spec.SchemaProps{ Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + Ref: ref(v1.LocalVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + Ref: ref(v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi represents storage that is handled by an external CSI driver.", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + Ref: ref(v1.CSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "accessModes": { @@ -7914,7 +8251,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, SchemaProps: spec.SchemaProps{ Description: "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "persistentVolumeReclaimPolicy": { @@ -7962,13 +8299,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, "nodeAffinity": { SchemaProps: spec.SchemaProps{ - Description: "nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", - Ref: ref("k8s.io/api/core/v1.VolumeNodeAffinity"), + Description: "nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. This field is mutable if MutablePVNodeAffinity feature gate is enabled.", + Ref: ref(v1.VolumeNodeAffinity{}.OpenAPIModelName()), }, }, "volumeAttributesClassName": { SchemaProps: spec.SchemaProps{ - Description: "Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", + Description: "Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process.", Type: []string{"string"}, Format: "", }, @@ -7977,7 +8314,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VolumeNodeAffinity", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(), v1.CSIPersistentVolumeSource{}.OpenAPIModelName(), v1.CephFSPersistentVolumeSource{}.OpenAPIModelName(), v1.CinderPersistentVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexPersistentVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(), v1.LocalVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.ObjectReference{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDPersistentVolumeSource{}.OpenAPIModelName(), v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(), v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(), v1.VolumeNodeAffinity{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -8013,14 +8350,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallbac "lastPhaseTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -8078,28 +8415,28 @@ func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDe SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), + Ref: ref(v1.PodSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), + Ref: ref(v1.PodStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodSpec{}.OpenAPIModelName(), v1.PodStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -8123,7 +8460,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(v1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -8142,7 +8479,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Ref: ref(v1.WeightedPodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -8152,7 +8489,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + v1.PodAffinityTerm{}.OpenAPIModelName(), v1.WeightedPodAffinityTerm{}.OpenAPIModelName()}, } } @@ -8166,7 +8503,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "namespaces": { @@ -8200,7 +8537,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm "namespaceSelector": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "matchLabelKeys": { @@ -8248,7 +8585,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -8272,7 +8609,7 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(v1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -8285,13 +8622,13 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm }, }, SchemaProps: spec.SchemaProps{ - 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.", + 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 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.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Ref: ref(v1.WeightedPodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -8301,7 +8638,7 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + v1.PodAffinityTerm{}.OpenAPIModelName(), v1.WeightedPodAffinityTerm{}.OpenAPIModelName()}, } } @@ -8367,6 +8704,78 @@ func schema_k8sio_api_core_v1_PodAttachOptions(ref common.ReferenceCallback) com } } +func schema_k8sio_api_core_v1_PodCertificateProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodCertificateProjection provides a private key and X.509 certificate in the pod filesystem.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "signerName": { + SchemaProps: spec.SchemaProps{ + Description: "Kubelet's generated CSRs will be addressed to this signer.", + Type: []string{"string"}, + Format: "", + }, + }, + "keyType": { + SchemaProps: spec.SchemaProps{ + Description: "The type of keypair Kubelet will generate for the pod.\n\nValid values are \"RSA3072\", \"RSA4096\", \"ECDSAP256\", \"ECDSAP384\", \"ECDSAP521\", and \"ED25519\".", + Type: []string{"string"}, + Format: "", + }, + }, + "maxExpirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "maxExpirationSeconds is the maximum lifetime permitted for the certificate.\n\nKubelet copies this value verbatim into the PodCertificateRequests it generates for this projection.\n\nIf omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days).\n\nThe signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "credentialBundlePath": { + SchemaProps: spec.SchemaProps{ + Description: "Write the credential bundle at this path in the projected volume.\n\nThe credential bundle is a single file that contains multiple PEM blocks. The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private key.\n\nThe remaining blocks are CERTIFICATE blocks, containing the issued certificate chain from the signer (leaf and any intermediates).\n\nUsing credentialBundlePath lets your Pod's application code make a single atomic read that retrieves a consistent key and certificate chain. If you project them to separate files, your application code will need to additionally check that the leaf certificate was issued to the key.", + Type: []string{"string"}, + Format: "", + }, + }, + "keyPath": { + SchemaProps: spec.SchemaProps{ + Description: "Write the key at this path in the projected volume.\n\nMost applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation.", + Type: []string{"string"}, + Format: "", + }, + }, + "certificateChainPath": { + SchemaProps: spec.SchemaProps{ + Description: "Write the certificate chain at this path in the projected volume.\n\nMost applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation.", + Type: []string{"string"}, + Format: "", + }, + }, + "userAnnotations": { + SchemaProps: spec.SchemaProps{ + Description: "userAnnotations allow pod authors to pass additional information to the signer implementation. Kubernetes does not restrict or validate this metadata in any way.\n\nThese values are copied verbatim into the `spec.unverifiedUserAnnotations` field of the PodCertificateRequest objects that Kubelet creates.\n\nEntries are subject to the same validation as object metadata annotations, with the addition that all keys must be domain-prefixed. No restrictions are placed on values, except an overall size limitation on the entire field.\n\nSigners should document the keys and values they support. Signers should deny requests that contain keys they do not recognize.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"signerName", "keyType"}, + }, + }, + } +} + func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -8384,7 +8793,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. }, "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "If set, this represents the .metadata.generation that the pod condition was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + Description: "If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", Type: []string{"integer"}, Format: "int64", }, @@ -8400,13 +8809,13 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -8428,7 +8837,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -8492,7 +8901,7 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), + Ref: ref(v1.PodDNSConfigOption{}.OpenAPIModelName()), }, }, }, @@ -8502,7 +8911,7 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodDNSConfigOption"}, + v1.PodDNSConfigOption{}.OpenAPIModelName()}, } } @@ -8616,6 +9025,49 @@ func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) commo } } +func schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodExtendedResourceClaimStatus is stored in the PodStatus for the extended resource requests backed by DRA. It stores the generated name for the corresponding special ResourceClaim created by the scheduler.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requestMappings": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "RequestMappings identifies the mapping of to device request in the generated ResourceClaim.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerExtendedResourceRequest{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "resourceClaimName": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"requestMappings", "resourceClaimName"}, + }, + }, + Dependencies: []string{ + v1.ContainerExtendedResourceRequest{}.OpenAPIModelName()}, + } +} + func schema_k8sio_api_core_v1_PodIP(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -8663,7 +9115,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -8674,7 +9126,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Pod"), + Ref: ref(v1.Pod{}.OpenAPIModelName()), }, }, }, @@ -8685,7 +9137,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Pod{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -8741,7 +9193,7 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common "sinceTime": { SchemaProps: spec.SchemaProps{ Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "timestamps": { @@ -8783,7 +9235,7 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -9009,13 +9461,13 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c "seLinuxOptions": { SchemaProps: spec.SchemaProps{ Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Ref: ref(v1.SELinuxOptions{}.OpenAPIModelName()), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ Description: "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + Ref: ref(v1.WindowsSecurityContextOptions{}.OpenAPIModelName()), }, }, "runAsUser": { @@ -9087,7 +9539,7 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Sysctl"), + Ref: ref(v1.Sysctl{}.OpenAPIModelName()), }, }, }, @@ -9104,13 +9556,13 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c "seccompProfile": { SchemaProps: spec.SchemaProps{ Description: "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + Ref: ref(v1.SeccompProfile{}.OpenAPIModelName()), }, }, "appArmorProfile": { SchemaProps: spec.SchemaProps{ Description: "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.AppArmorProfile"), + Ref: ref(v1.AppArmorProfile{}.OpenAPIModelName()), }, }, "seLinuxChangePolicy": { @@ -9124,7 +9576,7 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AppArmorProfile", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + v1.AppArmorProfile{}.OpenAPIModelName(), v1.SELinuxOptions{}.OpenAPIModelName(), v1.SeccompProfile{}.OpenAPIModelName(), v1.Sysctl{}.OpenAPIModelName(), v1.WindowsSecurityContextOptions{}.OpenAPIModelName()}, } } @@ -9138,14 +9590,14 @@ func schema_k8sio_api_core_v1_PodSignature(ref common.ReferenceCallback) common. "podController": { SchemaProps: spec.SchemaProps{ Description: "Reference to controller whose pods should avoid this node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Ref: ref(metav1.OwnerReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, + metav1.OwnerReference{}.OpenAPIModelName()}, } } @@ -9174,7 +9626,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Volume"), + Ref: ref(v1.Volume{}.OpenAPIModelName()), }, }, }, @@ -9198,7 +9650,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), + Ref: ref(v1.Container{}.OpenAPIModelName()), }, }, }, @@ -9222,7 +9674,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), + Ref: ref(v1.Container{}.OpenAPIModelName()), }, }, }, @@ -9246,7 +9698,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), + Ref: ref(v1.EphemeralContainer{}.OpenAPIModelName()), }, }, }, @@ -9333,7 +9785,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "hostNetwork": { SchemaProps: spec.SchemaProps{ - Description: "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", + Description: "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.", Type: []string{"boolean"}, Format: "", }, @@ -9362,7 +9814,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + Ref: ref(v1.PodSecurityContext{}.OpenAPIModelName()), }, }, "imagePullSecrets": { @@ -9383,7 +9835,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -9406,7 +9858,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "affinity": { SchemaProps: spec.SchemaProps{ Description: "If specified, the pod's scheduling constraints", - Ref: ref("k8s.io/api/core/v1.Affinity"), + Ref: ref(v1.Affinity{}.OpenAPIModelName()), }, }, "schedulerName": { @@ -9429,7 +9881,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref(v1.Toleration{}.OpenAPIModelName()), }, }, }, @@ -9453,7 +9905,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostAlias"), + Ref: ref(v1.HostAlias{}.OpenAPIModelName()), }, }, }, @@ -9476,7 +9928,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "dnsConfig": { SchemaProps: spec.SchemaProps{ Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", - Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + Ref: ref(v1.PodDNSConfig{}.OpenAPIModelName()), }, }, "readinessGates": { @@ -9492,7 +9944,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), + Ref: ref(v1.PodReadinessGate{}.OpenAPIModelName()), }, }, }, @@ -9528,7 +9980,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -9553,7 +10005,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + Ref: ref(v1.TopologySpreadConstraint{}.OpenAPIModelName()), }, }, }, @@ -9568,8 +10020,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "os": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.securityContext.supplementalGroupsPolicy - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", - Ref: ref("k8s.io/api/core/v1.PodOS"), + Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.resources - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.securityContext.supplementalGroupsPolicy - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", + Ref: ref(v1.PodOS{}.OpenAPIModelName()), }, }, "hostUsers": { @@ -9597,7 +10049,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSchedulingGate"), + Ref: ref(v1.PodSchedulingGate{}.OpenAPIModelName()), }, }, }, @@ -9615,13 +10067,13 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, SchemaProps: spec.SchemaProps{ - Description: "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + Description: "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaim"), + Ref: ref(v1.PodResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -9629,8 +10081,21 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\" and \"memory\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Description: "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\", \"memory\" and \"hugepages-\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), + }, + }, + "hostnameOverride": { + SchemaProps: spec.SchemaProps{ + Description: "HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. This field only specifies the pod's hostname and does not affect its DNS records. When this field is set to a non-empty string: - It takes precedence over the values set in `hostname` and `subdomain`. - The Pod's hostname will be set to this value. - `setHostnameAsFQDN` must be nil or set to false. - `hostNetwork` must be set to false.\n\nThis field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. Requires the HostnameOverride feature gate to be enabled.", + Type: []string{"string"}, + Format: "", + }, + }, + "workloadRef": { + SchemaProps: spec.SchemaProps{ + Description: "WorkloadRef provides a reference to the Workload object that this Pod belongs to. This field is used by the scheduler to identify the PodGroup and apply the correct group scheduling policies. The Workload object referenced by this field may not exist at the time the Pod is created. This field is immutable, but a Workload object with the same name may be recreated with different policies. Doing this during pod scheduling may result in the placement not conforming to the expected policies.", + Ref: ref(v1.WorkloadReference{}.OpenAPIModelName()), }, }, }, @@ -9638,7 +10103,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodOS", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodResourceClaim", "k8s.io/api/core/v1.PodSchedulingGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.Affinity{}.OpenAPIModelName(), v1.Container{}.OpenAPIModelName(), v1.EphemeralContainer{}.OpenAPIModelName(), v1.HostAlias{}.OpenAPIModelName(), v1.LocalObjectReference{}.OpenAPIModelName(), v1.PodDNSConfig{}.OpenAPIModelName(), v1.PodOS{}.OpenAPIModelName(), v1.PodReadinessGate{}.OpenAPIModelName(), v1.PodResourceClaim{}.OpenAPIModelName(), v1.PodSchedulingGate{}.OpenAPIModelName(), v1.PodSecurityContext{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.Toleration{}.OpenAPIModelName(), v1.TopologySpreadConstraint{}.OpenAPIModelName(), v1.Volume{}.OpenAPIModelName(), v1.WorkloadReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -9651,7 +10116,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Properties: map[string]spec.Schema{ "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "If set, this represents the .metadata.generation that the pod status was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + Description: "If set, this represents the .metadata.generation that the pod status was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", Type: []string{"integer"}, Format: "int64", }, @@ -9682,7 +10147,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodCondition"), + Ref: ref(v1.PodCondition{}.OpenAPIModelName()), }, }, }, @@ -9731,7 +10196,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostIP"), + Ref: ref(v1.HostIP{}.OpenAPIModelName()), }, }, }, @@ -9762,7 +10227,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodIP"), + Ref: ref(v1.PodIP{}.OpenAPIModelName()), }, }, }, @@ -9771,7 +10236,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope "startTime": { SchemaProps: spec.SchemaProps{ Description: "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "initContainerStatuses": { @@ -9787,7 +10252,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(v1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -9806,7 +10271,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(v1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -9833,7 +10298,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(v1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -9864,17 +10329,43 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaimStatus"), + Ref: ref(v1.PodResourceClaimStatus{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "extendedResourceClaimStatus": { + SchemaProps: spec.SchemaProps{ + Description: "Status of extended resource claim backed by DRA.", + Ref: ref(v1.PodExtendedResourceClaimStatus{}.OpenAPIModelName()), + }, + }, + "allocatedResources": { + SchemaProps: spec.SchemaProps{ + Description: "AllocatedResources is the total requests allocated for this pod by the node. If pod-level requests are not set, this will be the total requests aggregated across containers in the pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, }, }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources represents the compute resource requests and limits that have been applied at the pod level if pod-level requests or limits are set in PodSpec.Resources", + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.HostIP", "k8s.io/api/core/v1.PodCondition", "k8s.io/api/core/v1.PodIP", "k8s.io/api/core/v1.PodResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + v1.ContainerStatus{}.OpenAPIModelName(), v1.HostIP{}.OpenAPIModelName(), v1.PodCondition{}.OpenAPIModelName(), v1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(), v1.PodIP{}.OpenAPIModelName(), v1.PodResourceClaimStatus{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -9903,21 +10394,21 @@ func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), + Ref: ref(v1.PodStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9946,21 +10437,21 @@ func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(v1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodTemplateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9989,7 +10480,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -10000,7 +10491,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplate"), + Ref: ref(v1.PodTemplate{}.OpenAPIModelName()), }, }, }, @@ -10011,7 +10502,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.PodTemplate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -10026,21 +10517,21 @@ func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), + Ref: ref(v1.PodSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -10129,13 +10620,13 @@ func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The class of pods.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSignature"), + Ref: ref(v1.PodSignature{}.OpenAPIModelName()), }, }, "evictionTime": { SchemaProps: spec.SchemaProps{ Description: "Time at which this entry was added to the list.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -10157,7 +10648,7 @@ func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + v1.PodSignature{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -10180,7 +10671,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "A node selector term, associated with the corresponding weight.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + Ref: ref(v1.NodeSelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -10188,7 +10679,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, + v1.NodeSelectorTerm{}.OpenAPIModelName()}, } } @@ -10202,25 +10693,25 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(v1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(v1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "TCPSocket specifies a connection to a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(v1.TCPSocketAction{}.OpenAPIModelName()), }, }, "grpc": { SchemaProps: spec.SchemaProps{ Description: "GRPC specifies a GRPC HealthCheckRequest.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), + Ref: ref(v1.GRPCAction{}.OpenAPIModelName()), }, }, "initialDelaySeconds": { @@ -10269,7 +10760,7 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + v1.ExecAction{}.OpenAPIModelName(), v1.GRPCAction{}.OpenAPIModelName(), v1.HTTPGetAction{}.OpenAPIModelName(), v1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -10283,32 +10774,32 @@ func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common. "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(v1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(v1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "TCPSocket specifies a connection to a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(v1.TCPSocketAction{}.OpenAPIModelName()), }, }, "grpc": { SchemaProps: spec.SchemaProps{ Description: "GRPC specifies a GRPC HealthCheckRequest.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), + Ref: ref(v1.GRPCAction{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + v1.ExecAction{}.OpenAPIModelName(), v1.GRPCAction{}.OpenAPIModelName(), v1.HTTPGetAction{}.OpenAPIModelName(), v1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -10332,7 +10823,7 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeProjection"), + Ref: ref(v1.VolumeProjection{}.OpenAPIModelName()), }, }, }, @@ -10349,7 +10840,7 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.VolumeProjection"}, + v1.VolumeProjection{}.OpenAPIModelName()}, } } @@ -10480,7 +10971,7 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -10495,7 +10986,7 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -10568,7 +11059,7 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -10583,7 +11074,7 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -10612,7 +11103,7 @@ func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "range": { @@ -10635,7 +11126,7 @@ func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -10664,28 +11155,28 @@ func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), + Ref: ref(v1.ReplicationControllerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), + Ref: ref(v1.ReplicationControllerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ReplicationControllerSpec{}.OpenAPIModelName(), v1.ReplicationControllerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -10715,7 +11206,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -10737,7 +11228,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -10766,7 +11257,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -10777,7 +11268,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationController"), + Ref: ref(v1.ReplicationController{}.OpenAPIModelName()), }, }, }, @@ -10788,7 +11279,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ReplicationController{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -10839,14 +11330,14 @@ func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCall "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. The only allowed template.spec.restartPolicy value is \"Always\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(v1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec"}, + v1.PodTemplateSpec{}.OpenAPIModelName()}, } } @@ -10911,7 +11402,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), + Ref: ref(v1.ReplicationControllerCondition{}.OpenAPIModelName()), }, }, }, @@ -10922,7 +11413,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerCondition"}, + v1.ReplicationControllerCondition{}.OpenAPIModelName()}, } } @@ -10980,7 +11471,7 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback "divisor": { SchemaProps: spec.SchemaProps{ Description: "Specifies the output format of the exposed resources, defaults to \"1\"", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -10993,7 +11484,7 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -11051,28 +11542,28 @@ func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), + Ref: ref(v1.ResourceQuotaSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), + Ref: ref(v1.ResourceQuotaStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ResourceQuotaSpec{}.OpenAPIModelName(), v1.ResourceQuotaStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11101,7 +11592,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -11112,7 +11603,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuota"), + Ref: ref(v1.ResourceQuota{}.OpenAPIModelName()), }, }, }, @@ -11123,7 +11614,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ResourceQuota{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -11142,7 +11633,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11172,14 +11663,14 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co "scopeSelector": { SchemaProps: spec.SchemaProps{ Description: "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", - Ref: ref("k8s.io/api/core/v1.ScopeSelector"), + Ref: ref(v1.ScopeSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ScopeSelector", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ScopeSelector{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -11198,7 +11689,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11212,7 +11703,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11222,7 +11713,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -11241,7 +11732,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11255,7 +11746,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11271,13 +11762,13 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) }, }, SchemaProps: spec.SchemaProps{ - Description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.", + Description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis field depends on the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceClaim"), + Ref: ref(v1.ResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -11287,7 +11778,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceClaim", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ResourceClaim{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -11322,7 +11813,7 @@ func schema_k8sio_api_core_v1_ResourceStatus(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceHealth"), + Ref: ref(v1.ResourceHealth{}.OpenAPIModelName()), }, }, }, @@ -11333,7 +11824,7 @@ func schema_k8sio_api_core_v1_ResourceStatus(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceHealth"}, + v1.ResourceHealth{}.OpenAPIModelName()}, } } @@ -11404,7 +11895,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "sslEnabled": { @@ -11463,7 +11954,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -11493,7 +11984,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "sslEnabled": { @@ -11552,7 +12043,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -11576,7 +12067,7 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), + Ref: ref(v1.ScopedResourceSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -11591,7 +12082,7 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, + v1.ScopedResourceSelectorRequirement{}.OpenAPIModelName()}, } } @@ -11714,7 +12205,7 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "immutable": { @@ -11766,7 +12257,7 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11865,7 +12356,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -11876,7 +12367,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Secret"), + Ref: ref(v1.Secret{}.OpenAPIModelName()), }, }, }, @@ -11887,7 +12378,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Secret{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -11919,7 +12410,7 @@ func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -11936,7 +12427,7 @@ func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -11999,7 +12490,7 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -12023,7 +12514,7 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -12037,7 +12528,7 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "capabilities": { SchemaProps: spec.SchemaProps{ Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.Capabilities"), + Ref: ref(v1.Capabilities{}.OpenAPIModelName()), }, }, "privileged": { @@ -12050,13 +12541,13 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "seLinuxOptions": { SchemaProps: spec.SchemaProps{ Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Ref: ref(v1.SELinuxOptions{}.OpenAPIModelName()), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ Description: "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + Ref: ref(v1.WindowsSecurityContextOptions{}.OpenAPIModelName()), }, }, "runAsUser": { @@ -12105,20 +12596,20 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "seccompProfile": { SchemaProps: spec.SchemaProps{ Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + Ref: ref(v1.SeccompProfile{}.OpenAPIModelName()), }, }, "appArmorProfile": { SchemaProps: spec.SchemaProps{ Description: "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.AppArmorProfile"), + Ref: ref(v1.AppArmorProfile{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AppArmorProfile", "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + v1.AppArmorProfile{}.OpenAPIModelName(), v1.Capabilities{}.OpenAPIModelName(), v1.SELinuxOptions{}.OpenAPIModelName(), v1.SeccompProfile{}.OpenAPIModelName(), v1.WindowsSecurityContextOptions{}.OpenAPIModelName()}, } } @@ -12147,14 +12638,14 @@ func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The reference to an object in the system.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -12183,28 +12674,28 @@ func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceSpec"), + Ref: ref(v1.ServiceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceStatus"), + Ref: ref(v1.ServiceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ServiceSpec{}.OpenAPIModelName(), v1.ServiceStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -12233,7 +12724,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "secrets": { @@ -12254,7 +12745,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -12273,7 +12764,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -12290,7 +12781,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.LocalObjectReference{}.OpenAPIModelName(), v1.ObjectReference{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -12319,7 +12810,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -12330,7 +12821,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceAccount"), + Ref: ref(v1.ServiceAccount{}.OpenAPIModelName()), }, }, }, @@ -12341,7 +12832,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ServiceAccount{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -12406,7 +12897,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -12417,7 +12908,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Service"), + Ref: ref(v1.Service{}.OpenAPIModelName()), }, }, }, @@ -12428,7 +12919,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Service{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -12552,7 +13043,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServicePort"), + Ref: ref(v1.ServicePort{}.OpenAPIModelName()), }, }, }, @@ -12701,7 +13192,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O "sessionAffinityConfig": { SchemaProps: spec.SchemaProps{ Description: "sessionAffinityConfig contains the configurations of session affinity.", - Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), + Ref: ref(v1.SessionAffinityConfig{}.OpenAPIModelName()), }, }, "ipFamilies": { @@ -12766,7 +13257,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, + v1.ServicePort{}.OpenAPIModelName(), v1.SessionAffinityConfig{}.OpenAPIModelName()}, } } @@ -12781,7 +13272,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + Ref: ref(v1.LoadBalancerStatus{}.OpenAPIModelName()), }, }, "conditions": { @@ -12802,7 +13293,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -12812,7 +13303,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + v1.LoadBalancerStatus{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName()}, } } @@ -12826,14 +13317,14 @@ func schema_k8sio_api_core_v1_SessionAffinityConfig(ref common.ReferenceCallback "clientIP": { SchemaProps: spec.SchemaProps{ Description: "clientIP contains the configurations of Client IP based session affinity.", - Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), + Ref: ref(v1.ClientIPConfig{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ClientIPConfig"}, + v1.ClientIPConfig{}.OpenAPIModelName()}, } } @@ -12897,14 +13388,14 @@ func schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref common.Referen "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -12946,14 +13437,14 @@ func schema_k8sio_api_core_v1_StorageOSVolumeSource(ref common.ReferenceCallback "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -13049,8 +13540,8 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI }, "timeAdded": { SchemaProps: spec.SchemaProps{ - Description: "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "TimeAdded represents the time at which the taint was added.", + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -13058,7 +13549,7 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -13078,10 +13569,10 @@ func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.Op }, "operator": { SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`", + Description: "Operator represents a key's relationship to the value. 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).\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`\n - `\"Gt\"`\n - `\"Lt\"`", Type: []string{"string"}, Format: "", - Enum: []interface{}{"Equal", "Exists"}, + Enum: []interface{}{"Equal", "Exists", "Gt", "Lt"}, }, }, "value": { @@ -13174,7 +13665,7 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), + Ref: ref(v1.TopologySelectorLabelRequirement{}.OpenAPIModelName()), }, }, }, @@ -13189,7 +13680,7 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, + v1.TopologySelectorLabelRequirement{}.OpenAPIModelName()}, } } @@ -13228,7 +13719,7 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "minDomains": { @@ -13279,7 +13770,7 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -13387,181 +13878,181 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "emptyDir": { SchemaProps: spec.SchemaProps{ Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + Ref: ref(v1.EmptyDirVolumeSource{}.OpenAPIModelName()), }, }, "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "gitRepo": { SchemaProps: spec.SchemaProps{ Description: "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + Ref: ref(v1.GitRepoVolumeSource{}.OpenAPIModelName()), }, }, "secret": { SchemaProps: spec.SchemaProps{ Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + Ref: ref(v1.SecretVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ - Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi", + Ref: ref(v1.ISCSIVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ - Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported.", + Ref: ref(v1.GlusterfsVolumeSource{}.OpenAPIModelName()), }, }, "persistentVolumeClaim": { SchemaProps: spec.SchemaProps{ Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + Ref: ref(v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ - Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported.", + Ref: ref(v1.RBDVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + Ref: ref(v1.FlexVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + Ref: ref(v1.CinderVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + Ref: ref(v1.CephFSVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + Ref: ref(v1.DownwardAPIVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + Ref: ref(v1.AzureFileVolumeSource{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + Ref: ref(v1.ConfigMapVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "projected": { SchemaProps: spec.SchemaProps{ Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + Ref: ref(v1.ProjectedVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + Ref: ref(v1.ScaleIOVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + Ref: ref(v1.StorageOSVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + Ref: ref(v1.CSIVolumeSource{}.OpenAPIModelName()), }, }, "ephemeral": { SchemaProps: spec.SchemaProps{ Description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + Ref: ref(v1.EphemeralVolumeSource{}.OpenAPIModelName()), }, }, "image": { SchemaProps: spec.SchemaProps{ Description: "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", - Ref: ref("k8s.io/api/core/v1.ImageVolumeSource"), + Ref: ref(v1.ImageVolumeSource{}.OpenAPIModelName()), }, }, }, @@ -13569,7 +14060,7 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.ImageVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFileVolumeSource{}.OpenAPIModelName(), v1.CSIVolumeSource{}.OpenAPIModelName(), v1.CephFSVolumeSource{}.OpenAPIModelName(), v1.CinderVolumeSource{}.OpenAPIModelName(), v1.ConfigMapVolumeSource{}.OpenAPIModelName(), v1.DownwardAPIVolumeSource{}.OpenAPIModelName(), v1.EmptyDirVolumeSource{}.OpenAPIModelName(), v1.EphemeralVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GitRepoVolumeSource{}.OpenAPIModelName(), v1.GlusterfsVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIVolumeSource{}.OpenAPIModelName(), v1.ImageVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.ProjectedVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDVolumeSource{}.OpenAPIModelName(), v1.ScaleIOVolumeSource{}.OpenAPIModelName(), v1.SecretVolumeSource{}.OpenAPIModelName(), v1.StorageOSVolumeSource{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -13723,14 +14214,14 @@ func schema_k8sio_api_core_v1_VolumeNodeAffinity(ref common.ReferenceCallback) c "required": { SchemaProps: spec.SchemaProps{ Description: "required specifies hard node constraints that must be met.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(v1.NodeSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector"}, + v1.NodeSelector{}.OpenAPIModelName()}, } } @@ -13744,38 +14235,44 @@ func schema_k8sio_api_core_v1_VolumeProjection(ref common.ReferenceCallback) com "secret": { SchemaProps: spec.SchemaProps{ Description: "secret information about the secret data to project", - Ref: ref("k8s.io/api/core/v1.SecretProjection"), + Ref: ref(v1.SecretProjection{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI information about the downwardAPI data to project", - Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), + Ref: ref(v1.DownwardAPIProjection{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap information about the configMap data to project", - Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), + Ref: ref(v1.ConfigMapProjection{}.OpenAPIModelName()), }, }, "serviceAccountToken": { SchemaProps: spec.SchemaProps{ Description: "serviceAccountToken is information about the serviceAccountToken data to project", - Ref: ref("k8s.io/api/core/v1.ServiceAccountTokenProjection"), + Ref: ref(v1.ServiceAccountTokenProjection{}.OpenAPIModelName()), }, }, "clusterTrustBundle": { SchemaProps: spec.SchemaProps{ Description: "ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file.\n\nAlpha, gated by the ClusterTrustBundleProjection feature gate.\n\nClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector.\n\nKubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time.", - Ref: ref("k8s.io/api/core/v1.ClusterTrustBundleProjection"), + Ref: ref(v1.ClusterTrustBundleProjection{}.OpenAPIModelName()), + }, + }, + "podCertificate": { + SchemaProps: spec.SchemaProps{ + Description: "Projects an auto-rotating credential bundle (private key and certificate chain) that the pod can use either as a TLS client or server.\n\nKubelet generates a private key and uses it to send a PodCertificateRequest to the named signer. Once the signer approves the request and issues a certificate chain, Kubelet writes the key and certificate chain to the pod filesystem. The pod does not start until certificates have been issued for each podCertificate projected volume source in its spec.\n\nKubelet will begin trying to rotate the certificate at the time indicated by the signer using the PodCertificateRequest.Status.BeginRefreshAt timestamp.\n\nKubelet can write a single file, indicated by the credentialBundlePath field, or separate files, indicated by the keyPath and certificateChainPath fields.\n\nThe credential bundle is a single file in PEM format. The first PEM entry is the private key (in PKCS#8 format), and the remaining PEM entries are the certificate chain issued by the signer (typically, signers will return their certificate chain in leaf-to-root order).\n\nPrefer using the credential bundle format, since your application code can read it atomically. If you use keyPath and certificateChainPath, your application must make two separate file reads. If these coincide with a certificate rotation, it is possible that the private key and leaf certificate you read may not correspond to each other. Your application will need to check for this condition, and re-read until they are consistent.\n\nThe named signer controls chooses the format of the certificate it issues; consult the signer implementation's documentation to learn how to use the certificates it issues.", + Ref: ref(v1.PodCertificateProjection{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ClusterTrustBundleProjection", "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.SecretProjection", "k8s.io/api/core/v1.ServiceAccountTokenProjection"}, + v1.ClusterTrustBundleProjection{}.OpenAPIModelName(), v1.ConfigMapProjection{}.OpenAPIModelName(), v1.DownwardAPIProjection{}.OpenAPIModelName(), v1.PodCertificateProjection{}.OpenAPIModelName(), v1.SecretProjection{}.OpenAPIModelName(), v1.ServiceAccountTokenProjection{}.OpenAPIModelName()}, } } @@ -13794,7 +14291,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -13808,7 +14305,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -13818,7 +14315,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -13832,188 +14329,188 @@ func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common. "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "emptyDir": { SchemaProps: spec.SchemaProps{ Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + Ref: ref(v1.EmptyDirVolumeSource{}.OpenAPIModelName()), }, }, "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "gitRepo": { SchemaProps: spec.SchemaProps{ Description: "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + Ref: ref(v1.GitRepoVolumeSource{}.OpenAPIModelName()), }, }, "secret": { SchemaProps: spec.SchemaProps{ Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + Ref: ref(v1.SecretVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ - Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi", + Ref: ref(v1.ISCSIVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ - Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported.", + Ref: ref(v1.GlusterfsVolumeSource{}.OpenAPIModelName()), }, }, "persistentVolumeClaim": { SchemaProps: spec.SchemaProps{ Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + Ref: ref(v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ - Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported.", + Ref: ref(v1.RBDVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + Ref: ref(v1.FlexVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + Ref: ref(v1.CinderVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + Ref: ref(v1.CephFSVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + Ref: ref(v1.DownwardAPIVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + Ref: ref(v1.AzureFileVolumeSource{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + Ref: ref(v1.ConfigMapVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "projected": { SchemaProps: spec.SchemaProps{ Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + Ref: ref(v1.ProjectedVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + Ref: ref(v1.ScaleIOVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + Ref: ref(v1.StorageOSVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + Ref: ref(v1.CSIVolumeSource{}.OpenAPIModelName()), }, }, "ephemeral": { SchemaProps: spec.SchemaProps{ Description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + Ref: ref(v1.EphemeralVolumeSource{}.OpenAPIModelName()), }, }, "image": { SchemaProps: spec.SchemaProps{ Description: "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", - Ref: ref("k8s.io/api/core/v1.ImageVolumeSource"), + Ref: ref(v1.ImageVolumeSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.ImageVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFileVolumeSource{}.OpenAPIModelName(), v1.CSIVolumeSource{}.OpenAPIModelName(), v1.CephFSVolumeSource{}.OpenAPIModelName(), v1.CinderVolumeSource{}.OpenAPIModelName(), v1.ConfigMapVolumeSource{}.OpenAPIModelName(), v1.DownwardAPIVolumeSource{}.OpenAPIModelName(), v1.EmptyDirVolumeSource{}.OpenAPIModelName(), v1.EphemeralVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GitRepoVolumeSource{}.OpenAPIModelName(), v1.GlusterfsVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIVolumeSource{}.OpenAPIModelName(), v1.ImageVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.ProjectedVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDVolumeSource{}.OpenAPIModelName(), v1.ScaleIOVolumeSource{}.OpenAPIModelName(), v1.SecretVolumeSource{}.OpenAPIModelName(), v1.StorageOSVolumeSource{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -14079,7 +14576,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Required. A pod affinity term, associated with the corresponding weight.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(v1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -14087,7 +14584,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm"}, + v1.PodAffinityTerm{}.OpenAPIModelName()}, } } @@ -14132,6 +14629,91 @@ func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.Reference } } +func schema_k8sio_api_core_v1_WorkloadReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "podGroup": { + SchemaProps: spec.SchemaProps{ + Description: "PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "podGroupReplicaKey": { + SchemaProps: spec.SchemaProps{ + Description: "PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "podGroup"}, + }, + }, + } +} + +func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.EmbedOpenAPIDefinitionIntoV2Extension(common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + OneOf: common.GenerateOpenAPIV3OneOfSchema(resource.Quantity{}.OpenAPIV3OneOfTypes()), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + }, common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + Type: resource.Quantity{}.OpenAPISchemaType(), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + }) +} + +func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "value": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"value", "scale"}, + }, + }, + } +} + func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -14174,7 +14756,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, }, @@ -14184,7 +14766,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, "serverAddressByClientCIDRs": { @@ -14200,7 +14782,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -14211,7 +14793,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(), metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -14249,7 +14831,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + Ref: ref(metav1.APIGroup{}.OpenAPIModelName()), }, }, }, @@ -14260,7 +14842,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + metav1.APIGroup{}.OpenAPIModelName()}, } } @@ -14428,7 +15010,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + Ref: ref(metav1.APIResource{}.OpenAPIModelName()), }, }, }, @@ -14439,7 +15021,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + metav1.APIResource{}.OpenAPIModelName()}, } } @@ -14497,7 +15079,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -14508,7 +15090,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -14609,7 +15191,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "lastTransitionTime": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -14633,7 +15215,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -14729,7 +15311,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. "preconditions": { SchemaProps: spec.SchemaProps{ Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + Ref: ref(metav1.Preconditions{}.OpenAPIModelName()), }, }, "orphanDependents": { @@ -14777,7 +15359,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + metav1.Preconditions{}.OpenAPIModelName()}, } } @@ -15089,15 +15671,12 @@ func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common. "Object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), }, }, }, Required: []string{"Type", "Object"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, } } @@ -15137,7 +15716,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + Ref: ref(metav1.LabelSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -15152,7 +15731,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + metav1.LabelSelectorRequirement{}.OpenAPIModelName()}, } } @@ -15231,7 +15810,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -15241,7 +15820,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -15252,7 +15831,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ListMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -15425,7 +16004,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "time": { SchemaProps: spec.SchemaProps{ Description: "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "fieldsType": { @@ -15438,7 +16017,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "fieldsV1": { SchemaProps: spec.SchemaProps{ Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + Ref: ref(metav1.FieldsV1{}.OpenAPIModelName()), }, }, "subresource": { @@ -15452,7 +16031,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.FieldsV1{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -15527,13 +16106,13 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope "creationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionTimestamp": { SchemaProps: spec.SchemaProps{ Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionGracePeriodSeconds": { @@ -15593,7 +16172,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Ref: ref(metav1.OwnerReference{}.OpenAPIModelName()), }, }, }, @@ -15633,7 +16212,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), + Ref: ref(metav1.ManagedFieldsEntry{}.OpenAPIModelName()), }, }, }, @@ -15643,7 +16222,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.ManagedFieldsEntry{}.OpenAPIModelName(), metav1.OwnerReference{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -15737,14 +16316,14 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -15773,7 +16352,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -15784,7 +16363,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Ref: ref(metav1.PartialObjectMetadata{}.OpenAPIModelName()), }, }, }, @@ -15795,7 +16374,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.PartialObjectMetadata{}.OpenAPIModelName()}, } } @@ -15994,7 +16573,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "status": { @@ -16019,14 +16598,9 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, "details": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + Ref: ref(metav1.StatusDetails{}.OpenAPIModelName()), }, }, "code": { @@ -16040,7 +16614,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.StatusDetails{}.OpenAPIModelName()}, } } @@ -16126,7 +16700,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + Ref: ref(metav1.StatusCause{}.OpenAPIModelName()), }, }, }, @@ -16143,7 +16717,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + metav1.StatusCause{}.OpenAPIModelName()}, } } @@ -16172,7 +16746,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "columnDefinitions": { @@ -16188,7 +16762,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + Ref: ref(metav1.TableColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -16207,7 +16781,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + Ref: ref(metav1.TableRow{}.OpenAPIModelName()), }, }, }, @@ -16218,7 +16792,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.TableColumnDefinition{}.OpenAPIModelName(), metav1.TableRow{}.OpenAPIModelName()}, } } @@ -16349,7 +16923,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + Ref: ref(metav1.TableRowCondition{}.OpenAPIModelName()), }, }, }, @@ -16358,7 +16932,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA "object": { SchemaProps: spec.SchemaProps{ Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -16366,7 +16940,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.TableRowCondition{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -16561,7 +17135,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope "object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -16569,7 +17143,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -16782,7 +17356,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClust "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -16795,7 +17369,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClust }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackClusterIdentitySpec"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackClusterIdentitySpec"}, } } @@ -16823,7 +17397,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClust "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -16844,7 +17418,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClust }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackClusterIdentity"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackClusterIdentity"}, } } @@ -16865,7 +17439,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClust "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "NamespaceSelector limits which namespaces may use this identity. If nil, all namespaces are allowed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, @@ -16873,7 +17447,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackClust }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackCredentialSecretReference"}, + metav1.LabelSelector{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackCredentialSecretReference"}, } } @@ -16931,7 +17505,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -16950,7 +17524,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackFloatingIPPoolSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackFloatingIPPoolStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackFloatingIPPoolSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackFloatingIPPoolStatus"}, } } @@ -16978,7 +17552,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -16999,7 +17573,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackFloatingIPPool"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackFloatingIPPool"}, } } @@ -17036,13 +17610,13 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat SchemaProps: spec.SchemaProps{ Description: "IdentityRef is a reference to a identity to be used when reconciling this pool.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference"), }, }, "floatingIPNetwork": { SchemaProps: spec.SchemaProps{ Description: "FloatingIPNetwork is the external network to use for floating ips, if there's only one external network it will be used by default", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam"), }, }, "reclaimPolicy": { @@ -17058,7 +17632,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference"}, } } @@ -17115,7 +17689,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat "floatingIPNetwork": { SchemaProps: spec.SchemaProps{ Description: "floatingIPNetwork contains information about the network used for floating ips", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatus"), }, }, "conditions": { @@ -17125,7 +17699,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -17135,7 +17709,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackFloat }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatus"}, } } @@ -17163,7 +17737,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -17182,7 +17756,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackServerSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackServerStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackServerSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackServerStatus"}, } } @@ -17210,7 +17784,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -17231,7 +17805,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackServer"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.OpenStackServer"}, } } @@ -17258,7 +17832,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AdditionalBlockDevice"), }, }, }, @@ -17295,21 +17869,21 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe "floatingIPPoolRef": { SchemaProps: spec.SchemaProps{ Description: "FloatingIPPoolRef is a reference to a FloatingIPPool to allocate a floating IP from.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(v1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, "identityRef": { SchemaProps: spec.SchemaProps{ Description: "IdentityRef is a reference to a secret holding OpenStack credentials.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference"), }, }, "image": { SchemaProps: spec.SchemaProps{ Description: "The image to use for the server instance.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageParam"), }, }, "ports": { @@ -17320,7 +17894,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortOpts"), }, }, }, @@ -17329,7 +17903,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe "rootVolume": { SchemaProps: spec.SchemaProps{ Description: "RootVolume is the specification for the root volume of the server instance.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RootVolume"), }, }, "sshKeyName": { @@ -17348,7 +17922,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam"), }, }, }, @@ -17357,7 +17931,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe "serverGroup": { SchemaProps: spec.SchemaProps{ Description: "ServerGroup is the server group to which the server instance belongs.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupParam"), }, }, "serverMetadata": { @@ -17376,7 +17950,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerMetadata"), }, }, }, @@ -17412,7 +17986,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe "userDataRef": { SchemaProps: spec.SchemaProps{ Description: "UserDataRef is a reference to a secret containing the user data to be injected into the server instance.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "schedulerHintAdditionalProperties": { @@ -17431,7 +18005,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalProperty"), }, }, }, @@ -17442,7 +18016,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.TypedLocalObjectReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata"}, + v1.LocalObjectReference{}.OpenAPIModelName(), v1.TypedLocalObjectReference{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AdditionalBlockDevice", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortOpts", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RootVolume", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalProperty", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerMetadata"}, } } @@ -17483,7 +18057,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeAddress"), + Ref: ref(v1.NodeAddress{}.OpenAPIModelName()), }, }, }, @@ -17509,7 +18083,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -17520,7 +18094,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_OpenStackServe }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeAddress", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.ResolvedServerSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.ServerResources", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"}, + v1.NodeAddress{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.ResolvedServerSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1.ServerResources"}, } } @@ -17560,7 +18134,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_ResolvedServer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedPortSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedPortSpec"), }, }, }, @@ -17570,7 +18144,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_ResolvedServer }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedPortSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedPortSpec"}, } } @@ -17589,7 +18163,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_ServerResource Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortStatus"), }, }, }, @@ -17599,7 +18173,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1alpha1_ServerResource }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortStatus"}, } } @@ -17984,7 +18558,3951 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BindingProfile( } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceStorage(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceStorage(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BlockDeviceStorage is the storage type of a block device to create and contains additional storage options.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the type of block device to create. This can be either \"Volume\" or \"Local\".", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "volume": { + SchemaProps: spec.SchemaProps{ + Description: "Volume contains additional storage options for a volume block device.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BlockDeviceVolume"), + }, + }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "volume": "Volume", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BlockDeviceVolume"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BlockDeviceVolume contains additional storage options for a volume block device.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the Cinder volume type of the volume. If omitted, the default Cinder volume type that is configured in the OpenStack cloud will be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "availabilityZone": { + SchemaProps: spec.SchemaProps{ + Description: "AvailabilityZone is the volume availability zone to create the volume in. If not specified, the volume will be created without an explicit availability zone.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ClusterInitialization(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterInitialization represents the initialization status of the cluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "provisioned": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. The value of this field is never updated after provisioning is completed.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ExternalRouterIPParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "fixedIP": { + SchemaProps: spec.SchemaProps{ + Description: "The FixedIP in the corresponding subnet", + Type: []string{"string"}, + Format: "", + }, + }, + "subnet": { + SchemaProps: spec.SchemaProps{ + Description: "The subnet in which the FixedIP is used for the Gateway of this router", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"), + }, + }, + }, + Required: []string{"subnet"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FilterByNeutronTags(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags is a list of tags to filter by. If specified, the resource must have all of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "TagsAny is a list of tags to filter by. If specified, the resource must have at least one of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTags is a list of tags to filter by. If specified, resources which contain all of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTagsAny is a list of tags to filter by. If specified, resources which contain any of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FixedIP(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "subnet": { + SchemaProps: spec.SchemaProps{ + Description: "Subnet is an openstack subnet query that will return the id of a subnet to create the fixed IP of a port in. This query must not return more than one subnet.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"), + }, + }, + "ipAddress": { + SchemaProps: spec.SchemaProps{ + Description: "IPAddress is a specific IP address to assign to the port. If Subnet is also specified, IPAddress must be a valid IP address in the subnet. If Subnet is not specified, IPAddress must be a valid IP address in any subnet of the port's network.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageFilter describes a query for an image.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised.", + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The tags associated with the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageParam describes a glance image. It can be specified by ID, filter, or a reference to an ORC Image.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Description: "ID is the uuid of the image. ID will not be validated before use.", + Type: []string{"string"}, + Format: "", + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter describes a query for an image. If specified, the combination of name and tags must return a single matching image or an error will be raised.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageFilter"), + }, + }, + "imageRef": { + SchemaProps: spec.SchemaProps{ + Description: "ImageRef is a reference to an ORC Image in the same namespace as the referring object.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResourceReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageFilter", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResourceReference"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_LoadBalancer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancer represents basic information about the associated OpenStack LoadBalancer.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "id": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "internalIP": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedCIDRs": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tags": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "loadBalancerNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerNetwork contains information about network and/or subnets which the loadbalancer is allocated on. If subnets are specified within the LoadBalancerNetwork currently only the first subnet in the list is taken into account.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets"), + }, + }, + }, + Required: []string{"name", "id", "ip", "internalIP"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_MachineInitialization(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachineInitialization contains information about the initialization status of the machine.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "provisioned": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. The value of this field is never updated after provisioning is completed.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_MachineResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports is the status of the ports created for the machine.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ManagedSecurityGroups(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ManagedSecurityGroups defines the desired state of security groups and rules for the cluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "allNodesSecurityGroupRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "allNodesSecurityGroupRules defines the rules that should be applied to all nodes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"), + }, + }, + }, + }, + }, + "controlPlaneNodesSecurityGroupRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "controlPlaneNodesSecurityGroupRules defines the rules that should be applied to control plane nodes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"), + }, + }, + }, + }, + }, + "workerNodesSecurityGroupRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "workerNodesSecurityGroupRules defines the rules that should be applied to worker nodes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"), + }, + }, + }, + }, + }, + "allowAllInClusterTraffic": { + SchemaProps: spec.SchemaProps{ + Description: "AllowAllInClusterTraffic allows all ingress and egress traffic between cluster nodes when set to true.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"allowAllInClusterTraffic"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkFilter specifies a query to select an OpenStack network. At least one property must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "projectID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags is a list of tags to filter by. If specified, the resource must have all of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "TagsAny is a list of tags to filter by. If specified, the resource must have at least one of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTags is a list of tags to filter by. If specified, resources which contain all of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTagsAny is a list of tags to filter by. If specified, resources which contain any of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkParam specifies an OpenStack network. It may be specified by either ID or Filter, but not both.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Description: "ID is the ID of the network to use. If ID is provided, the other filters cannot be provided. Must be in UUID format.", + Type: []string{"string"}, + Format: "", + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter specifies a filter to select an OpenStack network. If provided, cannot be empty.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkFilter"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkFilter"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkStatus contains basic information about an existing neutron network.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "id": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "id"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatusWithSubnets(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkStatusWithSubnets represents basic information about an existing neutron network and an associated set of subnets.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "id": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "subnets": { + SchemaProps: spec.SchemaProps{ + Description: "Subnets is a list of subnets associated with the default cluster network. Machines which use the default cluster network will get an address from all of these subnets.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Subnet"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "id"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Subnet"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NodeInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeInfo contains information about the node's architecture and operating system.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operatingSystem": { + SchemaProps: spec.SchemaProps{ + Description: "operatingSystem is a string representing the operating system of the node. This may be a string like 'linux' or 'windows'.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluster(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackCluster is the Schema for the openstackclusters API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterStatus"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackClusterList contains a list of OpenStackCluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackCluster"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackCluster"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackClusterSpec defines the desired state of OpenStackCluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "managedSubnets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network, subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4 subnet is supported. If you leave this empty, no network will be created.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetSpec"), + }, + }, + }, + }, + }, + "router": { + SchemaProps: spec.SchemaProps{ + Description: "Router specifies an existing router to be used if ManagedSubnets are specified. If specified, no new router will be created.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterParam"), + }, + }, + "network": { + SchemaProps: spec.SchemaProps{ + Description: "Network specifies an existing network to use if no ManagedSubnets are specified.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam"), + }, + }, + "subnets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Subnets specifies existing subnets to use if not ManagedSubnets are specified. All subnets must be in the network specified by Network. There can be zero, one, or two subnets. If no subnets are specified, all subnets in Network will be used. If 2 subnets are specified, one must be IPv4 and the other IPv6.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"), + }, + }, + }, + }, + }, + "networkMTU": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID. This value will be used only if the Cluster actuator creates the network. If left empty, the network will have the default MTU defined in Openstack network service. To use this field, the Openstack installation requires the net-mtu neutron API extension.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "externalRouterIPs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ExternalRouterIPs is an array of externalIPs on the respective subnets. This is necessary if the router needs a fixed ip in a specific subnet.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ExternalRouterIPParam"), + }, + }, + }, + }, + }, + "externalNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs. This option is ignored if DisableExternalNetwork is set to true.\n\nIf ExternalNetwork is defined it must refer to exactly one external network.\n\nIf ExternalNetwork is not defined or is empty the controller will use any existing external network as long as there is only one. It is an error if ExternalNetwork is not defined and there are multiple external networks unless DisableExternalNetwork is also set.\n\nIf ExternalNetwork is not defined and there are no external networks the controller will proceed as though DisableExternalNetwork was set.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam"), + }, + }, + "disableExternalNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "DisableExternalNetwork specifies whether or not to attempt to connect the cluster to an external network. This allows for the creation of clusters when connecting to an external network is not possible or desirable, e.g. if using a provider network.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "apiServerLoadBalancer": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerLoadBalancer configures the optional LoadBalancer for the APIServer. If not specified, no load balancer will be created for the API server.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.APIServerLoadBalancer"), + }, + }, + "disableAPIServerFloatingIP": { + SchemaProps: spec.SchemaProps{ + Description: "DisableAPIServerFloatingIP determines whether or not to attempt to attach a floating IP to the API server. This allows for the creation of clusters when attaching a floating IP to the API server (and hence, in many cases, exposing the API server to the internet) is not possible or desirable, e.g. if using a shared VLAN for communication between management and workload clusters or when the management cluster is inside the project network. This option requires that the API server use a VIP on the cluster network so that the underlying machines can change without changing ControlPlaneEndpoint.Host. When using a managed load balancer, this VIP will be managed automatically. If not using a managed load balancer, cluster configuration will fail without additional configuration to manage the VIP on the control plane machines, which falls outside of the scope of this controller.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "apiServerFloatingIP": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerFloatingIP is the floatingIP which will be associated with the API server. The floatingIP will be created if it does not already exist. If not specified, a new floatingIP is allocated. This field is not used if DisableAPIServerFloatingIP is set to true.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiServerFixedIP": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerFixedIP is the fixed IP which will be associated with the API server. In the case where the API server has a floating IP but not a managed load balancer, this field is not used. If a managed load balancer is used and this field is not specified, a fixed IP will be dynamically allocated for the load balancer. If a managed load balancer is not used AND the API server floating IP is disabled, this field MUST be specified and should correspond to a pre-allocated port that holds the fixed IP to be used as a VIP.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiServerPort": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerPort is the port on which the listener on the APIServer will be created. If specified, it must be an integer between 0 and 65535.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "managedSecurityGroups": { + SchemaProps: spec.SchemaProps{ + Description: "ManagedSecurityGroups determines whether OpenStack security groups for the cluster will be managed by the OpenStack provider or whether pre-existing security groups will be specified as part of the configuration. By default, the managed security groups have rules that allow the Kubelet, etcd, and the Kubernetes API server to function correctly. It's possible to add additional rules to the managed security groups. When defined to an empty struct, the managed security groups will be created with the default rules.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ManagedSecurityGroups"), + }, + }, + "disablePortSecurity": { + SchemaProps: spec.SchemaProps{ + Description: "DisablePortSecurity disables the port security of the network created for the Kubernetes cluster, which also disables SecurityGroups", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags to set on all resources in cluster which support tags", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "controlPlaneEndpoint": { + SchemaProps: spec.SchemaProps{ + Description: "ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. It is normally populated automatically by the OpenStackCluster controller during cluster provisioning. If it is set on creation the control plane endpoint will use the values set here in preference to values set elsewhere. ControlPlaneEndpoint cannot be modified after ControlPlaneEndpoint.Host has been set.", + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint"), + }, + }, + "controlPlaneAvailabilityZones": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ControlPlaneAvailabilityZones is the set of availability zones which control plane machines may be deployed to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "controlPlaneOmitAvailabilityZone": { + SchemaProps: spec.SchemaProps{ + Description: "ControlPlaneOmitAvailabilityZone causes availability zone to be omitted when creating control plane nodes, allowing the Nova scheduler to make a decision on which availability zone to use based on other scheduling constraints", + Type: []string{"boolean"}, + Format: "", + }, + }, + "bastion": { + SchemaProps: spec.SchemaProps{ + Description: "Bastion is the OpenStack instance to login the nodes\n\nAs a rolling update is not ideal during a bastion host session, we prevent changes to a running bastion configuration. To make changes, it's required to first set `enabled: false` which will remove the bastion and then changes can be made.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Bastion"), + }, + }, + "identityRef": { + SchemaProps: spec.SchemaProps{ + Description: "IdentityRef is a reference to a secret holding OpenStack credentials to be used when reconciling this cluster. It is also to reconcile machines unless overridden in the machine spec.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference"), + }, + }, + }, + Required: []string{"identityRef"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.APIServerLoadBalancer", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Bastion", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ExternalRouterIPParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ManagedSecurityGroups", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackClusterStatus defines the observed state of OpenStackCluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "Ready is true when the cluster infrastructure is ready.\n\nDeprecated: This field is deprecated and will be removed in a future API version. Use status.conditions to determine the ready state of the cluster.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "initialization": { + SchemaProps: spec.SchemaProps{ + Description: "Initialization contains information about the initialization status of the cluster.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ClusterInitialization"), + }, + }, + "network": { + SchemaProps: spec.SchemaProps{ + Description: "Network contains information about the created OpenStack Network.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets"), + }, + }, + "externalNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "ExternalNetwork contains information about the external network used for default ingress and egress traffic.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus"), + }, + }, + "router": { + SchemaProps: spec.SchemaProps{ + Description: "Router describes the default cluster router", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Router"), + }, + }, + "apiServerLoadBalancer": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerLoadBalancer describes the api server load balancer if one exists", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.LoadBalancer"), + }, + }, + "failureDomains": { + SchemaProps: spec.SchemaProps{ + Description: "FailureDomains represent OpenStack availability zones", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"), + }, + }, + }, + }, + }, + "controlPlaneSecurityGroup": { + SchemaProps: spec.SchemaProps{ + Description: "ControlPlaneSecurityGroup contains the information about the OpenStack Security Group that needs to be applied to control plane nodes.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus"), + }, + }, + "workerSecurityGroup": { + SchemaProps: spec.SchemaProps{ + Description: "WorkerSecurityGroup contains the information about the OpenStack Security Group that needs to be applied to worker nodes.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus"), + }, + }, + "bastionSecurityGroup": { + SchemaProps: spec.SchemaProps{ + Description: "BastionSecurityGroup contains the information about the OpenStack Security Group that needs to be applied to worker nodes.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus"), + }, + }, + "bastion": { + SchemaProps: spec.SchemaProps{ + Description: "Bastion contains the information about the deployed bastion host", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BastionStatus"), + }, + }, + "failureReason": { + SchemaProps: spec.SchemaProps{ + Description: "FailureReason will be set in the event that there is a terminal problem reconciling the OpenStackCluster and will contain a succinct value suitable for machine interpretation.\n\nThis 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 OpenStackCluster'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.\n\nAny transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output.\n\nDeprecated: This field is deprecated and will be removed in a future API version. Use status.conditions to report failures.", + Type: []string{"string"}, + Format: "", + }, + }, + "failureMessage": { + SchemaProps: spec.SchemaProps{ + Description: "FailureMessage will be set in the event that there is a terminal problem reconciling the OpenStackCluster and will contain a more verbose string suitable for logging and human consumption.\n\nThis 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 OpenStackCluster'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.\n\nAny transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output.\n\nDeprecated: This field is deprecated and will be removed in a future API version. Use status.conditions to report failures.", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions defines current service state of the OpenStackCluster. This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster (both during initial provisioning and after the initial provisioning is completed).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), + }, + }, + }, + }, + }, + }, + Required: []string{"ready"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BastionStatus", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ClusterInitialization", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.LoadBalancer", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Router", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackClusterTemplate is the Schema for the openstackclustertemplates API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackClusterTemplateList contains a list of OpenStackClusterTemplate.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplate"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplate"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplateResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackClusterTemplateResource describes the data needed to create a OpenStackCluster from a template.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackClusterTemplateSpec defines the desired state of OpenStackClusterTemplate.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "template": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateResource"), + }, + }, + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateResource"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackIdentityReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackIdentityReference is a reference to an infrastructure provider identity to be used to provision cluster resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type specifies the identity reference type. Defaults to Secret for backward compatibility.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, or the name of an OpenStackClusterIdentity (type=ClusterIdentity). The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "cloudName": { + SchemaProps: spec.SchemaProps{ + Description: "CloudName specifies the name of the entry in the clouds.yaml file to use.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "region": { + SchemaProps: spec.SchemaProps{ + Description: "Region specifies an OpenStack region to use. If specified, it overrides any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "cloudName"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachine(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachine is the Schema for the openstackmachines API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineStatus"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineList contains a list of OpenStackMachine.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachine"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachine"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineSpec defines the desired state of OpenStackMachine.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "providerID": { + SchemaProps: spec.SchemaProps{ + Description: "ProviderID is the unique identifier as specified by the cloud provider.", + Type: []string{"string"}, + Format: "", + }, + }, + "flavor": { + SchemaProps: spec.SchemaProps{ + Description: "The flavor reference for the flavor for your server instance.", + Type: []string{"string"}, + Format: "", + }, + }, + "flavorID": { + SchemaProps: spec.SchemaProps{ + Description: "FlavorID allows flavors to be specified by ID. This field takes precedence over Flavor.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "The image to use for your server instance. If the rootVolume is specified, this will be used when creating the root volume.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam"), + }, + }, + "sshKeyName": { + SchemaProps: spec.SchemaProps{ + Description: "The ssh key to inject in the instance", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports to be attached to the server instance. They are created if a port with the given name does not already exist. If not specified a default port will be added for the default cluster network.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts"), + }, + }, + }, + }, + }, + "securityGroups": { + SchemaProps: spec.SchemaProps{ + Description: "The names of the security groups to assign to the instance", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam"), + }, + }, + }, + }, + }, + "trunk": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the server instance is created on a trunk port or not.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags which will be added to the machine and all dependent resources which support them. These are in addition to Tags defined on the cluster. Requires Nova api 2.52 minimum!", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "serverMetadata": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Metadata mapping. Allows you to create a map of key value pairs to add to the server instance.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata"), + }, + }, + }, + }, + }, + "configDrive": { + SchemaProps: spec.SchemaProps{ + Description: "Config Drive support", + Type: []string{"boolean"}, + Format: "", + }, + }, + "rootVolume": { + SchemaProps: spec.SchemaProps{ + Description: "The volume metadata to boot from", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume"), + }, + }, + "additionalBlockDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "AdditionalBlockDevices is a list of specifications for additional block devices to attach to the server instance", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice"), + }, + }, + }, + }, + }, + "serverGroup": { + SchemaProps: spec.SchemaProps{ + Description: "The server group to assign the machine to.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam"), + }, + }, + "identityRef": { + SchemaProps: spec.SchemaProps{ + Description: "IdentityRef is a reference to a secret holding OpenStack credentials to be used when reconciling this machine. If not specified, the credentials specified in the cluster will be used.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference"), + }, + }, + "floatingIPPoolRef": { + SchemaProps: spec.SchemaProps{ + Description: "floatingIPPoolRef is a reference to a IPPool that will be assigned to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP will be assigned to the OpenStackMachine.", + Ref: ref(v1.TypedLocalObjectReference{}.OpenAPIModelName()), + }, + }, + "schedulerHintAdditionalProperties": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, such as specifying certain host aggregates or availability zones.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty"), + }, + }, + }, + }, + }, + }, + Required: []string{"image"}, + }, + }, + Dependencies: []string{ + v1.TypedLocalObjectReference{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineStatus defines the observed state of OpenStackMachine.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "Ready is true when the provider resource is ready.\n\nDeprecated: This field is deprecated and will be removed in a future API version. Use status.conditions to determine the ready state of the machine.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "initialization": { + SchemaProps: spec.SchemaProps{ + Description: "Initialization contains information about the initialization status of the machine.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineInitialization"), + }, + }, + "instanceID": { + SchemaProps: spec.SchemaProps{ + Description: "InstanceID is the OpenStack instance ID for this machine.", + Type: []string{"string"}, + Format: "", + }, + }, + "addresses": { + SchemaProps: spec.SchemaProps{ + Description: "Addresses contains the OpenStack instance associated addresses.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.NodeAddress{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "instanceState": { + SchemaProps: spec.SchemaProps{ + Description: "InstanceState is the state of the OpenStack instance for this machine. This field is not set anymore by the OpenStackMachine controller. Instead, it's set by the OpenStackServer controller.", + Type: []string{"string"}, + Format: "", + }, + }, + "resolved": { + SchemaProps: spec.SchemaProps{ + Description: "Resolved contains parts of the machine spec with all external references fully resolved.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedMachineSpec"), + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources contains references to OpenStack resources created for the machine.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineResources"), + }, + }, + "failureReason": { + SchemaProps: spec.SchemaProps{ + Description: "FailureReason explains the reson behind a failure.\n\nDeprecated: This field is deprecated and will be removed in a future API version. Use status.conditions to report failures.", + Type: []string{"string"}, + Format: "", + }, + }, + "failureMessage": { + SchemaProps: spec.SchemaProps{ + 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.\n\nThis 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.\n\nAny 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.\n\nDeprecated: This field is deprecated and will be removed in a future API version. Use status.conditions to report failures.", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions defines current service state of the OpenStackMachine. This field surfaces into Machine's status.conditions[InfrastructureReady] condition. The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine (both during initial provisioning and after the initial provisioning is completed).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + v1.NodeAddress{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineInitialization", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineResources", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedMachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineTemplate is the Schema for the openstackmachinetemplates API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateStatus"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineTemplateList contains a list of OpenStackMachineTemplate.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplate"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplate"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineTemplateResource describes the data needed to create a OpenStackMachine from a template.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec is the specification of the desired behavior of the machine.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineTemplateSpec defines the desired state of OpenStackMachineTemplate.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "template": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateResource"), + }, + }, + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateResource"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity defines the resource capacity for this machine. This value is used for autoscaling from zero operations as defined in: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref(resource.Quantity{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "nodeInfo": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NodeInfo"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions defines current service state of the OpenStackMachineTemplate. The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. (both during initial provisioning and after the initial provisioning is completed).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + resource.Quantity{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NodeInfo", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "network": { + SchemaProps: spec.SchemaProps{ + Description: "Network is a query for an openstack network that the port will be created or discovered on. This will fail if the query returns more than one network.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam"), + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "Description is a human-readable description for the port.", + Type: []string{"string"}, + Format: "", + }, + }, + "nameSuffix": { + SchemaProps: spec.SchemaProps{ + Description: "NameSuffix will be appended to the name of the port if specified. If unspecified, instead the 0-based index of the port in the list is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "fixedIPs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.FixedIP"), + }, + }, + }, + }, + }, + "securityGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "SecurityGroups is a list of the names, uuids, filters or any combination these of the security groups to assign to the instance.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam"), + }, + }, + }, + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags applied to the port (and corresponding trunk, if a trunk is configured.) These tags are applied in addition to the instance's tags, which will also be applied to the port.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "trunk": { + SchemaProps: spec.SchemaProps{ + Description: "Trunk specifies whether trunking is enabled at the port level. If not provided the value is inherited from the machine, or false for a bastion host.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "adminStateUp": { + SchemaProps: spec.SchemaProps{ + Description: "AdminStateUp specifies whether the port should be created in the up (true) or down (false) state. The default is up.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "macAddress": { + SchemaProps: spec.SchemaProps{ + Description: "MACAddress specifies the MAC address of the port. If not specified, the MAC address will be generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedAddressPairs": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedAddressPairs is a list of address pairs which Neutron will allow the port to send traffic from in addition to the port's addresses. If not specified, the MAC Address will be the MAC Address of the port. Depending on the configuration of Neutron, it may be supported to specify a CIDR instead of a specific IP address.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair"), + }, + }, + }, + }, + }, + "hostID": { + SchemaProps: spec.SchemaProps{ + Description: "HostID specifies the ID of the host where the port resides.", + Type: []string{"string"}, + Format: "", + }, + }, + "vnicType": { + SchemaProps: spec.SchemaProps{ + Description: "VNICType specifies the type of vNIC which this port should be attached to. This is used to determine which mechanism driver(s) to be used to bind the port. The valid values are normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder, smart-nic and remote-managed, although these values will not be validated in this API to ensure compatibility with future neutron changes or custom implementations. What type of vNIC is actually available depends on deployments. If not specified, the Neutron default value is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "profile": { + SchemaProps: spec.SchemaProps{ + Description: "Profile is a set of key-value pairs that are used for binding details. We intentionally don't expose this as a map[string]string because we only want to enable the users to set the values of the keys that are known to work in OpenStack Networking API. See https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port To set profiles, your tenant needs permissions rule:create_port, and rule:create_port:binding:profile", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile"), + }, + }, + "disablePortSecurity": { + SchemaProps: spec.SchemaProps{ + Description: "DisablePortSecurity enables or disables the port security when set. When not set, it takes the value of the corresponding field at the network level.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "propagateUplinkStatus": { + SchemaProps: spec.SchemaProps{ + Description: "PropageteUplinkStatus enables or disables the propagate uplink status on the port.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "valueSpecs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Value specs are extra parameters to include in the API request with OpenStack. This is an extension point for the API, so what they do and if they are supported, depends on the specific OpenStack implementation.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.FixedIP", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Description: "ID is the unique identifier of the port.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"id"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedFixedIP(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResolvedFixedIP is a FixedIP with the Subnet resolved to an ID.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "subnet": { + SchemaProps: spec.SchemaProps{ + Description: "SubnetID is the id of a subnet to create the fixed IP of a port in.", + Type: []string{"string"}, + Format: "", + }, + }, + "ipAddress": { + SchemaProps: spec.SchemaProps{ + Description: "IPAddress is a specific IP address to assign to the port. If SubnetID is also specified, IPAddress must be a valid IP address in the subnet. If Subnet is not specified, IPAddress must be a valid IP address in any subnet of the port's network.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedMachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResolvedMachineSpec contains resolved references to resources required by the machine.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serverGroupID": { + SchemaProps: spec.SchemaProps{ + Description: "ServerGroupID is the ID of the server group the machine should be added to and is calculated based on ServerGroupFilter.", + Type: []string{"string"}, + Format: "", + }, + }, + "imageID": { + SchemaProps: spec.SchemaProps{ + Description: "ImageID is the ID of the image to use for the machine and is calculated based on ImageFilter.", + Type: []string{"string"}, + Format: "", + }, + }, + "flavorID": { + SchemaProps: spec.SchemaProps{ + Description: "FlavorID is the ID of the flavor to use.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports is the fully resolved list of ports to create for the machine.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedPortSpec"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedPortSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResolvedPortSpec is a PortOpts with all contained references fully resolved.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the port.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "Description is a human-readable description for the port.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "networkID": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkID is the ID of the network the port will be created in.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags applied to the port (and corresponding trunk, if a trunk is configured.)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "trunk": { + SchemaProps: spec.SchemaProps{ + Description: "Trunk specifies whether trunking is enabled at the port level.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fixedIPs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedFixedIP"), + }, + }, + }, + }, + }, + "securityGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "SecurityGroups is a list of security group IDs to assign to the port.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "adminStateUp": { + SchemaProps: spec.SchemaProps{ + Description: "AdminStateUp specifies whether the port should be created in the up (true) or down (false) state. The default is up.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "macAddress": { + SchemaProps: spec.SchemaProps{ + Description: "MACAddress specifies the MAC address of the port. If not specified, the MAC address will be generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedAddressPairs": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedAddressPairs is a list of address pairs which Neutron will allow the port to send traffic from in addition to the port's addresses. If not specified, the MAC Address will be the MAC Address of the port. Depending on the configuration of Neutron, it may be supported to specify a CIDR instead of a specific IP address.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair"), + }, + }, + }, + }, + }, + "hostID": { + SchemaProps: spec.SchemaProps{ + Description: "HostID specifies the ID of the host where the port resides.", + Type: []string{"string"}, + Format: "", + }, + }, + "vnicType": { + SchemaProps: spec.SchemaProps{ + Description: "VNICType specifies the type of vNIC which this port should be attached to. This is used to determine which mechanism driver(s) to be used to bind the port. The valid values are normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder, smart-nic and remote-managed, although these values will not be validated in this API to ensure compatibility with future neutron changes or custom implementations. What type of vNIC is actually available depends on deployments. If not specified, the Neutron default value is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "profile": { + SchemaProps: spec.SchemaProps{ + Description: "Profile is a set of key-value pairs that are used for binding details. We intentionally don't expose this as a map[string]string because we only want to enable the users to set the values of the keys that are known to work in OpenStack Networking API. See https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port To set profiles, your tenant needs permissions rule:create_port, and rule:create_port:binding:profile", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile"), + }, + }, + "disablePortSecurity": { + SchemaProps: spec.SchemaProps{ + Description: "DisablePortSecurity enables or disables the port security when set. When not set, it takes the value of the corresponding field at the network level.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "propagateUplinkStatus": { + SchemaProps: spec.SchemaProps{ + Description: "PropageteUplinkStatus enables or disables the propagate uplink status on the port.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "valueSpecs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Value specs are extra parameters to include in the API request with OpenStack. This is an extension point for the API, so what they do and if they are supported, depends on the specific OpenStack implementation.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "description", "networkID"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedFixedIP", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpecFields(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResolvePortSpecFields is a convenience struct containing all fields of a PortOpts which don't contain references which need to be resolved, and can therefore be shared with ResolvedPortSpec.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "adminStateUp": { + SchemaProps: spec.SchemaProps{ + Description: "AdminStateUp specifies whether the port should be created in the up (true) or down (false) state. The default is up.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "macAddress": { + SchemaProps: spec.SchemaProps{ + Description: "MACAddress specifies the MAC address of the port. If not specified, the MAC address will be generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedAddressPairs": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedAddressPairs is a list of address pairs which Neutron will allow the port to send traffic from in addition to the port's addresses. If not specified, the MAC Address will be the MAC Address of the port. Depending on the configuration of Neutron, it may be supported to specify a CIDR instead of a specific IP address.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair"), + }, + }, + }, + }, + }, + "hostID": { + SchemaProps: spec.SchemaProps{ + Description: "HostID specifies the ID of the host where the port resides.", + Type: []string{"string"}, + Format: "", + }, + }, + "vnicType": { + SchemaProps: spec.SchemaProps{ + Description: "VNICType specifies the type of vNIC which this port should be attached to. This is used to determine which mechanism driver(s) to be used to bind the port. The valid values are normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder, smart-nic and remote-managed, although these values will not be validated in this API to ensure compatibility with future neutron changes or custom implementations. What type of vNIC is actually available depends on deployments. If not specified, the Neutron default value is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "profile": { + SchemaProps: spec.SchemaProps{ + Description: "Profile is a set of key-value pairs that are used for binding details. We intentionally don't expose this as a map[string]string because we only want to enable the users to set the values of the keys that are known to work in OpenStack Networking API. See https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port To set profiles, your tenant needs permissions rule:create_port, and rule:create_port:binding:profile", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile"), + }, + }, + "disablePortSecurity": { + SchemaProps: spec.SchemaProps{ + Description: "DisablePortSecurity enables or disables the port security when set. When not set, it takes the value of the corresponding field at the network level.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "propagateUplinkStatus": { + SchemaProps: spec.SchemaProps{ + Description: "PropageteUplinkStatus enables or disables the propagate uplink status on the port.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "valueSpecs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Value specs are extra parameters to include in the API request with OpenStack. This is an extension point for the API, so what they do and if they are supported, depends on the specific OpenStack implementation.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResourceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the referenced resource", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RootVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "sizeGiB": { + SchemaProps: spec.SchemaProps{ + Description: "SizeGiB is the size of the block device in gibibytes (GiB).", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the Cinder volume type of the volume. If omitted, the default Cinder volume type that is configured in the OpenStack cloud will be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "availabilityZone": { + SchemaProps: spec.SchemaProps{ + Description: "AvailabilityZone is the volume availability zone to create the volume in. If not specified, the volume will be created without an explicit availability zone.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"), + }, + }, + }, + Required: []string{"sizeGiB"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_Router(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Router represents basic information about the associated OpenStack Neutron Router.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "id": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ips": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "id"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RouterFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RouterFilter specifies a query to select an OpenStack router. At least one property must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "projectID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags is a list of tags to filter by. If specified, the resource must have all of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "TagsAny is a list of tags to filter by. If specified, the resource must have at least one of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTags is a list of tags to filter by. If specified, resources which contain all of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTagsAny is a list of tags to filter by. If specified, resources which contain any of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RouterParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RouterParam specifies an OpenStack router to use. It may be specified by either ID or filter, but not both.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Description: "ID is the ID of the router to use. If ID is provided, the other filters cannot be provided. Must be in UUID format.", + Type: []string{"string"}, + Format: "", + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter specifies a filter to select an OpenStack router. If provided, cannot be empty.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterFilter"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterFilter"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SchedulerHintAdditionalProperty(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. It includes a Name to identify the property and a Value that can be of various types.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the scheduler hint property. It is a unique identifier for the property.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the value of the scheduler hint property, which can be of various types (e.g., bool, string, int). The type is indicated by the Value.Type field.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalValue"), + }, + }, + }, + Required: []string{"name", "value"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalValue"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SchedulerHintAdditionalValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SchedulerHintAdditionalValue represents the value of a scheduler hint property. The value can be of various types: Bool, String, or Number. The Type field indicates the type of the value being used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type represents the type of the value. Valid values are Bool, String, and Number.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "bool": { + SchemaProps: spec.SchemaProps{ + Description: "Bool is the boolean value of the scheduler hint, used when Type is \"Bool\". This field is required if type is 'Bool', and must not be set otherwise.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "number": { + SchemaProps: spec.SchemaProps{ + Description: "Number is the integer value of the scheduler hint, used when Type is \"Number\". This field is required if type is 'Number', and must not be set otherwise.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "string": { + SchemaProps: spec.SchemaProps{ + Description: "String is the string value of the scheduler hint, used when Type is \"String\". This field is required if type is 'String', and must not be set otherwise.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecurityGroupFilter specifies a query to select an OpenStack security group. At least one property must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "projectID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags is a list of tags to filter by. If specified, the resource must have all of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "TagsAny is a list of tags to filter by. If specified, the resource must have at least one of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTags is a list of tags to filter by. If specified, resources which contain all of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTagsAny is a list of tags to filter by. If specified, resources which contain any of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecurityGroupParam specifies an OpenStack security group. It may be specified by ID or filter, but not both.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Description: "ID is the ID of the security group to use. If ID is provided, the other filters cannot be provided. Must be in UUID format.", + Type: []string{"string"}, + Format: "", + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter specifies a query to select an OpenStack security group. If provided, cannot be empty.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupFilter"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupFilter"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecurityGroupRuleSpec represent the basic information of the associated OpenStack Security Group Role. For now this is only used for the allNodesSecurityGroupRules but when we add other security groups, we'll need to add a validation because Remote* fields are mutually exclusive.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name of the security group rule. It's used to identify the rule so it can be patched and will not be sent to the OpenStack API.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description of the security group rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "direction": { + SchemaProps: spec.SchemaProps{ + Description: "direction in which the security group rule is applied. The only values allowed are \"ingress\" or \"egress\". For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etherType": { + SchemaProps: spec.SchemaProps{ + Description: "etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.", + Type: []string{"string"}, + Format: "", + }, + }, + "portRangeMin": { + SchemaProps: spec.SchemaProps{ + Description: "portRangeMin is a number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the portRangeMax attribute.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "portRangeMax": { + SchemaProps: spec.SchemaProps{ + Description: "portRangeMax is a number in the range that is matched by the security group rule. The portRangeMin attribute constrains the portRangeMax attribute.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "protocol is the protocol that is matched by the security group rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "remoteGroupID": { + SchemaProps: spec.SchemaProps{ + Description: "remoteGroupID is the remote group ID to be associated with this security group rule. You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups.", + Type: []string{"string"}, + Format: "", + }, + }, + "remoteIPPrefix": { + SchemaProps: spec.SchemaProps{ + Description: "remoteIPPrefix is the remote IP prefix to be associated with this security group rule. You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups.", + Type: []string{"string"}, + Format: "", + }, + }, + "remoteManagedGroups": { + SchemaProps: spec.SchemaProps{ + Description: "remoteManagedGroups is the remote managed groups to be associated with this security group rule. You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "direction"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecurityGroupStatus represents the basic information of the associated OpenStack Neutron Security Group.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name of the security group", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "id": { + SchemaProps: spec.SchemaProps{ + Description: "id of the security group", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "id"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerGroupFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServerGroupFilter specifies a query to select an OpenStack server group. At least one property must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of a server group to look for.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerGroupParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServerGroupParam specifies an OpenStack server group. It may be specified by ID or filter, but not both.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Description: "ID is the ID of the server group to use.", + Type: []string{"string"}, + Format: "", + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter specifies a query to select an OpenStack server group. If provided, it cannot be empty.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupFilter"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupFilter"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "Key is the server metadata key", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the server metadata value", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"key", "value"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_Subnet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Subnet represents basic information about the associated OpenStack Neutron Subnet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "id": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "cidr": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "id", "cidr"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubnetFilter specifies a filter to select a subnet. At least one parameter must be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "projectID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "gatewayIP": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "cidr": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6AddressMode": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6RAMode": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Tags is a list of tags to filter by. If specified, the resource must have all of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "TagsAny is a list of tags to filter by. If specified, the resource must have at least one of the tags specified to be included in the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTags": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTags is a list of tags to filter by. If specified, resources which contain all of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notTagsAny": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "NotTagsAny is a list of tags to filter by. If specified, resources which contain any of the given tags will be excluded from the result.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubnetParam specifies an OpenStack subnet to use. It may be specified by either ID or filter, but not both.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Description: "ID is the uuid of the subnet. It will not be validated.", + Type: []string{"string"}, + Format: "", + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter specifies a filter to select the subnet. It must match exactly one subnet.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetFilter"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetFilter"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cidr": { + SchemaProps: spec.SchemaProps{ + Description: "CIDR is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. This field is required when defining a subnet.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "dnsNameservers": { + SchemaProps: spec.SchemaProps{ + Description: "DNSNameservers holds a list of DNS server addresses that will be provided when creating the subnet. These addresses need to have the same IP version as CIDR.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allocationPools": { + SchemaProps: spec.SchemaProps{ + Description: "AllocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from outside of these ranges manually.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AllocationPool"), + }, + }, + }, + }, + }, + }, + Required: []string{"cidr"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AllocationPool"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ValueSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValueSpec represents a single value_spec key-value pair.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the key-value pair. This is just for identifying the pair and will not be sent to the OpenStack API.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "key": { + SchemaProps: spec.SchemaProps{ + Description: "Key is the key in the key-value pair.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the value in the key-value pair.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "key", "value"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_VolumeAvailabilityZone(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAvailabilityZone specifies the availability zone for a volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "from": { + SchemaProps: spec.SchemaProps{ + Description: "From specifies where we will obtain the availability zone for the volume. The options are \"Name\" and \"Machine\". If \"Name\" is specified then the Name field must also be specified. If \"Machine\" is specified the volume will use the value of FailureDomain, if any, from the associated Machine.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of a volume availability zone to use. It is required if From is \"Name\". The volume availability zone name may not contain spaces.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_APIServerLoadBalancer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled defines whether a load balancer should be created. This value defaults to true if an APIServerLoadBalancer is given.\n\nThere is no reason to set this to false. To disable creation of the API server loadbalancer, omit the APIServerLoadBalancer field in the cluster spec instead.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "additionalPorts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "AdditionalPorts adds additional tcp ports to the load balancer.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "allowedCIDRs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "AllowedCIDRs restrict access to all API-Server listeners to the given address CIDRs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Provider specifies name of a specific Octavia provider to use for the API load balancer. The Octavia default will be used if it is not specified.", + Type: []string{"string"}, + Format: "", + }, + }, + "network": { + SchemaProps: spec.SchemaProps{ + Description: "Network defines which network should the load balancer be allocated on.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam"), + }, + }, + "subnets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Subnets define which subnets should the load balancer be allocated on. It is expected that subnets are located on the network specified in this resource. Only the first element is taken into account. kubebuilder:validation:MaxLength:=2", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam"), + }, + }, + }, + }, + }, + "availabilityZone": { + SchemaProps: spec.SchemaProps{ + Description: "AvailabilityZone is the failure domain that will be used to create the APIServerLoadBalancer Spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "flavor": { + SchemaProps: spec.SchemaProps{ + Description: "Flavor is the flavor name that will be used to create the APIServerLoadBalancer Spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "monitor": { + SchemaProps: spec.SchemaProps{ + Description: "Monitor contains configuration for the load balancer health monitor.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.APIServerLoadBalancerMonitor"), + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.APIServerLoadBalancerMonitor", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_APIServerLoadBalancerMonitor(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServerLoadBalancerMonitor contains configuration for the load balancer health monitor.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "delay": { + SchemaProps: spec.SchemaProps{ + Description: "Delay is the time in seconds between sending probes to members.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout is the maximum time in seconds for a monitor to wait for a connection to be established before it times out.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxRetries": { + SchemaProps: spec.SchemaProps{ + Description: "MaxRetries is the number of successful checks before changing the operating status of the member to ONLINE.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxRetriesDown": { + SchemaProps: spec.SchemaProps{ + Description: "MaxRetriesDown is the number of allowed check failures before changing the operating status of the member to ERROR.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_AdditionalBlockDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AdditionalBlockDevice is a block device to attach to the server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the block device in the context of a machine. If the block device is a volume, the Cinder volume will be named as a combination of the machine name and this name. Also, this name will be used for tagging the block device. Information about the block device tag can be obtained from the OpenStack metadata API or the config drive. Name cannot be 'root', which is reserved for the root volume.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "sizeGiB": { + SchemaProps: spec.SchemaProps{ + Description: "SizeGiB is the size of the block device in gibibytes (GiB).", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "Storage specifies the storage type of the block device and additional storage options.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BlockDeviceStorage"), + }, + }, + }, + Required: []string{"name", "sizeGiB", "storage"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BlockDeviceStorage"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_AddressPair(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ipAddress": { + SchemaProps: spec.SchemaProps{ + Description: "IPAddress is the IP address of the allowed address pair. Depending on the configuration of Neutron, it may be supported to specify a CIDR instead of a specific IP address.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "macAddress": { + SchemaProps: spec.SchemaProps{ + Description: "MACAddress is the MAC address of the allowed address pair. If not specified, the MAC address will be the MAC address of the port.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"ipAddress"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_AllocationPool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "start": { + SchemaProps: spec.SchemaProps{ + Description: "Start represents the start of the AllocationPool, that is the lowest IP of the pool.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "end": { + SchemaProps: spec.SchemaProps{ + Description: "End represents the end of the AlloctionPool, that is the highest IP of the pool.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"start", "end"}, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Bastion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Bastion represents basic information about the bastion node. If you enable bastion, the spec has to be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled means that bastion is enabled. The bastion is enabled by default if this field is not specified. Set this field to false to disable the bastion.\n\nIt is not currently possible to remove the bastion from the cluster spec without first disabling it by setting this field to false and waiting until the bastion has been deleted.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec for the bastion itself", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineSpec"), + }, + }, + "availabilityZone": { + SchemaProps: spec.SchemaProps{ + Description: "AvailabilityZone is the failure domain that will be used to create the Bastion Spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "floatingIP": { + SchemaProps: spec.SchemaProps{ + Description: "FloatingIP which will be associated to the bastion machine. It's the IP address, not UUID. The floating IP should already exist and should not be associated with a port. If FIP of this address does not exist, CAPO will try to create it, but by default only OpenStack administrators have privileges to do so.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BastionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "sshKeyName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "state": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "floatingIP": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resolved": { + SchemaProps: spec.SchemaProps{ + Description: "Resolved contains parts of the bastion's machine spec with all external references fully resolved.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedMachineSpec"), + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources contains references to OpenStack resources created for the bastion.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineResources"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineResources", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedMachineSpec"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BindingProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ovsHWOffload": { + SchemaProps: spec.SchemaProps{ + Description: "OVSHWOffload enables or disables the OVS hardware offload feature. This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. See: https://bugs.launchpad.net/nova/+bug/2020813", + Type: []string{"boolean"}, + Format: "", + }, + }, + "trustedVF": { + SchemaProps: spec.SchemaProps{ + Description: "TrustedVF enables or disables the “trusted mode” for the VF.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BlockDeviceStorage(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18002,7 +22520,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceStor "volume": { SchemaProps: spec.SchemaProps{ Description: "Volume contains additional storage options for a volume block device.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BlockDeviceVolume"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BlockDeviceVolume"), }, }, }, @@ -18022,11 +22540,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceStor }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BlockDeviceVolume"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BlockDeviceVolume"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_BlockDeviceVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18043,18 +22561,38 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_BlockDeviceVolu "availabilityZone": { SchemaProps: spec.SchemaProps{ Description: "AvailabilityZone is the volume availability zone to create the volume in. If not specified, the volume will be created without an explicit availability zone.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.VolumeAvailabilityZone"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.VolumeAvailabilityZone"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ExternalRouterIPParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ClusterInitialization(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterInitialization represents the initialization status of the cluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "provisioned": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. The value of this field is never updated after provisioning is completed.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ExternalRouterIPParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18071,7 +22609,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ExternalRouterI SchemaProps: spec.SchemaProps{ Description: "The subnet in which the FixedIP is used for the Gateway of this router", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam"), }, }, }, @@ -18079,11 +22617,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ExternalRouterI }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FilterByNeutronTags(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_FilterByNeutronTags(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18175,7 +22713,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FilterByNeutron } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FixedIP(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_FixedIP(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18184,7 +22722,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FixedIP(ref com "subnet": { SchemaProps: spec.SchemaProps{ Description: "Subnet is an openstack subnet query that will return the id of a subnet to create the fixed IP of a port in. This query must not return more than one subnet.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam"), }, }, "ipAddress": { @@ -18198,11 +22736,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_FixedIP(ref com }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ImageFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18242,7 +22780,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageFilter(ref } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ImageParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18259,24 +22797,24 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ImageParam(ref "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter describes a query for an image. If specified, the combination of name and tags must return a single matching image or an error will be raised.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageFilter"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageFilter"), }, }, "imageRef": { SchemaProps: spec.SchemaProps{ Description: "ImageRef is a reference to an ORC Image in the same namespace as the referring object.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResourceReference"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResourceReference"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageFilter", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResourceReference"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageFilter", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResourceReference"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_LoadBalancer(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_LoadBalancer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18342,7 +22880,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_LoadBalancer(re "loadBalancerNetwork": { SchemaProps: spec.SchemaProps{ Description: "LoadBalancerNetwork contains information about network and/or subnets which the loadbalancer is allocated on. If subnets are specified within the LoadBalancerNetwork currently only the first subnet in the list is taken into account.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatusWithSubnets"), }, }, }, @@ -18350,11 +22888,31 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_LoadBalancer(re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatusWithSubnets"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_MachineResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_MachineInitialization(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachineInitialization contains information about the initialization status of the machine.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "provisioned": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. The value of this field is never updated after provisioning is completed.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_MachineResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18368,7 +22926,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_MachineResource Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortStatus"), }, }, }, @@ -18378,11 +22936,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_MachineResource }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortStatus"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ManagedSecurityGroups(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ManagedSecurityGroups(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18407,7 +22965,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ManagedSecurity Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupRuleSpec"), }, }, }, @@ -18431,7 +22989,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ManagedSecurity Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupRuleSpec"), }, }, }, @@ -18455,7 +23013,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ManagedSecurity Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupRuleSpec"), }, }, }, @@ -18474,11 +23032,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ManagedSecurity }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupRuleSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupRuleSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18589,7 +23147,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkFilter(r } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18606,18 +23164,18 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkParam(re "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter specifies a filter to select an OpenStack network. If provided, cannot be empty.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkFilter"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkFilter"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkFilter"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkFilter"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18659,7 +23217,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatus(r } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatusWithSubnets(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NetworkStatusWithSubnets(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18702,7 +23260,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatusWi Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Subnet"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Subnet"), }, }, }, @@ -18713,11 +23271,31 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_NetworkStatusWi }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Subnet"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Subnet"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluster(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_NodeInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeInfo contains information about the node's architecture and operating system.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operatingSystem": { + SchemaProps: spec.SchemaProps{ + Description: "operatingSystem is a string representing the operating system of the node. This may be a string like 'linux' or 'windows'.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackCluster(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18741,30 +23319,30 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterStatus"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18788,7 +23366,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -18798,7 +23376,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackCluster"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackCluster"), }, }, }, @@ -18809,11 +23387,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackCluster"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackCluster"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -18833,7 +23411,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetSpec"), }, }, }, @@ -18842,13 +23420,13 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "router": { SchemaProps: spec.SchemaProps{ Description: "Router specifies an existing router to be used if ManagedSubnets are specified. If specified, no new router will be created.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RouterParam"), }, }, "network": { SchemaProps: spec.SchemaProps{ Description: "Network specifies an existing network to use if no ManagedSubnets are specified.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam"), }, }, "subnets": { @@ -18864,7 +23442,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam"), }, }, }, @@ -18890,7 +23468,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ExternalRouterIPParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ExternalRouterIPParam"), }, }, }, @@ -18899,7 +23477,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "externalNetwork": { SchemaProps: spec.SchemaProps{ Description: "ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs. This option is ignored if DisableExternalNetwork is set to true.\n\nIf ExternalNetwork is defined it must refer to exactly one external network.\n\nIf ExternalNetwork is not defined or is empty the controller will use any existing external network as long as there is only one. It is an error if ExternalNetwork is not defined and there are multiple external networks unless DisableExternalNetwork is also set.\n\nIf ExternalNetwork is not defined and there are no external networks the controller will proceed as though DisableExternalNetwork was set.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam"), }, }, "disableExternalNetwork": { @@ -18912,7 +23490,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "apiServerLoadBalancer": { SchemaProps: spec.SchemaProps{ Description: "APIServerLoadBalancer configures the optional LoadBalancer for the APIServer. If not specified, no load balancer will be created for the API server.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.APIServerLoadBalancer"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.APIServerLoadBalancer"), }, }, "disableAPIServerFloatingIP": { @@ -18946,7 +23524,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "managedSecurityGroups": { SchemaProps: spec.SchemaProps{ Description: "ManagedSecurityGroups determines whether OpenStack security groups for the cluster will be managed by the OpenStack provider or whether pre-existing security groups will be specified as part of the configuration. By default, the managed security groups have rules that allow the Kubelet, etcd, and the Kubernetes API server to function correctly. It's possible to add additional rules to the managed security groups. When defined to an empty struct, the managed security groups will be created with the default rules.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ManagedSecurityGroups"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ManagedSecurityGroups"), }, }, "disablePortSecurity": { @@ -18979,7 +23557,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "controlPlaneEndpoint": { SchemaProps: spec.SchemaProps{ Description: "ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. It is normally populated automatically by the OpenStackCluster controller during cluster provisioning. If it is set on creation the control plane endpoint will use the values set here in preference to values set elsewhere. ControlPlaneEndpoint cannot be modified after ControlPlaneEndpoint.Host has been set.", - Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.APIEndpoint"), }, }, "controlPlaneAvailabilityZones": { @@ -19012,14 +23590,14 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "bastion": { SchemaProps: spec.SchemaProps{ Description: "Bastion is the OpenStack instance to login the nodes\n\nAs a rolling update is not ideal during a bastion host session, we prevent changes to a running bastion configuration. To make changes, it's required to first set `enabled: false` which will remove the bastion and then changes can be made.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Bastion"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Bastion"), }, }, "identityRef": { SchemaProps: spec.SchemaProps{ Description: "IdentityRef is a reference to a secret holding OpenStack credentials to be used when reconciling this cluster. It is also to reconcile machines unless overridden in the machine spec.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference"), }, }, }, @@ -19027,59 +23605,56 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.APIServerLoadBalancer", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Bastion", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ExternalRouterIPParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ManagedSecurityGroups", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.APIServerLoadBalancer", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Bastion", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ExternalRouterIPParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ManagedSecurityGroups", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RouterParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.APIEndpoint"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenStackClusterStatus defines the observed state of OpenStackCluster.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ready": { + "initialization": { SchemaProps: spec.SchemaProps{ - Description: "Ready is true when the cluster infrastructure is ready.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "Initialization contains information about the initialization status of the cluster.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ClusterInitialization"), }, }, "network": { SchemaProps: spec.SchemaProps{ Description: "Network contains information about the created OpenStack Network.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatusWithSubnets"), }, }, "externalNetwork": { SchemaProps: spec.SchemaProps{ Description: "ExternalNetwork contains information about the external network used for default ingress and egress traffic.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatus"), }, }, "router": { SchemaProps: spec.SchemaProps{ Description: "Router describes the default cluster router", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Router"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Router"), }, }, "apiServerLoadBalancer": { SchemaProps: spec.SchemaProps{ Description: "APIServerLoadBalancer describes the api server load balancer if one exists", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.LoadBalancer"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.LoadBalancer"), }, }, "failureDomains": { SchemaProps: spec.SchemaProps{ Description: "FailureDomains represent OpenStack availability zones", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain"), }, }, }, @@ -19088,51 +23663,50 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "controlPlaneSecurityGroup": { SchemaProps: spec.SchemaProps{ Description: "ControlPlaneSecurityGroup contains the information about the OpenStack Security Group that needs to be applied to control plane nodes.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupStatus"), }, }, "workerSecurityGroup": { SchemaProps: spec.SchemaProps{ Description: "WorkerSecurityGroup contains the information about the OpenStack Security Group that needs to be applied to worker nodes.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupStatus"), }, }, "bastionSecurityGroup": { SchemaProps: spec.SchemaProps{ Description: "BastionSecurityGroup contains the information about the OpenStack Security Group that needs to be applied to worker nodes.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupStatus"), }, }, "bastion": { SchemaProps: spec.SchemaProps{ Description: "Bastion contains the information about the deployed bastion host", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BastionStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BastionStatus"), }, }, - "failureReason": { - SchemaProps: spec.SchemaProps{ - Description: "FailureReason will be set in the event that there is a terminal problem reconciling the OpenStackCluster and will contain a succinct value suitable for machine interpretation.\n\nThis 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 OpenStackCluster'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.\n\nAny transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output.", - Type: []string{"string"}, - Format: "", - }, - }, - "failureMessage": { + "conditions": { SchemaProps: spec.SchemaProps{ - Description: "FailureMessage will be set in the event that there is a terminal problem reconciling the OpenStackCluster and will contain a more verbose string suitable for logging and human consumption.\n\nThis 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 OpenStackCluster'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.\n\nAny transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output.", - Type: []string{"string"}, - Format: "", + Description: "Conditions defines current service state of the OpenStackCluster. This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster (both during initial provisioning and after the initial provisioning is completed).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.Condition{}.OpenAPIModelName()), + }, + }, + }, }, }, }, - Required: []string{"ready"}, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BastionStatus", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.LoadBalancer", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatusWithSubnets", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.Router", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BastionStatus", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ClusterInitialization", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.LoadBalancer", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatus", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatusWithSubnets", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.Router", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19156,24 +23730,24 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplateSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateSpec"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplateSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19197,7 +23771,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19207,7 +23781,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplate"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplate"), }, }, }, @@ -19218,11 +23792,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplate"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplate"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplateResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplateResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19232,7 +23806,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterSpec"), }, }, }, @@ -19240,11 +23814,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackClusterTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackClusterTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19254,7 +23828,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste "template": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateResource"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplateResource"), }, }, }, @@ -19262,11 +23836,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackCluste }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackClusterTemplateResource"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackClusterTemplateResource"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackIdentityReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackIdentityReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19310,7 +23884,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackIdenti } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachine(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachine(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19334,30 +23908,30 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineStatus"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineStatus"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19381,7 +23955,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19391,7 +23965,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachine"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachine"), }, }, }, @@ -19402,11 +23976,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachine"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachine"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19438,7 +24012,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin SchemaProps: spec.SchemaProps{ Description: "The image to use for your server instance. If the rootVolume is specified, this will be used when creating the root volume.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageParam"), }, }, "sshKeyName": { @@ -19456,7 +24030,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortOpts"), }, }, }, @@ -19470,7 +24044,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam"), }, }, }, @@ -19519,7 +24093,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerMetadata"), }, }, }, @@ -19535,7 +24109,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "rootVolume": { SchemaProps: spec.SchemaProps{ Description: "The volume metadata to boot from", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RootVolume"), }, }, "additionalBlockDevices": { @@ -19554,7 +24128,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AdditionalBlockDevice"), }, }, }, @@ -19563,19 +24137,19 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "serverGroup": { SchemaProps: spec.SchemaProps{ Description: "The server group to assign the machine to.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupParam"), }, }, "identityRef": { SchemaProps: spec.SchemaProps{ Description: "IdentityRef is a reference to a secret holding OpenStack credentials to be used when reconciling this machine. If not specified, the credentials specified in the cluster will be used.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference"), }, }, "floatingIPPoolRef": { SchemaProps: spec.SchemaProps{ Description: "floatingIPPoolRef is a reference to a IPPool that will be assigned to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP will be assigned to the OpenStackMachine.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(v1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, "schedulerHintAdditionalProperties": { @@ -19594,7 +24168,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalProperty"), }, }, }, @@ -19605,23 +24179,21 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata"}, + v1.TypedLocalObjectReference{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AdditionalBlockDevice", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortOpts", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RootVolume", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalProperty", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerMetadata"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenStackMachineStatus defines the observed state of OpenStackMachine.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ready": { + "initialization": { SchemaProps: spec.SchemaProps{ - Description: "Ready is true when the provider resource is ready.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "Initialization contains information about the initialization status of the machine.", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineInitialization"), }, }, "instanceID": { @@ -19639,7 +24211,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeAddress"), + Ref: ref(v1.NodeAddress{}.OpenAPIModelName()), }, }, }, @@ -19655,36 +24227,24 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "resolved": { SchemaProps: spec.SchemaProps{ Description: "Resolved contains parts of the machine spec with all external references fully resolved.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedMachineSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedMachineSpec"), }, }, "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources contains references to OpenStack resources created for the machine.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineResources"), - }, - }, - "failureReason": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "failureMessage": { - SchemaProps: spec.SchemaProps{ - 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.\n\nThis 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.\n\nAny 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{"string"}, - Format: "", + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineResources"), }, }, "conditions": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "Conditions defines current service state of the OpenStackMachine. This field surfaces into Machine's status.conditions[InfrastructureReady] condition. The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine (both during initial provisioning and after the initial provisioning is completed).", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -19694,11 +24254,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeAddress", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.MachineResources", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedMachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"}, + v1.NodeAddress{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineInitialization", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.MachineResources", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedMachineSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19722,24 +24282,30 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateSpec"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateSpec", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateStatus"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19763,7 +24329,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19773,7 +24339,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplate"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplate"), }, }, }, @@ -19784,11 +24350,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplate"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplate"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19799,7 +24365,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin SchemaProps: spec.SchemaProps{ Description: "Spec is the specification of the desired behavior of the machine.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineSpec"), }, }, }, @@ -19807,11 +24373,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19821,7 +24387,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin "template": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateResource"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateResource"), }, }, }, @@ -19829,11 +24395,60 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_OpenStackMachin }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackMachineTemplateResource"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackMachineTemplateResource"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackMachineTemplateStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity defines the resource capacity for this machine. This value is used for autoscaling from zero operations as defined in: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref(resource.Quantity{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "nodeInfo": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NodeInfo"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions defines current service state of the OpenStackMachineTemplate. The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. (both during initial provisioning and after the initial provisioning is completed).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.Condition{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + resource.Quantity{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NodeInfo"}, + } +} + +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_PortOpts(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19842,7 +24457,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref co "network": { SchemaProps: spec.SchemaProps{ Description: "Network is a query for an openstack network that the port will be created or discovered on. This will fail if the query returns more than one network.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam"), }, }, "description": { @@ -19872,7 +24487,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.FixedIP"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.FixedIP"), }, }, }, @@ -19891,7 +24506,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam"), }, }, }, @@ -19946,7 +24561,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AddressPair"), }, }, }, @@ -19969,7 +24584,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref co "profile": { SchemaProps: spec.SchemaProps{ Description: "Profile is a set of key-value pairs that are used for binding details. We intentionally don't expose this as a map[string]string because we only want to enable the users to set the values of the keys that are known to work in OpenStack Networking API. See https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port To set profiles, your tenant needs permissions rule:create_port, and rule:create_port:binding:profile", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BindingProfile"), }, }, "disablePortSecurity": { @@ -20002,7 +24617,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ValueSpec"), }, }, }, @@ -20012,11 +24627,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortOpts(ref co }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.FixedIP", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.FixedIP", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ValueSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_PortStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20037,7 +24652,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_PortStatus(ref } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedFixedIP(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedFixedIP(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20064,7 +24679,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedFixedIP } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedMachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedMachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20100,7 +24715,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedMachine Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedPortSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedPortSpec"), }, }, }, @@ -20110,11 +24725,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedMachine }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedPortSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedPortSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedPortSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20185,7 +24800,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedFixedIP"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedFixedIP"), }, }, }, @@ -20233,7 +24848,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AddressPair"), }, }, }, @@ -20256,7 +24871,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe "profile": { SchemaProps: spec.SchemaProps{ Description: "Profile is a set of key-value pairs that are used for binding details. We intentionally don't expose this as a map[string]string because we only want to enable the users to set the values of the keys that are known to work in OpenStack Networking API. See https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port To set profiles, your tenant needs permissions rule:create_port, and rule:create_port:binding:profile", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BindingProfile"), }, }, "disablePortSecurity": { @@ -20289,7 +24904,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ValueSpec"), }, }, }, @@ -20300,11 +24915,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedFixedIP", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedFixedIP", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ValueSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpecFields(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResolvedPortSpecFields(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20333,7 +24948,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AddressPair"), }, }, }, @@ -20356,7 +24971,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe "profile": { SchemaProps: spec.SchemaProps{ Description: "Profile is a set of key-value pairs that are used for binding details. We intentionally don't expose this as a map[string]string because we only want to enable the users to set the values of the keys that are known to work in OpenStack Networking API. See https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port To set profiles, your tenant needs permissions rule:create_port, and rule:create_port:binding:profile", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BindingProfile"), }, }, "disablePortSecurity": { @@ -20389,7 +25004,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ValueSpec"), }, }, }, @@ -20399,11 +25014,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResolvedPortSpe }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ValueSpec"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AddressPair", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.BindingProfile", "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ValueSpec"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResourceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ResourceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20424,7 +25039,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ResourceReferen } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RootVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_RootVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20448,7 +25063,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RootVolume(ref "availabilityZone": { SchemaProps: spec.SchemaProps{ Description: "AvailabilityZone is the volume availability zone to create the volume in. If not specified, the volume will be created without an explicit availability zone.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.VolumeAvailabilityZone"), }, }, }, @@ -20456,11 +25071,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RootVolume(ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.VolumeAvailabilityZone"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.VolumeAvailabilityZone"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_Router(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Router(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20516,7 +25131,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_Router(ref comm } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RouterFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_RouterFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20627,7 +25242,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RouterFilter(re } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RouterParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_RouterParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20644,18 +25259,18 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_RouterParam(ref "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter specifies a filter to select an OpenStack router. If provided, cannot be empty.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterFilter"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RouterFilter"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RouterFilter"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RouterFilter"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SchedulerHintAdditionalProperty(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SchedulerHintAdditionalProperty(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20674,7 +25289,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SchedulerHintAd SchemaProps: spec.SchemaProps{ Description: "Value is the value of the scheduler hint property, which can be of various types (e.g., bool, string, int). The type is indicated by the Value.Type field.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalValue"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalValue"), }, }, }, @@ -20682,11 +25297,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SchedulerHintAd }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalValue"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalValue"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SchedulerHintAdditionalValue(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SchedulerHintAdditionalValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20729,7 +25344,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SchedulerHintAd } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20840,7 +25455,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupFi } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20857,18 +25472,18 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupPa "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter specifies a query to select an OpenStack security group. If provided, cannot be empty.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupFilter"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupFilter"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupFilter"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupFilter"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20962,7 +25577,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupRu } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SecurityGroupStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -20992,7 +25607,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SecurityGroupSt } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerGroupFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ServerGroupFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21012,7 +25627,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerGroupFilt } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerGroupParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ServerGroupParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21029,18 +25644,18 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerGroupPara "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter specifies a query to select an OpenStack server group. If provided, it cannot be empty.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupFilter"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupFilter"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupFilter"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupFilter"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ServerMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21069,7 +25684,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ServerMetadata( } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_Subnet(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_Subnet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21118,7 +25733,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_Subnet(ref comm } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21259,7 +25874,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetFilter(re } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21276,18 +25891,18 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetParam(ref "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter specifies a filter to select the subnet. It must match exactly one subnet.", - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetFilter"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetFilter"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SubnetFilter"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SubnetFilter"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_SubnetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21324,7 +25939,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetSpec(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AllocationPool"), + Ref: ref("sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AllocationPool"), }, }, }, @@ -21335,11 +25950,11 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_SubnetSpec(ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AllocationPool"}, + "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AllocationPool"}, } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ValueSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_ValueSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21377,7 +25992,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_ValueSpec(ref c } } -func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta1_VolumeAvailabilityZone(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_VolumeAvailabilityZone(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -21428,7 +26043,6 @@ func schema_cluster_api_api_core_v1beta1_APIEndpoint(ref common.ReferenceCallbac }, }, }, - Required: []string{"host", "port"}, }, }, } @@ -21444,7 +26058,7 @@ func schema_cluster_api_api_core_v1beta1_Bootstrap(ref common.ReferenceCallback) "configRef": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "dataSecretName": { @@ -21458,7 +26072,7 @@ func schema_cluster_api_api_core_v1beta1_Bootstrap(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -21487,7 +26101,7 @@ func schema_cluster_api_api_core_v1beta1_Cluster(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -21508,7 +26122,7 @@ func schema_cluster_api_api_core_v1beta1_Cluster(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus"}, } } @@ -21566,7 +26180,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterClass(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -21587,7 +26201,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterClass(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus"}, } } @@ -21616,7 +26230,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterClassList(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -21638,7 +26252,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterClassList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass"}, } } @@ -21784,11 +26398,38 @@ func schema_cluster_api_api_core_v1beta1_ClusterClassSpec(ref common.ReferenceCa }, }, }, + "upgrade": { + SchemaProps: spec.SchemaProps{ + Description: "upgrade defines the upgrade configuration for clusters using this ClusterClass.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassUpgrade"), + }, + }, + "kubernetesVersions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassUpgrade", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass"}, } } @@ -21940,6 +26581,48 @@ func schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariableDefinition(re } } +func schema_cluster_api_api_core_v1beta1_ClusterClassUpgrade(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterClassUpgrade defines the upgrade configuration for clusters using the ClusterClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external defines external runtime extensions for upgrade operations.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassUpgradeExternal"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassUpgradeExternal"}, + } +} + +func schema_cluster_api_api_core_v1beta1_ClusterClassUpgradeExternal(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterClassUpgradeExternal defines external runtime extensions for upgrade operations.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "generateUpgradePlanExtension": { + SchemaProps: spec.SchemaProps{ + Description: "generateUpgradePlanExtension references an extension which is called to generate upgrade plan.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21963,7 +26646,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -21973,7 +26656,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -22141,7 +26824,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -22163,7 +26846,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } @@ -22238,18 +26921,18 @@ func schema_cluster_api_api_core_v1beta1_ClusterSpec(ref common.ReferenceCallbac "controlPlaneRef": { SchemaProps: spec.SchemaProps{ Description: "controlPlaneRef is an optional reference to a provider-specific resource that holds the details for provisioning the Control Plane for a Cluster.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "infrastructureRef": { SchemaProps: spec.SchemaProps{ Description: "infrastructureRef is a reference to a provider-specific resource that holds the details for provisioning infrastructure for a cluster in said provider.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "topology": { SchemaProps: spec.SchemaProps{ - 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.", + Description: "topology encapsulates the topology for the cluster. NOTE: It is required to enable the ClusterTopology feature gate flag to activate managed topologies support.", Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Topology"), }, }, @@ -22279,7 +26962,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork", "sigs.k8s.io/cluster-api/api/core/v1beta1.Topology"}, + v1.ObjectReference{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork", "sigs.k8s.io/cluster-api/api/core/v1beta1.Topology"}, } } @@ -22400,7 +27083,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterV1Beta2Status(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -22422,7 +27105,7 @@ func schema_cluster_api_api_core_v1beta1_ClusterV1Beta2Status(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus"}, } } @@ -22496,7 +27179,7 @@ func schema_cluster_api_api_core_v1beta1_Condition(ref common.ReferenceCallback) "lastTransitionTime": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -22518,7 +27201,7 @@ func schema_cluster_api_api_core_v1beta1_Condition(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -22539,7 +27222,7 @@ func schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref common.ReferenceC "ref": { SchemaProps: spec.SchemaProps{ Description: "ref is a required reference to a custom resource offered by a provider.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "machineInfrastructure": { @@ -22563,19 +27246,42 @@ func schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref common.ReferenceC "nodeDrainTimeout": { SchemaProps: spec.SchemaProps{ 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` NOTE: This value can be overridden while defining a Cluster.Topology.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeVolumeDetachTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeDeletionTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeDeletionTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"), + }, + }, + }, }, }, "readinessGates": { @@ -22605,7 +27311,7 @@ func schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } @@ -22650,6 +27356,13 @@ func schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref common.Referen Format: "int32", }, }, + "rollout": { + SchemaProps: spec.SchemaProps{ + Description: "rollout allows you to configure the behavior of rolling updates to the control plane.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopologyRolloutSpec"), + }, + }, "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck allows to enable, disable and override the MachineHealthCheck configuration in the ClusterClass for this control plane.", @@ -22659,19 +27372,42 @@ func schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref common.Referen "nodeDrainTimeout": { SchemaProps: spec.SchemaProps{ 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`", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeVolumeDetachTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeDeletionTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeDeletionTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"), + }, + }, + }, }, }, "readinessGates": { @@ -22706,7 +27442,28 @@ func schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, + metav1.Duration{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, + } +} + +func schema_cluster_api_api_core_v1beta1_ControlPlaneTopologyRolloutSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControlPlaneTopologyRolloutSpec defines the rollout behavior.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "after": { + SchemaProps: spec.SchemaProps{ + 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\".", + Ref: ref(metav1.Time{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.Time{}.OpenAPIModelName()}, } } @@ -23211,7 +27968,7 @@ func schema_cluster_api_api_core_v1beta1_LocalObjectTemplate(ref common.Referenc "ref": { SchemaProps: spec.SchemaProps{ Description: "ref is a required reference to a custom resource offered by a provider.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -23219,7 +27976,7 @@ func schema_cluster_api_api_core_v1beta1_LocalObjectTemplate(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -23248,7 +28005,7 @@ func schema_cluster_api_api_core_v1beta1_Machine(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -23269,7 +28026,7 @@ func schema_cluster_api_api_core_v1beta1_Machine(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus"}, } } @@ -23313,20 +28070,20 @@ func schema_cluster_api_api_core_v1beta1_MachineDeletionStatus(ref common.Refere "nodeDrainStartTime": { SchemaProps: spec.SchemaProps{ Description: "nodeDrainStartTime is the time when the drain of the node started and is used to determine if the NodeDrainTimeout is exceeded. Only present when the Machine has a deletionTimestamp and draining the node had been started.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "waitForNodeVolumeDetachStartTime": { SchemaProps: spec.SchemaProps{ Description: "waitForNodeVolumeDetachStartTime is the time when waiting for volume detachment started and is used to determine if the NodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -23355,7 +28112,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeployment(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -23376,7 +28133,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeployment(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus"}, } } @@ -23424,19 +28181,42 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentClass(ref common.Refer "nodeDrainTimeout": { SchemaProps: spec.SchemaProps{ 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` NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeVolumeDetachTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeDeletionTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeDeletionTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"), + }, + }, + }, }, }, "minReadySeconds": { @@ -23479,7 +28259,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentClass(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"}, + metav1.Duration{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"}, } } @@ -23565,7 +28345,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentList(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -23587,7 +28367,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentList(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment"}, } } @@ -23616,14 +28396,14 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentSpec(ref common.Refere "rolloutAfter": { SchemaProps: spec.SchemaProps{ Description: "rolloutAfter 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\".", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "selector": { SchemaProps: spec.SchemaProps{ 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.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { @@ -23678,7 +28458,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentSpec(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"}, + metav1.LabelSelector{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"}, } } @@ -23865,19 +28645,42 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref common.Re "nodeDrainTimeout": { SchemaProps: spec.SchemaProps{ 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`", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeVolumeDetachTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeDeletionTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeDeletionTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"), + }, + }, + }, }, }, "minReadySeconds": { @@ -23909,6 +28712,13 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref common.Re }, }, }, + "rollout": { + SchemaProps: spec.SchemaProps{ + 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.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopologyRolloutSpec"), + }, + }, "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy is the deployment strategy to use to replace existing machines with new ones.", @@ -23926,7 +28736,28 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, + metav1.Duration{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, + } +} + +func schema_cluster_api_api_core_v1beta1_MachineDeploymentTopologyRolloutSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachineDeploymentTopologyRolloutSpec defines the rollout behavior.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "after": { + SchemaProps: spec.SchemaProps{ + 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\".", + Ref: ref(metav1.Time{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.Time{}.OpenAPIModelName()}, } } @@ -23953,7 +28784,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentV1Beta2Status(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -23984,7 +28815,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDeploymentV1Beta2Status(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -24050,7 +28881,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDrainRule(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -24065,7 +28896,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDrainRule(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec"}, } } @@ -24123,7 +28954,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDrainRuleList(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -24145,7 +28976,7 @@ func schema_cluster_api_api_core_v1beta1_MachineDrainRuleList(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule"}, } } @@ -24159,20 +28990,20 @@ func schema_cluster_api_api_core_v1beta1_MachineDrainRuleMachineSelector(ref com "selector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "clusterSelector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -24186,20 +29017,20 @@ func schema_cluster_api_api_core_v1beta1_MachineDrainRulePodSelector(ref common. "selector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "namespaceSelector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -24289,7 +29120,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheck(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -24310,7 +29141,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheck(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus"}, } } @@ -24335,6 +29166,25 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckClass(ref common.Refe }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, "maxUnhealthy": { SchemaProps: spec.SchemaProps{ 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.", @@ -24351,20 +29201,20 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckClass(ref common.Refe "nodeStartupTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeStartupTimeout 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.\n\nThe 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\n\nDefaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "remediationTemplate": { SchemaProps: spec.SchemaProps{ Description: "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis 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.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyMachineCondition"}, } } @@ -24393,7 +29243,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckList(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -24415,7 +29265,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckList(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck"}, } } @@ -24438,7 +29288,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "selector is a label selector to match machines whose health will be exercised", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "unhealthyConditions": { @@ -24455,6 +29305,25 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref common.Refer }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, "maxUnhealthy": { SchemaProps: spec.SchemaProps{ 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.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/10722 for more details.", @@ -24471,13 +29340,13 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref common.Refer "nodeStartupTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeStartupTimeout 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.\n\nThe 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\n\nDefaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "remediationTemplate": { SchemaProps: spec.SchemaProps{ Description: "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis 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.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -24485,7 +29354,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName(), "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyMachineCondition"}, } } @@ -24598,6 +29467,25 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckTopology(ref common.R }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, "maxUnhealthy": { SchemaProps: spec.SchemaProps{ 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.", @@ -24614,20 +29502,20 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckTopology(ref common.R "nodeStartupTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeStartupTimeout 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.\n\nThe 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\n\nDefaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "remediationTemplate": { SchemaProps: spec.SchemaProps{ Description: "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis 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.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyMachineCondition"}, } } @@ -24654,7 +29542,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckV1Beta2Status(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -24664,7 +29552,7 @@ func schema_cluster_api_api_core_v1beta1_MachineHealthCheckV1Beta2Status(ref com }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -24693,7 +29581,7 @@ func schema_cluster_api_api_core_v1beta1_MachineList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -24715,7 +29603,7 @@ func schema_cluster_api_api_core_v1beta1_MachineList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.Machine"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.Machine"}, } } @@ -24764,7 +29652,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePool(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -24785,7 +29673,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePool(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus"}, } } @@ -24835,19 +29723,42 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolClass(ref common.ReferenceCa "nodeDrainTimeout": { SchemaProps: spec.SchemaProps{ 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` NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeVolumeDetachTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeDeletionTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeDeletionTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"), + }, + }, + }, }, }, "minReadySeconds": { @@ -24862,7 +29773,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolClass(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate"}, + metav1.Duration{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"}, } } @@ -24948,7 +29859,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -24970,7 +29881,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool"}, } } @@ -25064,7 +29975,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -25167,7 +30078,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status"}, + v1.ObjectReference{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status"}, } } @@ -25219,19 +30130,42 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolTopology(ref common.Referenc "nodeDrainTimeout": { SchemaProps: spec.SchemaProps{ 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`", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeVolumeDetachTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeDeletionTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeDeletionTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"), + }, + }, + }, }, }, "minReadySeconds": { @@ -25259,7 +30193,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolTopology(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, + metav1.Duration{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } @@ -25286,7 +30220,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolV1Beta2Status(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -25317,7 +30251,7 @@ func schema_cluster_api_api_core_v1beta1_MachinePoolV1Beta2Status(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -25446,7 +30380,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSet(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -25467,7 +30401,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSet(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus"}, } } @@ -25496,7 +30430,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSetList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -25518,7 +30452,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSetList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet"}, } } @@ -25562,7 +30496,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSetSpec(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ 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", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { @@ -25583,7 +30517,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSetSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"}, + metav1.LabelSelector{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"}, } } @@ -25705,7 +30639,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSetV1Beta2Status(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -25736,7 +30670,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSetV1Beta2Status(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -25766,7 +30700,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSpec(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "infrastructureRef is a required reference to a custom resource offered by an infrastructure provider.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "version": { @@ -25815,19 +30749,42 @@ func schema_cluster_api_api_core_v1beta1_MachineSpec(ref common.ReferenceCallbac "nodeDrainTimeout": { SchemaProps: spec.SchemaProps{ 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`", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeVolumeDetachTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeVolumeDetachTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "nodeDeletionTimeout": { SchemaProps: spec.SchemaProps{ Description: "nodeDeletionTimeout 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"), + }, + }, + }, }, }, }, @@ -25835,7 +30792,7 @@ func schema_cluster_api_api_core_v1beta1_MachineSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.Duration{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTaint"}, } } @@ -25849,19 +30806,19 @@ func schema_cluster_api_api_core_v1beta1_MachineStatus(ref common.ReferenceCallb "nodeRef": { SchemaProps: spec.SchemaProps{ Description: "nodeRef will point to the corresponding Node if it exists.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "nodeInfo": { SchemaProps: spec.SchemaProps{ Description: "nodeInfo is a set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), + Ref: ref(v1.NodeSystemInfo{}.OpenAPIModelName()), }, }, "lastUpdated": { SchemaProps: spec.SchemaProps{ Description: "lastUpdated identifies when the phase of the Machine last transitioned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "failureReason": { @@ -25902,7 +30859,7 @@ func schema_cluster_api_api_core_v1beta1_MachineStatus(ref common.ReferenceCallb "certificatesExpiryDate": { SchemaProps: spec.SchemaProps{ Description: "certificatesExpiryDate is the expiry date of the machine certificates. This value is only set for control plane machines.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "bootstrapReady": { @@ -25958,7 +30915,50 @@ func schema_cluster_api_api_core_v1beta1_MachineStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status"}, + v1.NodeSystemInfo{}.OpenAPIModelName(), v1.ObjectReference{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status"}, + } +} + +func schema_cluster_api_api_core_v1beta1_MachineTaint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + 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 `/`.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "value is the taint value corresponding to the taint key. It must be a valid label value of maximum size 63 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + "effect": { + SchemaProps: spec.SchemaProps{ + Description: "effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.\n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.\n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"NoExecute", "NoSchedule", "PreferNoSchedule"}, + }, + }, + "propagation": { + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"key", "effect", "propagation"}, + }, + }, } } @@ -26014,7 +31014,7 @@ func schema_cluster_api_api_core_v1beta1_MachineV1Beta2Status(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -26024,7 +31024,7 @@ func schema_cluster_api_api_core_v1beta1_MachineV1Beta2Status(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + metav1.Condition{}.OpenAPIModelName()}, } } @@ -26329,7 +31329,7 @@ func schema_cluster_api_api_core_v1beta1_Topology(ref common.ReferenceCallback) "rolloutAfter": { SchemaProps: spec.SchemaProps{ Description: "rolloutAfter performs a rollout of the entire cluster one component at a time, control plane first and then machine deployments.\n\nDeprecated: This field has no function and is going to be removed in the next apiVersion.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "controlPlane": { @@ -26372,7 +31372,7 @@ func schema_cluster_api_api_core_v1beta1_Topology(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology"}, + metav1.Time{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology"}, } } @@ -26402,7 +31402,43 @@ func schema_cluster_api_api_core_v1beta1_UnhealthyCondition(ref common.Reference "timeout": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), + }, + }, + }, + Required: []string{"type", "status", "timeout"}, + }, + }, + Dependencies: []string{ + metav1.Duration{}.OpenAPIModelName()}, + } +} + +func schema_cluster_api_api_core_v1beta1_UnhealthyMachineCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of Machine condition", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + 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.", + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -26410,7 +31446,7 @@ func schema_cluster_api_api_core_v1beta1_UnhealthyCondition(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -26780,7 +31816,7 @@ func schema_cluster_api_api_core_v1beta2_Cluster(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -26802,7 +31838,7 @@ func schema_cluster_api_api_core_v1beta2_Cluster(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterStatus"}, } } @@ -26859,7 +31895,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterClass(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -26881,7 +31917,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterClass(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatus"}, } } @@ -26931,7 +31967,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassList(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -26953,7 +31989,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClass"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClass"}, } } @@ -27135,12 +32171,39 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassSpec(ref common.ReferenceCa }, }, }, + "upgrade": { + SchemaProps: spec.SchemaProps{ + Description: "upgrade defines the upgrade configuration for clusters using this ClusterClass.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgrade"), + }, + }, + "kubernetesVersions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, Required: []string{"infrastructure", "controlPlane"}, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgrade", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersClass"}, } } @@ -27167,7 +32230,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -27209,7 +32272,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassStatus(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariable"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariable"}, } } @@ -27341,6 +32404,48 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassTemplateReference(ref commo } } +func schema_cluster_api_api_core_v1beta2_ClusterClassUpgrade(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterClassUpgrade defines the upgrade configuration for clusters using the ClusterClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external defines external runtime extensions for upgrade operations.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgradeExternal"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgradeExternal"}, + } +} + +func schema_cluster_api_api_core_v1beta2_ClusterClassUpgradeExternal(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterClassUpgradeExternal defines external runtime extensions for upgrade operations.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "generateUpgradePlanExtension": { + SchemaProps: spec.SchemaProps{ + Description: "generateUpgradePlanExtension references an extension which is called to generate upgrade plan.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_cluster_api_api_core_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -27580,7 +32685,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -27602,7 +32707,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.Cluster"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.Cluster"}, } } @@ -27693,7 +32798,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterSpec(ref common.ReferenceCallbac }, "topology": { SchemaProps: spec.SchemaProps{ - 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.", + Description: "topology encapsulates the topology for the cluster. NOTE: It is required to enable the ClusterTopology feature gate flag to activate managed topologies support.", Default: map[string]interface{}{}, Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Topology"), }, @@ -27751,7 +32856,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterStatus(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -27822,7 +32927,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterInitializationStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersStatus"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterInitializationStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersStatus"}, } } @@ -27902,7 +33007,7 @@ func schema_cluster_api_api_core_v1beta2_Condition(ref common.ReferenceCallback) return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Condition defines an observation of a Cluster API resource operational state.", + Description: "Condition defines an observation of a Cluster API resource operational state.\n\nDeprecated: 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.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "type": { @@ -27931,7 +33036,7 @@ func schema_cluster_api_api_core_v1beta2_Condition(ref common.ReferenceCallback) "lastTransitionTime": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -27953,7 +33058,7 @@ func schema_cluster_api_api_core_v1beta2_Condition(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -28041,6 +33146,29 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneClass(ref common.ReferenceC Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, "readinessGates": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -28068,7 +33196,7 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneClass(ref common.ReferenceC }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassTemplateReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassTemplateReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } @@ -28134,11 +33262,30 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneClassHealthCheckChecks(ref }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -28297,6 +33444,13 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref common.Referen Format: "int32", }, }, + "rollout": { + SchemaProps: spec.SchemaProps{ + Description: "rollout allows you to configure the behavior of rolling updates to the control plane.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyRolloutSpec"), + }, + }, "healthCheck": { SchemaProps: spec.SchemaProps{ Description: "healthCheck allows to enable, disable and override control plane health check configuration from the ClusterClass for this control plane.", @@ -28311,6 +33465,29 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref common.Referen Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, "readinessGates": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -28344,7 +33521,7 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref common.Referen }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } @@ -28417,11 +33594,30 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyHealthCheckChecks(r }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -28516,6 +33712,27 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyMachineDeletionSpec } } +func schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyRolloutSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControlPlaneTopologyRolloutSpec defines the rollout behavior.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "after": { + SchemaProps: spec.SchemaProps{ + 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\".", + Ref: ref(metav1.Time{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.Time{}.OpenAPIModelName()}, + } +} + func schema_cluster_api_api_core_v1beta2_ControlPlaneVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -29079,7 +34296,7 @@ func schema_cluster_api_api_core_v1beta2_Machine(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -29101,7 +34318,7 @@ func schema_cluster_api_api_core_v1beta2_Machine(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineStatus"}, } } @@ -29177,20 +34394,20 @@ func schema_cluster_api_api_core_v1beta2_MachineDeletionStatus(ref common.Refere "nodeDrainStartTime": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "waitForNodeVolumeDetachStartTime": { SchemaProps: spec.SchemaProps{ 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -29219,7 +34436,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeployment(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -29241,7 +34458,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeployment(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStatus"}, } } @@ -29308,6 +34525,29 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentClass(ref common.Refer Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassMachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, "minReadySeconds": { SchemaProps: spec.SchemaProps{ 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.", @@ -29349,7 +34589,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentClass(ref common.Refer }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } @@ -29438,11 +34678,30 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentClassHealthCheckChecks }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -29738,7 +34997,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentList(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -29760,7 +35019,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentList(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeployment"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeployment"}, } } @@ -29795,7 +35054,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentRolloutSpec(ref common "after": { SchemaProps: spec.SchemaProps{ 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\".", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "strategy": { @@ -29809,7 +35068,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentRolloutSpec(ref common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentRolloutStrategy"}, + metav1.Time{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentRolloutStrategy"}, } } @@ -29902,7 +35161,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentSpec(ref common.Refere SchemaProps: spec.SchemaProps{ 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.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { @@ -29945,7 +35204,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentSpec(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentRemediationSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"}, + metav1.LabelSelector{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentRemediationSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"}, } } @@ -29972,7 +35231,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentStatus(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -30037,7 +35296,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentStatus(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentDeprecatedStatus"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentDeprecatedStatus"}, } } @@ -30097,6 +35356,29 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopology(ref common.Re Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyMachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, "minReadySeconds": { SchemaProps: spec.SchemaProps{ 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)", @@ -30145,7 +35427,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopology(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } @@ -30218,11 +35500,30 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopologyHealthCheckChe }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -30337,6 +35638,12 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopologyRolloutSpec(re Description: "MachineDeploymentTopologyRolloutSpec defines the rollout behavior.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "after": { + SchemaProps: spec.SchemaProps{ + 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\".", + Ref: ref(metav1.Time{}.OpenAPIModelName()), + }, + }, "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy specifies how to roll out control plane Machines.", @@ -30348,7 +35655,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopologyRolloutSpec(re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutStrategy"}, + metav1.Time{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutStrategy"}, } } @@ -30553,7 +35860,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDrainRule(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -30568,7 +35875,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDrainRule(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleSpec"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleSpec"}, } } @@ -30625,7 +35932,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDrainRuleList(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -30647,7 +35954,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDrainRuleList(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRule"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRule"}, } } @@ -30661,20 +35968,20 @@ func schema_cluster_api_api_core_v1beta2_MachineDrainRuleMachineSelector(ref com "selector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "clusterSelector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -30688,20 +35995,20 @@ func schema_cluster_api_api_core_v1beta2_MachineDrainRulePodSelector(ref common. "selector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "namespaceSelector": { SchemaProps: spec.SchemaProps{ 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.\n\nIf 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -30791,7 +36098,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheck(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -30813,7 +36120,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheck(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckStatus"}, } } @@ -30850,11 +36157,30 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckChecks(ref common.Ref }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -30904,7 +36230,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckList(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -30926,7 +36252,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckList(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheck"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheck"}, } } @@ -31040,7 +36366,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckSpec(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "selector is a label selector to match machines whose health will be exercised", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "checks": { @@ -31062,7 +36388,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckSpec(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckChecks", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckRemediation"}, + metav1.LabelSelector{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckChecks", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckRemediation"}, } } @@ -31089,7 +36415,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckStatus(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -31153,7 +36479,7 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckStatus(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckDeprecatedStatus"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckDeprecatedStatus"}, } } @@ -31238,7 +36564,7 @@ func schema_cluster_api_api_core_v1beta2_MachineList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -31260,7 +36586,7 @@ func schema_cluster_api_api_core_v1beta2_MachineList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"}, } } @@ -31330,7 +36656,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePool(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -31352,7 +36678,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePool(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolStatus"}, } } @@ -31425,6 +36751,29 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolClass(ref common.ReferenceCa Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassMachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, "minReadySeconds": { SchemaProps: spec.SchemaProps{ 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.", @@ -31437,7 +36786,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolClass(ref common.ReferenceCa }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } @@ -31614,7 +36963,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolList(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -31636,7 +36985,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolList(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePool"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePool"}, } } @@ -31740,7 +37089,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -31766,7 +37115,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolStatus(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -31824,7 +37173,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolStatus(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolInitializationStatus"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolInitializationStatus"}, } } @@ -31883,6 +37232,29 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolTopology(ref common.Referenc Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopologyMachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, "minReadySeconds": { SchemaProps: spec.SchemaProps{ 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)", @@ -31909,7 +37281,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolTopology(ref common.Referenc }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } @@ -32101,7 +37473,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSet(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -32123,7 +37495,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSet(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetStatus"}, + metav1.ObjectMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetStatus"}, } } @@ -32193,7 +37565,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSetList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -32215,7 +37587,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSetList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSet"}, + metav1.ListMeta{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSet"}, } } @@ -32244,7 +37616,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSetSpec(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ 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", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "template": { @@ -32273,7 +37645,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSetSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"}, + metav1.LabelSelector{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"}, } } @@ -32300,7 +37672,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSetStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -32358,7 +37730,7 @@ func schema_cluster_api_api_core_v1beta2_MachineSetStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetDeprecatedStatus"}, + metav1.Condition{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetDeprecatedStatus"}, } } @@ -32514,12 +37886,35 @@ func schema_cluster_api_api_core_v1beta2_MachineSpec(ref common.ReferenceCallbac Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + 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.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, }, Required: []string{"clusterName", "bootstrap", "infrastructureRef"}, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta2.ContractVersionedObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta2.ContractVersionedObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"}, } } @@ -32540,13 +37935,13 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb }, }, SchemaProps: spec.SchemaProps{ - Description: "conditions represents the observations of a Machine's current state. Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, NodeHealthy, 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.", + 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.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -32569,13 +37964,13 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb "nodeInfo": { SchemaProps: spec.SchemaProps{ Description: "nodeInfo is a set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), + Ref: ref(v1.NodeSystemInfo{}.OpenAPIModelName()), }, }, "lastUpdated": { SchemaProps: spec.SchemaProps{ Description: "lastUpdated identifies when the phase of the Machine last transitioned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "addresses": { @@ -32592,6 +37987,13 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb }, }, }, + "failureDomain": { + SchemaProps: spec.SchemaProps{ + Description: "failureDomain is the failure domain where the Machine has been scheduled.", + Type: []string{"string"}, + Format: "", + }, + }, "phase": { SchemaProps: spec.SchemaProps{ Description: "phase represents the current phase of machine actuation.", @@ -32602,7 +38004,7 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb "certificatesExpiryDate": { SchemaProps: spec.SchemaProps{ Description: "certificatesExpiryDate is the expiry date of the machine certificates. This value is only set for control plane machines.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "observedGeneration": { @@ -32628,7 +38030,50 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineAddress", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineInitializationStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNodeReference"}, + v1.NodeSystemInfo{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName(), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineAddress", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineInitializationStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNodeReference"}, + } +} + +func schema_cluster_api_api_core_v1beta2_MachineTaint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + 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 `/`.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "value is the taint value corresponding to the taint key. It must be a valid label value of maximum size 63 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + "effect": { + SchemaProps: spec.SchemaProps{ + Description: "effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.\n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.\n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"NoExecute", "NoSchedule", "PreferNoSchedule"}, + }, + }, + "propagation": { + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"key", "effect", "propagation"}, + }, + }, } } @@ -33036,6 +38481,41 @@ func schema_cluster_api_api_core_v1beta2_Topology(ref common.ReferenceCallback) } } +func schema_cluster_api_api_core_v1beta2_UnhealthyMachineCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of Machine condition", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"type", "status", "timeoutSeconds"}, + }, + }, + } +} + func schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -33059,7 +38539,7 @@ func schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref common.Refer }, "timeoutSeconds": { SchemaProps: spec.SchemaProps{ - 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 \"1h\", the node must match the status for at least 1 hour before being considered unhealthy.", + 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.", Type: []string{"integer"}, Format: "int32", }, diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml index 4cf9b3dae..9a7dd6cc6 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml @@ -1295,9 +1295,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneOmitAvailabilityZone: description: |- @@ -2461,6 +2458,62 @@ spec: - id - name type: object + conditions: + description: |- + Conditions defines current service state of the OpenStackCluster. + This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + (both during initial provisioning and after the initial provisioning is completed). + 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 controlPlaneSecurityGroup: description: |- ControlPlaneSecurityGroup contains the information about the @@ -2530,6 +2583,9 @@ spec: Any transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to report failures. type: string failureReason: description: |- @@ -2549,7 +2605,20 @@ spec: Any transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to report failures. type: string + initialization: + description: Initialization contains information about the initialization + status of the cluster. + properties: + provisioned: + description: |- + Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object network: description: Network contains information about the created OpenStack Network. @@ -2592,7 +2661,11 @@ spec: type: object ready: default: false - description: Ready is true when the cluster infrastructure is ready. + description: |- + Ready is true when the cluster infrastructure is ready. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to determine the ready state of the cluster. type: boolean router: description: Router describes the default cluster router @@ -2633,6 +2706,2655 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster to which this OpenStackCluster belongs + jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name + name: Cluster + type: string + - description: Network the cluster is using + jsonPath: .status.network.id + name: Network + type: string + - description: API Endpoint + jsonPath: .spec.controlPlaneEndpoint.host + name: Endpoint + priority: 1 + type: string + - description: Bastion address for breakglass access + jsonPath: .status.bastion.floatingIP + name: Bastion IP + type: string + - description: Time duration since creation of OpenStackCluster + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: OpenStackCluster is the Schema for the openstackclusters 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: OpenStackClusterSpec defines the desired state of OpenStackCluster. + properties: + apiServerFixedIP: + description: |- + APIServerFixedIP is the fixed IP which will be associated with the API server. + In the case where the API server has a floating IP but not a managed load balancer, + this field is not used. + If a managed load balancer is used and this field is not specified, a fixed IP will + be dynamically allocated for the load balancer. + If a managed load balancer is not used AND the API server floating IP is disabled, + this field MUST be specified and should correspond to a pre-allocated port that + holds the fixed IP to be used as a VIP. + type: string + apiServerFloatingIP: + description: |- + APIServerFloatingIP is the floatingIP which will be associated with the API server. + The floatingIP will be created if it does not already exist. + If not specified, a new floatingIP is allocated. + This field is not used if DisableAPIServerFloatingIP is set to true. + type: string + apiServerLoadBalancer: + description: |- + APIServerLoadBalancer configures the optional LoadBalancer for the APIServer. + If not specified, no load balancer will be created for the API server. + properties: + additionalPorts: + description: AdditionalPorts adds additional tcp ports to the + load balancer. + items: + type: integer + type: array + x-kubernetes-list-type: set + allowedCIDRs: + description: AllowedCIDRs restrict access to all API-Server listeners + to the given address CIDRs. + items: + type: string + type: array + x-kubernetes-list-type: set + availabilityZone: + description: AvailabilityZone is the failure domain that will + be used to create the APIServerLoadBalancer Spec. + type: string + enabled: + default: true + description: |- + Enabled defines whether a load balancer should be created. This value + defaults to true if an APIServerLoadBalancer is given. + + There is no reason to set this to false. To disable creation of the + API server loadbalancer, omit the APIServerLoadBalancer field in the + cluster spec instead. + type: boolean + flavor: + description: Flavor is the flavor name that will be used to create + the APIServerLoadBalancer Spec. + type: string + monitor: + description: Monitor contains configuration for the load balancer + health monitor. + properties: + delay: + description: Delay is the time in seconds between sending + probes to members. + minimum: 0 + type: integer + maxRetries: + description: MaxRetries is the number of successful checks + before changing the operating status of the member to ONLINE. + maximum: 10 + minimum: 0 + type: integer + maxRetriesDown: + description: MaxRetriesDown is the number of allowed check + failures before changing the operating status of the member + to ERROR. + maximum: 10 + minimum: 1 + type: integer + timeout: + description: Timeout is the maximum time in seconds for a + monitor to wait for a connection to be established before + it times out. + minimum: 0 + type: integer + type: object + network: + description: Network defines which network should the load balancer + be allocated on. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. If ID is + provided, the other filters cannot be provided. Must be + in UUID format. + format: uuid + type: string + type: object + provider: + description: |- + Provider specifies name of a specific Octavia provider to use for the + API load balancer. The Octavia default will be used if it is not + specified. + type: string + subnets: + description: |- + Subnets define which subnets should the load balancer be allocated on. + It is expected that subnets are located on the network specified in this resource. + Only the first element is taken into account. + kubebuilder:validation:MaxLength:=2 + items: + description: SubnetParam specifies an OpenStack subnet to use. + It may be specified by either ID or filter, but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select the subnet. + It must match exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. It will not be + validated. + format: uuid + type: string + type: object + type: array + x-kubernetes-list-type: atomic + required: + - enabled + type: object + apiServerPort: + description: |- + APIServerPort is the port on which the listener on the APIServer + will be created. If specified, it must be an integer between 0 and 65535. + maximum: 65535 + minimum: 0 + type: integer + bastion: + description: |- + Bastion is the OpenStack instance to login the nodes + + As a rolling update is not ideal during a bastion host session, we + prevent changes to a running bastion configuration. To make changes, it's required + to first set `enabled: false` which will remove the bastion and then changes can be made. + properties: + availabilityZone: + description: AvailabilityZone is the failure domain that will + be used to create the Bastion Spec. + type: string + enabled: + default: true + description: |- + Enabled means that bastion is enabled. The bastion is enabled by + default if this field is not specified. Set this field to false to disable the + bastion. + + It is not currently possible to remove the bastion from the cluster + spec without first disabling it by setting this field to false and + waiting until the bastion has been deleted. + type: boolean + floatingIP: + description: |- + FloatingIP which will be associated to the bastion machine. It's the IP address, not UUID. + The floating IP should already exist and should not be associated with a port. If FIP of this address does not + exist, CAPO will try to create it, but by default only OpenStack administrators have privileges to do so. + format: ipv4 + type: string + spec: + description: Spec for the bastion itself + properties: + additionalBlockDevices: + description: AdditionalBlockDevices is a list of specifications + for additional block devices to attach to the server instance + items: + description: AdditionalBlockDevice is a block device to + attach to the server. + properties: + name: + description: |- + Name of the block device in the context of a machine. + If the block device is a volume, the Cinder volume will be named + as a combination of the machine name and this name. + Also, this name will be used for tagging the block device. + Information about the block device tag can be obtained from the OpenStack + metadata API or the config drive. + Name cannot be 'root', which is reserved for the root volume. + type: string + sizeGiB: + description: SizeGiB is the size of the block device + in gibibytes (GiB). + minimum: 1 + type: integer + storage: + description: |- + Storage specifies the storage type of the block device and + additional storage options. + properties: + type: + description: |- + Type is the type of block device to create. + This can be either "Volume" or "Local". + type: string + volume: + description: Volume contains additional storage + options for a volume block device. + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from is 'Name' + or default + rule: '!has(self.from) || self.from == ''Name'' + ? has(self.name) : !has(self.name)' + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + type: object + required: + - type + type: object + required: + - name + - sizeGiB + - storage + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + configDrive: + description: Config Drive support + type: boolean + flavor: + description: The flavor reference for the flavor for your + server instance. + minLength: 1 + type: string + flavorID: + description: |- + FlavorID allows flavors to be specified by ID. This field takes precedence + over Flavor. + minLength: 1 + type: string + floatingIPPoolRef: + description: |- + floatingIPPoolRef is a reference to a IPPool that will be assigned + to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP + will be assigned to the OpenStackMachine. + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + identityRef: + description: |- + IdentityRef is a reference to a secret holding OpenStack credentials + to be used when reconciling this machine. If not specified, the + credentials specified in the cluster will be used. + properties: + cloudName: + description: CloudName specifies the name of the entry + in the clouds.yaml file to use. + minLength: 1 + type: string + name: + description: |- + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 + type: string + region: + description: |- + Region specifies an OpenStack region to use. If specified, it overrides + any value in clouds.yaml. If specified for an OpenStackMachine, its + value will be included in providerID. + type: string + type: + default: Secret + description: Type specifies the identity reference type. + Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string + required: + - cloudName + - name + - type + type: object + x-kubernetes-validations: + - message: region is immutable + rule: (!has(self.region) && !has(oldSelf.region)) || self.region + == oldSelf.region + image: + description: |- + The image to use for your server instance. + If the rootVolume is specified, this will be used when creating the root volume. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + Filter describes a query for an image. If specified, the combination + of name and tags must return a single matching image or an error will + be raised. + minProperties: 1 + properties: + name: + description: The name of the desired image. If specified, + the combination of name and tags must return a single + matching image or an error will be raised. + type: string + tags: + description: The tags associated with the desired + image. If specified, the combination of name and + tags must return a single matching image or an error + will be raised. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the image. ID will not + be validated before use. + format: uuid + type: string + imageRef: + description: |- + ImageRef is a reference to an ORC Image in the same namespace as the + referring object. + properties: + name: + description: Name is the name of the referenced resource + type: string + required: + - name + type: object + type: object + ports: + description: |- + Ports to be attached to the server instance. They are created if a port with the given name does not already exist. + If not specified a default port will be added for the default cluster network. + items: + properties: + adminStateUp: + description: AdminStateUp specifies whether the port + should be created in the up (true) or down (false) + state. The default is up. + type: boolean + allowedAddressPairs: + description: |- + AllowedAddressPairs is a list of address pairs which Neutron will + allow the port to send traffic from in addition to the port's + addresses. If not specified, the MAC Address will be the MAC Address + of the port. Depending on the configuration of Neutron, it may be + supported to specify a CIDR instead of a specific IP address. + items: + properties: + ipAddress: + description: |- + IPAddress is the IP address of the allowed address pair. Depending on + the configuration of Neutron, it may be supported to specify a CIDR + instead of a specific IP address. + type: string + macAddress: + description: |- + MACAddress is the MAC address of the allowed address pair. If not + specified, the MAC address will be the MAC address of the port. + type: string + required: + - ipAddress + type: object + type: array + description: + description: Description is a human-readable description + for the port. + type: string + disablePortSecurity: + description: |- + DisablePortSecurity enables or disables the port security when set. + When not set, it takes the value of the corresponding field at the network level. + type: boolean + fixedIPs: + description: FixedIPs is a list of pairs of subnet and/or + IP address to assign to the port. If specified, these + must be subnets of the port's network. + items: + properties: + ipAddress: + description: |- + IPAddress is a specific IP address to assign to the port. If Subnet + is also specified, IPAddress must be a valid IP address in the + subnet. If Subnet is not specified, IPAddress must be a valid IP + address in any subnet of the port's network. + type: string + subnet: + description: |- + Subnet is an openstack subnet query that will return the id of a subnet to create + the fixed IP of a port in. This query must not return more than one subnet. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to + select the subnet. It must match exactly + one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. + It will not be validated. + format: uuid + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic + hostID: + description: HostID specifies the ID of the host where + the port resides. + type: string + macAddress: + description: MACAddress specifies the MAC address of + the port. If not specified, the MAC address will be + generated. + type: string + nameSuffix: + description: NameSuffix will be appended to the name + of the port if specified. If unspecified, instead + the 0-based index of the port in the list is used. + type: string + network: + description: |- + Network is a query for an openstack network that the port will be created or discovered on. + This will fail if the query returns more than one network. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select + an OpenStack network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. + If ID is provided, the other filters cannot be + provided. Must be in UUID format. + format: uuid + type: string + type: object + profile: + description: |- + Profile is a set of key-value pairs that are used for binding + details. We intentionally don't expose this as a map[string]string + because we only want to enable the users to set the values of the + keys that are known to work in OpenStack Networking API. See + https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + To set profiles, your tenant needs permissions rule:create_port, and + rule:create_port:binding:profile + properties: + ovsHWOffload: + description: |- + OVSHWOffload enables or disables the OVS hardware offload feature. + This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + See: https://bugs.launchpad.net/nova/+bug/2020813 + type: boolean + trustedVF: + description: TrustedVF enables or disables the “trusted + mode” for the VF. + type: boolean + type: object + propagateUplinkStatus: + description: PropageteUplinkStatus enables or disables + the propagate uplink status on the port. + type: boolean + securityGroups: + description: SecurityGroups is a list of the names, + uuids, filters or any combination these of the security + groups to assign to the instance. + items: + description: SecurityGroupParam specifies an OpenStack + security group. It may be specified by ID or filter, + but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select + an OpenStack security group. If provided, cannot + be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security group + to use. If ID is provided, the other filters + cannot be provided. Must be in UUID format. + format: uuid + type: string + type: object + type: array + x-kubernetes-list-type: atomic + tags: + description: |- + Tags applied to the port (and corresponding trunk, if a trunk is configured.) + These tags are applied in addition to the instance's tags, which will also be applied to the port. + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: |- + Trunk specifies whether trunking is enabled at the port level. If not + provided the value is inherited from the machine, or false for a + bastion host. + type: boolean + valueSpecs: + description: |- + Value specs are extra parameters to include in the API request with OpenStack. + This is an extension point for the API, so what they do and if they are supported, + depends on the specific OpenStack implementation. + items: + description: ValueSpec represents a single value_spec + key-value pair. + properties: + key: + description: Key is the key in the key-value pair. + type: string + name: + description: |- + Name is the name of the key-value pair. + This is just for identifying the pair and will not be sent to the OpenStack API. + type: string + value: + description: Value is the value in the key-value + pair. + type: string + required: + - key + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + vnicType: + description: |- + VNICType specifies the type of vNIC which this port should be + attached to. This is used to determine which mechanism driver(s) to + be used to bind the port. The valid values are normal, macvtap, + direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + remote-managed, although these values will not be validated in this + API to ensure compatibility with future neutron changes or custom + implementations. What type of vNIC is actually available depends on + deployments. If not specified, the Neutron default value is used. + type: string + type: object + type: array + providerID: + description: ProviderID is the unique identifier as specified + by the cloud provider. + type: string + rootVolume: + description: The volume metadata to boot from + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from is 'Name' or default + rule: '!has(self.from) || self.from == ''Name'' ? has(self.name) + : !has(self.name)' + sizeGiB: + description: SizeGiB is the size of the block device in + gibibytes (GiB). + minimum: 1 + type: integer + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + required: + - sizeGiB + type: object + schedulerHintAdditionalProperties: + description: |- + SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + such as specifying certain host aggregates or availability zones. + items: + description: |- + SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. + It includes a Name to identify the property and a Value that can be of various types. + properties: + name: + description: |- + Name is the name of the scheduler hint property. + It is a unique identifier for the property. + minLength: 1 + type: string + value: + description: |- + Value is the value of the scheduler hint property, which can be of various types + (e.g., bool, string, int). The type is indicated by the Value.Type field. + properties: + bool: + description: |- + Bool is the boolean value of the scheduler hint, used when Type is "Bool". + This field is required if type is 'Bool', and must not be set otherwise. + type: boolean + number: + description: |- + Number is the integer value of the scheduler hint, used when Type is "Number". + This field is required if type is 'Number', and must not be set otherwise. + type: integer + string: + description: |- + String is the string value of the scheduler hint, used when Type is "String". + This field is required if type is 'String', and must not be set otherwise. + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + Type represents the type of the value. + Valid values are Bool, String, and Number. + enum: + - Bool + - String + - Number + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: bool is required when type is Bool, and forbidden + otherwise + rule: 'has(self.type) && self.type == ''Bool'' ? has(self.bool) + : !has(self.bool)' + - message: number is required when type is Number, and + forbidden otherwise + rule: 'has(self.type) && self.type == ''Number'' ? + has(self.number) : !has(self.number)' + - message: string is required when type is String, and + forbidden otherwise + rule: 'has(self.type) && self.type == ''String'' ? + has(self.string) : !has(self.string)' + required: + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityGroups: + description: The names of the security groups to assign to + the instance + items: + description: SecurityGroupParam specifies an OpenStack security + group. It may be specified by ID or filter, but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select an OpenStack + security group. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security group to use. + If ID is provided, the other filters cannot be provided. + Must be in UUID format. + format: uuid + type: string + type: object + type: array + serverGroup: + description: The server group to assign the machine to. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select an OpenStack + server group. If provided, it cannot be empty. + minProperties: 1 + properties: + name: + description: Name is the name of a server group to + look for. + type: string + type: object + id: + description: ID is the ID of the server group to use. + format: uuid + type: string + type: object + serverMetadata: + description: Metadata mapping. Allows you to create a map + of key value pairs to add to the server instance. + items: + properties: + key: + description: Key is the server metadata key + maxLength: 255 + type: string + value: + description: Value is the server metadata value + maxLength: 255 + type: string + required: + - key + - value + type: object + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + sshKeyName: + description: The ssh key to inject in the instance + type: string + tags: + description: |- + Tags which will be added to the machine and all dependent resources + which support them. These are in addition to Tags defined on the + cluster. + Requires Nova api 2.52 minimum! + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: Whether the server instance is created on a trunk + port or not. + type: boolean + required: + - image + type: object + x-kubernetes-validations: + - message: at least one of flavor or flavorID must be set + rule: (has(self.flavor) || has(self.flavorID)) + type: object + x-kubernetes-validations: + - message: spec is required if bastion is enabled + rule: '!self.enabled || has(self.spec)' + controlPlaneAvailabilityZones: + description: |- + ControlPlaneAvailabilityZones is the set of availability zones which + control plane machines may be deployed to. + items: + type: string + type: array + x-kubernetes-list-type: set + controlPlaneEndpoint: + description: |- + ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + It is normally populated automatically by the OpenStackCluster + controller during cluster provisioning. If it is set on creation the + control plane endpoint will use the values set here in preference to + values set elsewhere. + ControlPlaneEndpoint cannot be modified after ControlPlaneEndpoint.Host has been set. + 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 + controlPlaneOmitAvailabilityZone: + description: |- + ControlPlaneOmitAvailabilityZone causes availability zone to be + omitted when creating control plane nodes, allowing the Nova + scheduler to make a decision on which availability zone to use based + on other scheduling constraints + type: boolean + disableAPIServerFloatingIP: + description: |- + DisableAPIServerFloatingIP determines whether or not to attempt to attach a floating + IP to the API server. This allows for the creation of clusters when attaching a floating + IP to the API server (and hence, in many cases, exposing the API server to the internet) + is not possible or desirable, e.g. if using a shared VLAN for communication between + management and workload clusters or when the management cluster is inside the + project network. + This option requires that the API server use a VIP on the cluster network so that the + underlying machines can change without changing ControlPlaneEndpoint.Host. + When using a managed load balancer, this VIP will be managed automatically. + If not using a managed load balancer, cluster configuration will fail without additional + configuration to manage the VIP on the control plane machines, which falls outside of + the scope of this controller. + type: boolean + disableExternalNetwork: + description: |- + DisableExternalNetwork specifies whether or not to attempt to connect the cluster + to an external network. This allows for the creation of clusters when connecting + to an external network is not possible or desirable, e.g. if using a provider network. + type: boolean + disablePortSecurity: + description: |- + DisablePortSecurity disables the port security of the network created for the + Kubernetes cluster, which also disables SecurityGroups + type: boolean + externalNetwork: + description: |- + ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs. + This option is ignored if DisableExternalNetwork is set to true. + + If ExternalNetwork is defined it must refer to exactly one external network. + + If ExternalNetwork is not defined or is empty the controller will use any + existing external network as long as there is only one. It is an + error if ExternalNetwork is not defined and there are multiple + external networks unless DisableExternalNetwork is also set. + + If ExternalNetwork is not defined and there are no external networks + the controller will proceed as though DisableExternalNetwork was set. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. If ID is provided, + the other filters cannot be provided. Must be in UUID format. + format: uuid + type: string + type: object + externalRouterIPs: + description: |- + ExternalRouterIPs is an array of externalIPs on the respective subnets. + This is necessary if the router needs a fixed ip in a specific subnet. + items: + properties: + fixedIP: + description: The FixedIP in the corresponding subnet + type: string + subnet: + description: The subnet in which the FixedIP is used for the + Gateway of this router + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select the subnet. + It must match exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. It will not be + validated. + format: uuid + type: string + type: object + required: + - subnet + type: object + type: array + x-kubernetes-list-type: atomic + identityRef: + description: |- + IdentityRef is a reference to a secret holding OpenStack credentials + to be used when reconciling this cluster. It is also to reconcile + machines unless overridden in the machine spec. + properties: + cloudName: + description: CloudName specifies the name of the entry in the + clouds.yaml file to use. + minLength: 1 + type: string + name: + description: |- + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 + type: string + region: + description: |- + Region specifies an OpenStack region to use. If specified, it overrides + any value in clouds.yaml. If specified for an OpenStackMachine, its + value will be included in providerID. + type: string + type: + default: Secret + description: Type specifies the identity reference type. Defaults + to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string + required: + - cloudName + - name + - type + type: object + x-kubernetes-validations: + - message: region is immutable + rule: (!has(self.region) && !has(oldSelf.region)) || self.region + == oldSelf.region + managedSecurityGroups: + description: |- + ManagedSecurityGroups determines whether OpenStack security groups for the cluster + will be managed by the OpenStack provider or whether pre-existing security groups will + be specified as part of the configuration. + By default, the managed security groups have rules that allow the Kubelet, etcd, and the + Kubernetes API server to function correctly. + It's possible to add additional rules to the managed security groups. + When defined to an empty struct, the managed security groups will be created with the default rules. + properties: + allNodesSecurityGroupRules: + description: allNodesSecurityGroupRules defines the rules that + should be applied to all nodes. + items: + description: |- + SecurityGroupRuleSpec represent the basic information of the associated OpenStack + Security Group Role. + For now this is only used for the allNodesSecurityGroupRules but when we add + other security groups, we'll need to add a validation because + Remote* fields are mutually exclusive. + properties: + description: + description: description of the security group rule. + type: string + direction: + description: |- + direction in which the security group rule is applied. The only values + allowed are "ingress" or "egress". For a compute instance, an ingress + security group rule is applied to incoming (ingress) traffic for that + instance. An egress rule is applied to traffic leaving the instance. + enum: + - ingress + - egress + type: string + etherType: + description: |- + etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + ingress or egress rules. + enum: + - IPv4 + - IPv6 + type: string + name: + description: |- + name of the security group rule. + It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + type: string + portRangeMax: + description: |- + portRangeMax is a number in the range that is matched by the security group + rule. The portRangeMin attribute constrains the portRangeMax attribute. + type: integer + portRangeMin: + description: |- + portRangeMin is a number in the range that is matched by the security group + rule. If the protocol is TCP or UDP, this value must be less than or equal + to the value of the portRangeMax attribute. + type: integer + protocol: + description: protocol is the protocol that is matched by + the security group rule. + type: string + remoteGroupID: + description: |- + remoteGroupID is the remote group ID to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteIPPrefix: + description: |- + remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteManagedGroups: + description: |- + remoteManagedGroups is the remote managed groups to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + items: + enum: + - bastion + - controlplane + - worker + type: string + type: array + required: + - direction + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + allowAllInClusterTraffic: + default: false + description: AllowAllInClusterTraffic allows all ingress and egress + traffic between cluster nodes when set to true. + type: boolean + controlPlaneNodesSecurityGroupRules: + description: controlPlaneNodesSecurityGroupRules defines the rules + that should be applied to control plane nodes. + items: + description: |- + SecurityGroupRuleSpec represent the basic information of the associated OpenStack + Security Group Role. + For now this is only used for the allNodesSecurityGroupRules but when we add + other security groups, we'll need to add a validation because + Remote* fields are mutually exclusive. + properties: + description: + description: description of the security group rule. + type: string + direction: + description: |- + direction in which the security group rule is applied. The only values + allowed are "ingress" or "egress". For a compute instance, an ingress + security group rule is applied to incoming (ingress) traffic for that + instance. An egress rule is applied to traffic leaving the instance. + enum: + - ingress + - egress + type: string + etherType: + description: |- + etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + ingress or egress rules. + enum: + - IPv4 + - IPv6 + type: string + name: + description: |- + name of the security group rule. + It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + type: string + portRangeMax: + description: |- + portRangeMax is a number in the range that is matched by the security group + rule. The portRangeMin attribute constrains the portRangeMax attribute. + type: integer + portRangeMin: + description: |- + portRangeMin is a number in the range that is matched by the security group + rule. If the protocol is TCP or UDP, this value must be less than or equal + to the value of the portRangeMax attribute. + type: integer + protocol: + description: protocol is the protocol that is matched by + the security group rule. + type: string + remoteGroupID: + description: |- + remoteGroupID is the remote group ID to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteIPPrefix: + description: |- + remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteManagedGroups: + description: |- + remoteManagedGroups is the remote managed groups to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + items: + enum: + - bastion + - controlplane + - worker + type: string + type: array + required: + - direction + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + workerNodesSecurityGroupRules: + description: workerNodesSecurityGroupRules defines the rules that + should be applied to worker nodes. + items: + description: |- + SecurityGroupRuleSpec represent the basic information of the associated OpenStack + Security Group Role. + For now this is only used for the allNodesSecurityGroupRules but when we add + other security groups, we'll need to add a validation because + Remote* fields are mutually exclusive. + properties: + description: + description: description of the security group rule. + type: string + direction: + description: |- + direction in which the security group rule is applied. The only values + allowed are "ingress" or "egress". For a compute instance, an ingress + security group rule is applied to incoming (ingress) traffic for that + instance. An egress rule is applied to traffic leaving the instance. + enum: + - ingress + - egress + type: string + etherType: + description: |- + etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + ingress or egress rules. + enum: + - IPv4 + - IPv6 + type: string + name: + description: |- + name of the security group rule. + It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + type: string + portRangeMax: + description: |- + portRangeMax is a number in the range that is matched by the security group + rule. The portRangeMin attribute constrains the portRangeMax attribute. + type: integer + portRangeMin: + description: |- + portRangeMin is a number in the range that is matched by the security group + rule. If the protocol is TCP or UDP, this value must be less than or equal + to the value of the portRangeMax attribute. + type: integer + protocol: + description: protocol is the protocol that is matched by + the security group rule. + type: string + remoteGroupID: + description: |- + remoteGroupID is the remote group ID to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteIPPrefix: + description: |- + remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteManagedGroups: + description: |- + remoteManagedGroups is the remote managed groups to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + items: + enum: + - bastion + - controlplane + - worker + type: string + type: array + required: + - direction + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - allowAllInClusterTraffic + type: object + managedSubnets: + description: |- + ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network, + subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4 + subnet is supported. If you leave this empty, no network will be created. + items: + properties: + allocationPools: + description: |- + AllocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. + If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from + outside of these ranges manually. + items: + properties: + end: + description: End represents the end of the AlloctionPool, + that is the highest IP of the pool. + type: string + start: + description: Start represents the start of the AllocationPool, + that is the lowest IP of the pool. + type: string + required: + - end + - start + type: object + type: array + cidr: + description: |- + CIDR is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. + This field is required when defining a subnet. + type: string + dnsNameservers: + description: |- + DNSNameservers holds a list of DNS server addresses that will be provided when creating + the subnet. These addresses need to have the same IP version as CIDR. + items: + type: string + type: array + required: + - cidr + type: object + maxItems: 1 + type: array + x-kubernetes-list-type: atomic + network: + description: |- + Network specifies an existing network to use if no ManagedSubnets + are specified. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. If ID is provided, + the other filters cannot be provided. Must be in UUID format. + format: uuid + type: string + type: object + networkMTU: + description: |- + NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID. + This value will be used only if the Cluster actuator creates the network. + If left empty, the network will have the default MTU defined in Openstack network service. + To use this field, the Openstack installation requires the net-mtu neutron API extension. + type: integer + router: + description: |- + Router specifies an existing router to be used if ManagedSubnets are + specified. If specified, no new router will be created. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + router. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the router to use. If ID is provided, + the other filters cannot be provided. Must be in UUID format. + format: uuid + type: string + type: object + subnets: + description: |- + Subnets specifies existing subnets to use if not ManagedSubnets are + specified. All subnets must be in the network specified by Network. + There can be zero, one, or two subnets. If no subnets are specified, + all subnets in Network will be used. If 2 subnets are specified, one + must be IPv4 and the other IPv6. + items: + description: SubnetParam specifies an OpenStack subnet to use. It + may be specified by either ID or filter, but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select the subnet. + It must match exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. It will not be validated. + format: uuid + type: string + type: object + maxItems: 2 + type: array + x-kubernetes-list-type: atomic + tags: + description: Tags to set on all resources in cluster which support + tags + items: + type: string + type: array + x-kubernetes-list-type: set + required: + - identityRef + type: object + x-kubernetes-validations: + - message: bastion floating IP cannot be set when disableExternalNetwork + is true + rule: 'has(self.disableExternalNetwork) && self.disableExternalNetwork + ? !has(self.bastion) || !has(self.bastion.floatingIP) : true' + - message: disableAPIServerFloatingIP cannot be false when disableExternalNetwork + is true + rule: 'has(self.disableExternalNetwork) && self.disableExternalNetwork + ? has(self.disableAPIServerFloatingIP) && self.disableAPIServerFloatingIP + : true' + status: + description: OpenStackClusterStatus defines the observed state of OpenStackCluster. + properties: + apiServerLoadBalancer: + description: APIServerLoadBalancer describes the api server load balancer + if one exists + properties: + allowedCIDRs: + items: + type: string + type: array + id: + type: string + internalIP: + type: string + ip: + type: string + loadBalancerNetwork: + description: |- + LoadBalancerNetwork contains information about network and/or subnets which the + loadbalancer is allocated on. + If subnets are specified within the LoadBalancerNetwork currently only the first + subnet in the list is taken into account. + properties: + id: + type: string + name: + type: string + subnets: + description: Subnets is a list of subnets associated with + the default cluster network. Machines which use the default + cluster network will get an address from all of these subnets. + items: + description: Subnet represents basic information about the + associated OpenStack Neutron Subnet. + properties: + cidr: + type: string + id: + type: string + name: + type: string + tags: + items: + type: string + type: array + required: + - cidr + - id + - name + type: object + type: array + tags: + items: + type: string + type: array + required: + - id + - name + type: object + name: + type: string + tags: + items: + type: string + type: array + required: + - id + - internalIP + - ip + - name + type: object + bastion: + description: Bastion contains the information about the deployed bastion + host + properties: + floatingIP: + type: string + id: + type: string + ip: + type: string + name: + type: string + resolved: + description: |- + Resolved contains parts of the bastion's machine spec with all + external references fully resolved. + properties: + flavorID: + description: FlavorID is the ID of the flavor to use. + type: string + imageID: + description: ImageID is the ID of the image to use for the + machine and is calculated based on ImageFilter. + type: string + ports: + description: Ports is the fully resolved list of ports to + create for the machine. + items: + description: ResolvedPortSpec is a PortOpts with all contained + references fully resolved. + properties: + adminStateUp: + description: AdminStateUp specifies whether the port + should be created in the up (true) or down (false) + state. The default is up. + type: boolean + allowedAddressPairs: + description: |- + AllowedAddressPairs is a list of address pairs which Neutron will + allow the port to send traffic from in addition to the port's + addresses. If not specified, the MAC Address will be the MAC Address + of the port. Depending on the configuration of Neutron, it may be + supported to specify a CIDR instead of a specific IP address. + items: + properties: + ipAddress: + description: |- + IPAddress is the IP address of the allowed address pair. Depending on + the configuration of Neutron, it may be supported to specify a CIDR + instead of a specific IP address. + type: string + macAddress: + description: |- + MACAddress is the MAC address of the allowed address pair. If not + specified, the MAC address will be the MAC address of the port. + type: string + required: + - ipAddress + type: object + type: array + description: + description: Description is a human-readable description + for the port. + type: string + disablePortSecurity: + description: |- + DisablePortSecurity enables or disables the port security when set. + When not set, it takes the value of the corresponding field at the network level. + type: boolean + fixedIPs: + description: FixedIPs is a list of pairs of subnet and/or + IP address to assign to the port. If specified, these + must be subnets of the port's network. + items: + description: ResolvedFixedIP is a FixedIP with the + Subnet resolved to an ID. + properties: + ipAddress: + description: |- + IPAddress is a specific IP address to assign to the port. If SubnetID + is also specified, IPAddress must be a valid IP address in the + subnet. If Subnet is not specified, IPAddress must be a valid IP + address in any subnet of the port's network. + type: string + subnet: + description: SubnetID is the id of a subnet to + create the fixed IP of a port in. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + hostID: + description: HostID specifies the ID of the host where + the port resides. + type: string + macAddress: + description: MACAddress specifies the MAC address of + the port. If not specified, the MAC address will be + generated. + type: string + name: + description: Name is the name of the port. + type: string + networkID: + description: NetworkID is the ID of the network the + port will be created in. + type: string + profile: + description: |- + Profile is a set of key-value pairs that are used for binding + details. We intentionally don't expose this as a map[string]string + because we only want to enable the users to set the values of the + keys that are known to work in OpenStack Networking API. See + https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + To set profiles, your tenant needs permissions rule:create_port, and + rule:create_port:binding:profile + properties: + ovsHWOffload: + description: |- + OVSHWOffload enables or disables the OVS hardware offload feature. + This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + See: https://bugs.launchpad.net/nova/+bug/2020813 + type: boolean + trustedVF: + description: TrustedVF enables or disables the “trusted + mode” for the VF. + type: boolean + type: object + propagateUplinkStatus: + description: PropageteUplinkStatus enables or disables + the propagate uplink status on the port. + type: boolean + securityGroups: + description: SecurityGroups is a list of security group + IDs to assign to the port. + items: + type: string + type: array + x-kubernetes-list-type: atomic + tags: + description: Tags applied to the port (and corresponding + trunk, if a trunk is configured.) + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: Trunk specifies whether trunking is enabled + at the port level. + type: boolean + valueSpecs: + description: |- + Value specs are extra parameters to include in the API request with OpenStack. + This is an extension point for the API, so what they do and if they are supported, + depends on the specific OpenStack implementation. + items: + description: ValueSpec represents a single value_spec + key-value pair. + properties: + key: + description: Key is the key in the key-value pair. + type: string + name: + description: |- + Name is the name of the key-value pair. + This is just for identifying the pair and will not be sent to the OpenStack API. + type: string + value: + description: Value is the value in the key-value + pair. + type: string + required: + - key + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + vnicType: + description: |- + VNICType specifies the type of vNIC which this port should be + attached to. This is used to determine which mechanism driver(s) to + be used to bind the port. The valid values are normal, macvtap, + direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + remote-managed, although these values will not be validated in this + API to ensure compatibility with future neutron changes or custom + implementations. What type of vNIC is actually available depends on + deployments. If not specified, the Neutron default value is used. + type: string + required: + - description + - name + - networkID + type: object + type: array + serverGroupID: + description: ServerGroupID is the ID of the server group the + machine should be added to and is calculated based on ServerGroupFilter. + type: string + type: object + resources: + description: Resources contains references to OpenStack resources + created for the bastion. + properties: + ports: + description: Ports is the status of the ports created for + the machine. + items: + properties: + id: + description: ID is the unique identifier of the port. + type: string + required: + - id + type: object + type: array + type: object + sshKeyName: + type: string + state: + description: InstanceState describes the state of an OpenStack + instance. + type: string + type: object + bastionSecurityGroup: + description: |- + BastionSecurityGroup contains the information about the OpenStack + Security Group that needs to be applied to worker nodes. + properties: + id: + description: id of the security group + type: string + name: + description: name of the security group + type: string + required: + - id + - name + type: object + conditions: + description: |- + Conditions defines current service state of the OpenStackCluster. + This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + (both during initial provisioning and after the initial provisioning is completed). + 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 + type: array + controlPlaneSecurityGroup: + description: |- + ControlPlaneSecurityGroup contains the information about the + OpenStack Security Group that needs to be applied to control plane + nodes. + properties: + id: + description: id of the security group + type: string + name: + description: name of the security group + type: string + required: + - id + - name + type: object + externalNetwork: + description: ExternalNetwork contains information about the external + network used for default ingress and egress traffic. + properties: + id: + type: string + name: + type: string + tags: + items: + type: string + type: array + required: + - id + - name + type: object + failureDomains: + description: FailureDomains represent OpenStack availability zones + 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 + type: array + initialization: + description: Initialization contains information about the initialization + status of the cluster. + properties: + provisioned: + description: |- + Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object + network: + description: Network contains information about the created OpenStack + Network. + properties: + id: + type: string + name: + type: string + subnets: + description: Subnets is a list of subnets associated with the + default cluster network. Machines which use the default cluster + network will get an address from all of these subnets. + items: + description: Subnet represents basic information about the associated + OpenStack Neutron Subnet. + properties: + cidr: + type: string + id: + type: string + name: + type: string + tags: + items: + type: string + type: array + required: + - cidr + - id + - name + type: object + type: array + tags: + items: + type: string + type: array + required: + - id + - name + type: object + router: + description: Router describes the default cluster router + properties: + id: + type: string + ips: + items: + type: string + type: array + name: + type: string + tags: + items: + type: string + type: array + required: + - id + - name + type: object + workerSecurityGroup: + description: |- + WorkerSecurityGroup contains the information about the OpenStack + Security Group that needs to be applied to worker nodes. + properties: + id: + description: id of the security group + type: string + name: + description: name of the security group + type: string + required: + - id + - name + type: object + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml index 084846a63..d57a76d1f 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml @@ -1301,9 +1301,2159 @@ spec: is serving. format: int32 type: integer + type: object + controlPlaneOmitAvailabilityZone: + description: |- + ControlPlaneOmitAvailabilityZone causes availability zone to be + omitted when creating control plane nodes, allowing the Nova + scheduler to make a decision on which availability zone to use based + on other scheduling constraints + type: boolean + disableAPIServerFloatingIP: + description: |- + DisableAPIServerFloatingIP determines whether or not to attempt to attach a floating + IP to the API server. This allows for the creation of clusters when attaching a floating + IP to the API server (and hence, in many cases, exposing the API server to the internet) + is not possible or desirable, e.g. if using a shared VLAN for communication between + management and workload clusters or when the management cluster is inside the + project network. + This option requires that the API server use a VIP on the cluster network so that the + underlying machines can change without changing ControlPlaneEndpoint.Host. + When using a managed load balancer, this VIP will be managed automatically. + If not using a managed load balancer, cluster configuration will fail without additional + configuration to manage the VIP on the control plane machines, which falls outside of + the scope of this controller. + type: boolean + disableExternalNetwork: + description: |- + DisableExternalNetwork specifies whether or not to attempt to connect the cluster + to an external network. This allows for the creation of clusters when connecting + to an external network is not possible or desirable, e.g. if using a provider network. + type: boolean + disablePortSecurity: + description: |- + DisablePortSecurity disables the port security of the network created for the + Kubernetes cluster, which also disables SecurityGroups + type: boolean + externalNetwork: + description: |- + ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs. + This option is ignored if DisableExternalNetwork is set to true. + + If ExternalNetwork is defined it must refer to exactly one external network. + + If ExternalNetwork is not defined or is empty the controller will use any + existing external network as long as there is only one. It is an + error if ExternalNetwork is not defined and there are multiple + external networks unless DisableExternalNetwork is also set. + + If ExternalNetwork is not defined and there are no external networks + the controller will proceed as though DisableExternalNetwork was set. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. If ID + is provided, the other filters cannot be provided. Must + be in UUID format. + format: uuid + type: string + type: object + externalRouterIPs: + description: |- + ExternalRouterIPs is an array of externalIPs on the respective subnets. + This is necessary if the router needs a fixed ip in a specific subnet. + items: + properties: + fixedIP: + description: The FixedIP in the corresponding subnet + type: string + subnet: + description: The subnet in which the FixedIP is used + for the Gateway of this router + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select + the subnet. It must match exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. It will + not be validated. + format: uuid + type: string + type: object + required: + - subnet + type: object + type: array + x-kubernetes-list-type: atomic + identityRef: + description: |- + IdentityRef is a reference to a secret holding OpenStack credentials + to be used when reconciling this cluster. It is also to reconcile + machines unless overridden in the machine spec. + properties: + cloudName: + description: CloudName specifies the name of the entry + in the clouds.yaml file to use. + minLength: 1 + type: string + name: + description: |- + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 + type: string + region: + description: |- + Region specifies an OpenStack region to use. If specified, it overrides + any value in clouds.yaml. If specified for an OpenStackMachine, its + value will be included in providerID. + type: string + type: + default: Secret + description: Type specifies the identity reference type. + Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string + required: + - cloudName + - name + - type + type: object + x-kubernetes-validations: + - message: region is immutable + rule: (!has(self.region) && !has(oldSelf.region)) || self.region + == oldSelf.region + managedSecurityGroups: + description: |- + ManagedSecurityGroups determines whether OpenStack security groups for the cluster + will be managed by the OpenStack provider or whether pre-existing security groups will + be specified as part of the configuration. + By default, the managed security groups have rules that allow the Kubelet, etcd, and the + Kubernetes API server to function correctly. + It's possible to add additional rules to the managed security groups. + When defined to an empty struct, the managed security groups will be created with the default rules. + properties: + allNodesSecurityGroupRules: + description: allNodesSecurityGroupRules defines the rules + that should be applied to all nodes. + items: + description: |- + SecurityGroupRuleSpec represent the basic information of the associated OpenStack + Security Group Role. + For now this is only used for the allNodesSecurityGroupRules but when we add + other security groups, we'll need to add a validation because + Remote* fields are mutually exclusive. + properties: + description: + description: description of the security group rule. + type: string + direction: + description: |- + direction in which the security group rule is applied. The only values + allowed are "ingress" or "egress". For a compute instance, an ingress + security group rule is applied to incoming (ingress) traffic for that + instance. An egress rule is applied to traffic leaving the instance. + enum: + - ingress + - egress + type: string + etherType: + description: |- + etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + ingress or egress rules. + enum: + - IPv4 + - IPv6 + type: string + name: + description: |- + name of the security group rule. + It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + type: string + portRangeMax: + description: |- + portRangeMax is a number in the range that is matched by the security group + rule. The portRangeMin attribute constrains the portRangeMax attribute. + type: integer + portRangeMin: + description: |- + portRangeMin is a number in the range that is matched by the security group + rule. If the protocol is TCP or UDP, this value must be less than or equal + to the value of the portRangeMax attribute. + type: integer + protocol: + description: protocol is the protocol that is matched + by the security group rule. + type: string + remoteGroupID: + description: |- + remoteGroupID is the remote group ID to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteIPPrefix: + description: |- + remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteManagedGroups: + description: |- + remoteManagedGroups is the remote managed groups to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + items: + enum: + - bastion + - controlplane + - worker + type: string + type: array + required: + - direction + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + allowAllInClusterTraffic: + default: false + description: AllowAllInClusterTraffic allows all ingress + and egress traffic between cluster nodes when set to + true. + type: boolean + controlPlaneNodesSecurityGroupRules: + description: controlPlaneNodesSecurityGroupRules defines + the rules that should be applied to control plane nodes. + items: + description: |- + SecurityGroupRuleSpec represent the basic information of the associated OpenStack + Security Group Role. + For now this is only used for the allNodesSecurityGroupRules but when we add + other security groups, we'll need to add a validation because + Remote* fields are mutually exclusive. + properties: + description: + description: description of the security group rule. + type: string + direction: + description: |- + direction in which the security group rule is applied. The only values + allowed are "ingress" or "egress". For a compute instance, an ingress + security group rule is applied to incoming (ingress) traffic for that + instance. An egress rule is applied to traffic leaving the instance. + enum: + - ingress + - egress + type: string + etherType: + description: |- + etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + ingress or egress rules. + enum: + - IPv4 + - IPv6 + type: string + name: + description: |- + name of the security group rule. + It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + type: string + portRangeMax: + description: |- + portRangeMax is a number in the range that is matched by the security group + rule. The portRangeMin attribute constrains the portRangeMax attribute. + type: integer + portRangeMin: + description: |- + portRangeMin is a number in the range that is matched by the security group + rule. If the protocol is TCP or UDP, this value must be less than or equal + to the value of the portRangeMax attribute. + type: integer + protocol: + description: protocol is the protocol that is matched + by the security group rule. + type: string + remoteGroupID: + description: |- + remoteGroupID is the remote group ID to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteIPPrefix: + description: |- + remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteManagedGroups: + description: |- + remoteManagedGroups is the remote managed groups to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + items: + enum: + - bastion + - controlplane + - worker + type: string + type: array + required: + - direction + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + workerNodesSecurityGroupRules: + description: workerNodesSecurityGroupRules defines the + rules that should be applied to worker nodes. + items: + description: |- + SecurityGroupRuleSpec represent the basic information of the associated OpenStack + Security Group Role. + For now this is only used for the allNodesSecurityGroupRules but when we add + other security groups, we'll need to add a validation because + Remote* fields are mutually exclusive. + properties: + description: + description: description of the security group rule. + type: string + direction: + description: |- + direction in which the security group rule is applied. The only values + allowed are "ingress" or "egress". For a compute instance, an ingress + security group rule is applied to incoming (ingress) traffic for that + instance. An egress rule is applied to traffic leaving the instance. + enum: + - ingress + - egress + type: string + etherType: + description: |- + etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + ingress or egress rules. + enum: + - IPv4 + - IPv6 + type: string + name: + description: |- + name of the security group rule. + It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + type: string + portRangeMax: + description: |- + portRangeMax is a number in the range that is matched by the security group + rule. The portRangeMin attribute constrains the portRangeMax attribute. + type: integer + portRangeMin: + description: |- + portRangeMin is a number in the range that is matched by the security group + rule. If the protocol is TCP or UDP, this value must be less than or equal + to the value of the portRangeMax attribute. + type: integer + protocol: + description: protocol is the protocol that is matched + by the security group rule. + type: string + remoteGroupID: + description: |- + remoteGroupID is the remote group ID to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteIPPrefix: + description: |- + remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + type: string + remoteManagedGroups: + description: |- + remoteManagedGroups is the remote managed groups to be associated with this security group rule. + You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + items: + enum: + - bastion + - controlplane + - worker + type: string + type: array + required: + - direction + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - allowAllInClusterTraffic + type: object + managedSubnets: + description: |- + ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network, + subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4 + subnet is supported. If you leave this empty, no network will be created. + items: + properties: + allocationPools: + description: |- + AllocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. + If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from + outside of these ranges manually. + items: + properties: + end: + description: End represents the end of the AlloctionPool, + that is the highest IP of the pool. + type: string + start: + description: Start represents the start of the + AllocationPool, that is the lowest IP of the + pool. + type: string + required: + - end + - start + type: object + type: array + cidr: + description: |- + CIDR is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. + This field is required when defining a subnet. + type: string + dnsNameservers: + description: |- + DNSNameservers holds a list of DNS server addresses that will be provided when creating + the subnet. These addresses need to have the same IP version as CIDR. + items: + type: string + type: array + required: + - cidr + type: object + maxItems: 1 + type: array + x-kubernetes-list-type: atomic + network: + description: |- + Network specifies an existing network to use if no ManagedSubnets + are specified. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. If ID + is provided, the other filters cannot be provided. Must + be in UUID format. + format: uuid + type: string + type: object + networkMTU: + description: |- + NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID. + This value will be used only if the Cluster actuator creates the network. + If left empty, the network will have the default MTU defined in Openstack network service. + To use this field, the Openstack installation requires the net-mtu neutron API extension. + type: integer + router: + description: |- + Router specifies an existing router to be used if ManagedSubnets are + specified. If specified, no new router will be created. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + router. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the router to use. If ID + is provided, the other filters cannot be provided. Must + be in UUID format. + format: uuid + type: string + type: object + subnets: + description: |- + Subnets specifies existing subnets to use if not ManagedSubnets are + specified. All subnets must be in the network specified by Network. + There can be zero, one, or two subnets. If no subnets are specified, + all subnets in Network will be used. If 2 subnets are specified, one + must be IPv4 and the other IPv6. + items: + description: SubnetParam specifies an OpenStack subnet to + use. It may be specified by either ID or filter, but not + both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select the + subnet. It must match exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. It will not + be validated. + format: uuid + type: string + type: object + maxItems: 2 + type: array + x-kubernetes-list-type: atomic + tags: + description: Tags to set on all resources in cluster which + support tags + items: + type: string + type: array + x-kubernetes-list-type: set + required: + - identityRef + type: object + x-kubernetes-validations: + - message: bastion floating IP cannot be set when disableExternalNetwork + is true + rule: 'has(self.disableExternalNetwork) && self.disableExternalNetwork + ? !has(self.bastion) || !has(self.bastion.floatingIP) : true' + - message: disableAPIServerFloatingIP cannot be false when disableExternalNetwork + is true + rule: 'has(self.disableExternalNetwork) && self.disableExternalNetwork + ? has(self.disableAPIServerFloatingIP) && self.disableAPIServerFloatingIP + : true' + required: + - spec + type: object + required: + - template + type: object + type: object + served: true + storage: false + - name: v1beta2 + schema: + openAPIV3Schema: + description: OpenStackClusterTemplate is the Schema for the openstackclustertemplates + 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: OpenStackClusterTemplateSpec defines the desired state of + OpenStackClusterTemplate. + properties: + template: + description: OpenStackClusterTemplateResource describes the data needed + to create a OpenStackCluster from a template. + properties: + spec: + description: OpenStackClusterSpec defines the desired state of + OpenStackCluster. + properties: + apiServerFixedIP: + description: |- + APIServerFixedIP is the fixed IP which will be associated with the API server. + In the case where the API server has a floating IP but not a managed load balancer, + this field is not used. + If a managed load balancer is used and this field is not specified, a fixed IP will + be dynamically allocated for the load balancer. + If a managed load balancer is not used AND the API server floating IP is disabled, + this field MUST be specified and should correspond to a pre-allocated port that + holds the fixed IP to be used as a VIP. + type: string + apiServerFloatingIP: + description: |- + APIServerFloatingIP is the floatingIP which will be associated with the API server. + The floatingIP will be created if it does not already exist. + If not specified, a new floatingIP is allocated. + This field is not used if DisableAPIServerFloatingIP is set to true. + type: string + apiServerLoadBalancer: + description: |- + APIServerLoadBalancer configures the optional LoadBalancer for the APIServer. + If not specified, no load balancer will be created for the API server. + properties: + additionalPorts: + description: AdditionalPorts adds additional tcp ports + to the load balancer. + items: + type: integer + type: array + x-kubernetes-list-type: set + allowedCIDRs: + description: AllowedCIDRs restrict access to all API-Server + listeners to the given address CIDRs. + items: + type: string + type: array + x-kubernetes-list-type: set + availabilityZone: + description: AvailabilityZone is the failure domain that + will be used to create the APIServerLoadBalancer Spec. + type: string + enabled: + default: true + description: |- + Enabled defines whether a load balancer should be created. This value + defaults to true if an APIServerLoadBalancer is given. + + There is no reason to set this to false. To disable creation of the + API server loadbalancer, omit the APIServerLoadBalancer field in the + cluster spec instead. + type: boolean + flavor: + description: Flavor is the flavor name that will be used + to create the APIServerLoadBalancer Spec. + type: string + monitor: + description: Monitor contains configuration for the load + balancer health monitor. + properties: + delay: + description: Delay is the time in seconds between + sending probes to members. + minimum: 0 + type: integer + maxRetries: + description: MaxRetries is the number of successful + checks before changing the operating status of the + member to ONLINE. + maximum: 10 + minimum: 0 + type: integer + maxRetriesDown: + description: MaxRetriesDown is the number of allowed + check failures before changing the operating status + of the member to ERROR. + maximum: 10 + minimum: 1 + type: integer + timeout: + description: Timeout is the maximum time in seconds + for a monitor to wait for a connection to be established + before it times out. + minimum: 0 + type: integer + type: object + network: + description: Network defines which network should the + load balancer be allocated on. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an + OpenStack network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. If + ID is provided, the other filters cannot be provided. + Must be in UUID format. + format: uuid + type: string + type: object + provider: + description: |- + Provider specifies name of a specific Octavia provider to use for the + API load balancer. The Octavia default will be used if it is not + specified. + type: string + subnets: + description: |- + Subnets define which subnets should the load balancer be allocated on. + It is expected that subnets are located on the network specified in this resource. + Only the first element is taken into account. + kubebuilder:validation:MaxLength:=2 + items: + description: SubnetParam specifies an OpenStack subnet + to use. It may be specified by either ID or filter, + but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select + the subnet. It must match exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. It will + not be validated. + format: uuid + type: string + type: object + type: array + x-kubernetes-list-type: atomic required: - - host - - port + - enabled + type: object + apiServerPort: + description: |- + APIServerPort is the port on which the listener on the APIServer + will be created. If specified, it must be an integer between 0 and 65535. + maximum: 65535 + minimum: 0 + type: integer + bastion: + description: |- + Bastion is the OpenStack instance to login the nodes + + As a rolling update is not ideal during a bastion host session, we + prevent changes to a running bastion configuration. To make changes, it's required + to first set `enabled: false` which will remove the bastion and then changes can be made. + properties: + availabilityZone: + description: AvailabilityZone is the failure domain that + will be used to create the Bastion Spec. + type: string + enabled: + default: true + description: |- + Enabled means that bastion is enabled. The bastion is enabled by + default if this field is not specified. Set this field to false to disable the + bastion. + + It is not currently possible to remove the bastion from the cluster + spec without first disabling it by setting this field to false and + waiting until the bastion has been deleted. + type: boolean + floatingIP: + description: |- + FloatingIP which will be associated to the bastion machine. It's the IP address, not UUID. + The floating IP should already exist and should not be associated with a port. If FIP of this address does not + exist, CAPO will try to create it, but by default only OpenStack administrators have privileges to do so. + format: ipv4 + type: string + spec: + description: Spec for the bastion itself + properties: + additionalBlockDevices: + description: AdditionalBlockDevices is a list of specifications + for additional block devices to attach to the server + instance + items: + description: AdditionalBlockDevice is a block device + to attach to the server. + properties: + name: + description: |- + Name of the block device in the context of a machine. + If the block device is a volume, the Cinder volume will be named + as a combination of the machine name and this name. + Also, this name will be used for tagging the block device. + Information about the block device tag can be obtained from the OpenStack + metadata API or the config drive. + Name cannot be 'root', which is reserved for the root volume. + type: string + sizeGiB: + description: SizeGiB is the size of the block + device in gibibytes (GiB). + minimum: 1 + type: integer + storage: + description: |- + Storage specifies the storage type of the block device and + additional storage options. + properties: + type: + description: |- + Type is the type of block device to create. + This can be either "Volume" or "Local". + type: string + volume: + description: Volume contains additional + storage options for a volume block device. + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from + is 'Name' or default + rule: '!has(self.from) || self.from + == ''Name'' ? has(self.name) : !has(self.name)' + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + type: object + required: + - type + type: object + required: + - name + - sizeGiB + - storage + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + configDrive: + description: Config Drive support + type: boolean + flavor: + description: The flavor reference for the flavor for + your server instance. + minLength: 1 + type: string + flavorID: + description: |- + FlavorID allows flavors to be specified by ID. This field takes precedence + over Flavor. + minLength: 1 + type: string + floatingIPPoolRef: + description: |- + floatingIPPoolRef is a reference to a IPPool that will be assigned + to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP + will be assigned to the OpenStackMachine. + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + identityRef: + description: |- + IdentityRef is a reference to a secret holding OpenStack credentials + to be used when reconciling this machine. If not specified, the + credentials specified in the cluster will be used. + properties: + cloudName: + description: CloudName specifies the name of the + entry in the clouds.yaml file to use. + minLength: 1 + type: string + name: + description: |- + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 + type: string + region: + description: |- + Region specifies an OpenStack region to use. If specified, it overrides + any value in clouds.yaml. If specified for an OpenStackMachine, its + value will be included in providerID. + type: string + type: + default: Secret + description: Type specifies the identity reference + type. Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string + required: + - cloudName + - name + - type + type: object + x-kubernetes-validations: + - message: region is immutable + rule: (!has(self.region) && !has(oldSelf.region)) + || self.region == oldSelf.region + image: + description: |- + The image to use for your server instance. + If the rootVolume is specified, this will be used when creating the root volume. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + Filter describes a query for an image. If specified, the combination + of name and tags must return a single matching image or an error will + be raised. + minProperties: 1 + properties: + name: + description: The name of the desired image. + If specified, the combination of name and + tags must return a single matching image + or an error will be raised. + type: string + tags: + description: The tags associated with the + desired image. If specified, the combination + of name and tags must return a single matching + image or an error will be raised. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the image. ID will + not be validated before use. + format: uuid + type: string + imageRef: + description: |- + ImageRef is a reference to an ORC Image in the same namespace as the + referring object. + properties: + name: + description: Name is the name of the referenced + resource + type: string + required: + - name + type: object + type: object + ports: + description: |- + Ports to be attached to the server instance. They are created if a port with the given name does not already exist. + If not specified a default port will be added for the default cluster network. + items: + properties: + adminStateUp: + description: AdminStateUp specifies whether + the port should be created in the up (true) + or down (false) state. The default is up. + type: boolean + allowedAddressPairs: + description: |- + AllowedAddressPairs is a list of address pairs which Neutron will + allow the port to send traffic from in addition to the port's + addresses. If not specified, the MAC Address will be the MAC Address + of the port. Depending on the configuration of Neutron, it may be + supported to specify a CIDR instead of a specific IP address. + items: + properties: + ipAddress: + description: |- + IPAddress is the IP address of the allowed address pair. Depending on + the configuration of Neutron, it may be supported to specify a CIDR + instead of a specific IP address. + type: string + macAddress: + description: |- + MACAddress is the MAC address of the allowed address pair. If not + specified, the MAC address will be the MAC address of the port. + type: string + required: + - ipAddress + type: object + type: array + description: + description: Description is a human-readable + description for the port. + type: string + disablePortSecurity: + description: |- + DisablePortSecurity enables or disables the port security when set. + When not set, it takes the value of the corresponding field at the network level. + type: boolean + fixedIPs: + description: FixedIPs is a list of pairs of + subnet and/or IP address to assign to the + port. If specified, these must be subnets + of the port's network. + items: + properties: + ipAddress: + description: |- + IPAddress is a specific IP address to assign to the port. If Subnet + is also specified, IPAddress must be a valid IP address in the + subnet. If Subnet is not specified, IPAddress must be a valid IP + address in any subnet of the port's network. + type: string + subnet: + description: |- + Subnet is an openstack subnet query that will return the id of a subnet to create + the fixed IP of a port in. This query must not return more than one subnet. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter + to select the subnet. It must match + exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the + subnet. It will not be validated. + format: uuid + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic + hostID: + description: HostID specifies the ID of the + host where the port resides. + type: string + macAddress: + description: MACAddress specifies the MAC address + of the port. If not specified, the MAC address + will be generated. + type: string + nameSuffix: + description: NameSuffix will be appended to + the name of the port if specified. If unspecified, + instead the 0-based index of the port in the + list is used. + type: string + network: + description: |- + Network is a query for an openstack network that the port will be created or discovered on. + This will fail if the query returns more than one network. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to + select an OpenStack network. If provided, + cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network + to use. If ID is provided, the other filters + cannot be provided. Must be in UUID format. + format: uuid + type: string + type: object + profile: + description: |- + Profile is a set of key-value pairs that are used for binding + details. We intentionally don't expose this as a map[string]string + because we only want to enable the users to set the values of the + keys that are known to work in OpenStack Networking API. See + https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + To set profiles, your tenant needs permissions rule:create_port, and + rule:create_port:binding:profile + properties: + ovsHWOffload: + description: |- + OVSHWOffload enables or disables the OVS hardware offload feature. + This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + See: https://bugs.launchpad.net/nova/+bug/2020813 + type: boolean + trustedVF: + description: TrustedVF enables or disables + the “trusted mode” for the VF. + type: boolean + type: object + propagateUplinkStatus: + description: PropageteUplinkStatus enables or + disables the propagate uplink status on the + port. + type: boolean + securityGroups: + description: SecurityGroups is a list of the + names, uuids, filters or any combination these + of the security groups to assign to the instance. + items: + description: SecurityGroupParam specifies + an OpenStack security group. It may be specified + by ID or filter, but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query + to select an OpenStack security group. + If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security + group to use. If ID is provided, the + other filters cannot be provided. Must + be in UUID format. + format: uuid + type: string + type: object + type: array + x-kubernetes-list-type: atomic + tags: + description: |- + Tags applied to the port (and corresponding trunk, if a trunk is configured.) + These tags are applied in addition to the instance's tags, which will also be applied to the port. + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: |- + Trunk specifies whether trunking is enabled at the port level. If not + provided the value is inherited from the machine, or false for a + bastion host. + type: boolean + valueSpecs: + description: |- + Value specs are extra parameters to include in the API request with OpenStack. + This is an extension point for the API, so what they do and if they are supported, + depends on the specific OpenStack implementation. + items: + description: ValueSpec represents a single + value_spec key-value pair. + properties: + key: + description: Key is the key in the key-value + pair. + type: string + name: + description: |- + Name is the name of the key-value pair. + This is just for identifying the pair and will not be sent to the OpenStack API. + type: string + value: + description: Value is the value in the + key-value pair. + type: string + required: + - key + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + vnicType: + description: |- + VNICType specifies the type of vNIC which this port should be + attached to. This is used to determine which mechanism driver(s) to + be used to bind the port. The valid values are normal, macvtap, + direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + remote-managed, although these values will not be validated in this + API to ensure compatibility with future neutron changes or custom + implementations. What type of vNIC is actually available depends on + deployments. If not specified, the Neutron default value is used. + type: string + type: object + type: array + providerID: + description: ProviderID is the unique identifier as + specified by the cloud provider. + type: string + rootVolume: + description: The volume metadata to boot from + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from is 'Name' + or default + rule: '!has(self.from) || self.from == ''Name'' + ? has(self.name) : !has(self.name)' + sizeGiB: + description: SizeGiB is the size of the block + device in gibibytes (GiB). + minimum: 1 + type: integer + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + required: + - sizeGiB + type: object + schedulerHintAdditionalProperties: + description: |- + SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + such as specifying certain host aggregates or availability zones. + items: + description: |- + SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. + It includes a Name to identify the property and a Value that can be of various types. + properties: + name: + description: |- + Name is the name of the scheduler hint property. + It is a unique identifier for the property. + minLength: 1 + type: string + value: + description: |- + Value is the value of the scheduler hint property, which can be of various types + (e.g., bool, string, int). The type is indicated by the Value.Type field. + properties: + bool: + description: |- + Bool is the boolean value of the scheduler hint, used when Type is "Bool". + This field is required if type is 'Bool', and must not be set otherwise. + type: boolean + number: + description: |- + Number is the integer value of the scheduler hint, used when Type is "Number". + This field is required if type is 'Number', and must not be set otherwise. + type: integer + string: + description: |- + String is the string value of the scheduler hint, used when Type is "String". + This field is required if type is 'String', and must not be set otherwise. + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + Type represents the type of the value. + Valid values are Bool, String, and Number. + enum: + - Bool + - String + - Number + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: bool is required when type is Bool, + and forbidden otherwise + rule: 'has(self.type) && self.type == ''Bool'' + ? has(self.bool) : !has(self.bool)' + - message: number is required when type is Number, + and forbidden otherwise + rule: 'has(self.type) && self.type == ''Number'' + ? has(self.number) : !has(self.number)' + - message: string is required when type is String, + and forbidden otherwise + rule: 'has(self.type) && self.type == ''String'' + ? has(self.string) : !has(self.string)' + required: + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityGroups: + description: The names of the security groups to assign + to the instance + items: + description: SecurityGroupParam specifies an OpenStack + security group. It may be specified by ID or filter, + but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select + an OpenStack security group. If provided, + cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security group + to use. If ID is provided, the other filters + cannot be provided. Must be in UUID format. + format: uuid + type: string + type: object + type: array + serverGroup: + description: The server group to assign the machine + to. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select + an OpenStack server group. If provided, it cannot + be empty. + minProperties: 1 + properties: + name: + description: Name is the name of a server + group to look for. + type: string + type: object + id: + description: ID is the ID of the server group + to use. + format: uuid + type: string + type: object + serverMetadata: + description: Metadata mapping. Allows you to create + a map of key value pairs to add to the server instance. + items: + properties: + key: + description: Key is the server metadata key + maxLength: 255 + type: string + value: + description: Value is the server metadata value + maxLength: 255 + type: string + required: + - key + - value + type: object + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + sshKeyName: + description: The ssh key to inject in the instance + type: string + tags: + description: |- + Tags which will be added to the machine and all dependent resources + which support them. These are in addition to Tags defined on the + cluster. + Requires Nova api 2.52 minimum! + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: Whether the server instance is created + on a trunk port or not. + type: boolean + required: + - image + type: object + x-kubernetes-validations: + - message: at least one of flavor or flavorID must be + set + rule: (has(self.flavor) || has(self.flavorID)) + type: object + x-kubernetes-validations: + - message: spec is required if bastion is enabled + rule: '!self.enabled || has(self.spec)' + controlPlaneAvailabilityZones: + description: |- + ControlPlaneAvailabilityZones is the set of availability zones which + control plane machines may be deployed to. + items: + type: string + type: array + x-kubernetes-list-type: set + controlPlaneEndpoint: + description: |- + ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + It is normally populated automatically by the OpenStackCluster + controller during cluster provisioning. If it is set on creation the + control plane endpoint will use the values set here in preference to + values set elsewhere. + ControlPlaneEndpoint cannot be modified after ControlPlaneEndpoint.Host has been set. + 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 controlPlaneOmitAvailabilityZone: description: |- diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml index 71e24ac45..d2006a7a1 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml @@ -197,54 +197,57 @@ spec: type: string type: array conditions: - description: Conditions provide observations of the operational state - of a Cluster API resource. 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/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml index 0dc88ef8c..376b843b9 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml @@ -967,8 +967,11 @@ spec: type: object type: array conditions: - description: Conditions provide observations of the operational state - of a Cluster API resource. + description: |- + Conditions defines current service state of the OpenStackMachine. + This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + (both during initial provisioning and after the initial provisioning is completed). items: description: Condition defines an observation of a Cluster API resource operational state. @@ -1037,11 +1040,27 @@ spec: 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 will be removed in a future API version. + Use status.conditions to report failures. type: string failureReason: - description: DeprecatedCAPIMachineStatusError defines errors states - for Machine objects. + description: |- + FailureReason explains the reson behind a failure. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to report failures. type: string + initialization: + description: Initialization contains information about the initialization + status of the machine. + properties: + provisioned: + description: |- + Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object instanceID: description: InstanceID is the OpenStack instance ID for this machine. type: string @@ -1052,7 +1071,11 @@ spec: Instead, it's set by the OpenStackServer controller. type: string ready: - description: Ready is true when the provider resource is ready. + description: |- + Ready is true when the provider resource is ready. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to determine the ready state of the machine. type: boolean resolved: description: |- @@ -1262,6 +1285,1241 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster to which this OpenStackMachine belongs + jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name + name: Cluster + type: string + - description: OpenStack instance ID + jsonPath: .spec.providerID + name: ProviderID + type: string + - description: Machine object which owns with this OpenStackMachine + jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name + name: Machine + type: string + - description: Time duration since creation of OpenStackMachine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: OpenStackMachine is the Schema for the openstackmachines 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: OpenStackMachineSpec defines the desired state of OpenStackMachine. + properties: + additionalBlockDevices: + description: AdditionalBlockDevices is a list of specifications for + additional block devices to attach to the server instance + items: + description: AdditionalBlockDevice is a block device to attach to + the server. + properties: + name: + description: |- + Name of the block device in the context of a machine. + If the block device is a volume, the Cinder volume will be named + as a combination of the machine name and this name. + Also, this name will be used for tagging the block device. + Information about the block device tag can be obtained from the OpenStack + metadata API or the config drive. + Name cannot be 'root', which is reserved for the root volume. + type: string + sizeGiB: + description: SizeGiB is the size of the block device in gibibytes + (GiB). + minimum: 1 + type: integer + storage: + description: |- + Storage specifies the storage type of the block device and + additional storage options. + properties: + type: + description: |- + Type is the type of block device to create. + This can be either "Volume" or "Local". + type: string + volume: + description: Volume contains additional storage options + for a volume block device. + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from is 'Name' or default + rule: '!has(self.from) || self.from == ''Name'' ? + has(self.name) : !has(self.name)' + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + type: object + required: + - type + type: object + required: + - name + - sizeGiB + - storage + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + configDrive: + description: Config Drive support + type: boolean + flavor: + description: The flavor reference for the flavor for your server instance. + minLength: 1 + type: string + flavorID: + description: |- + FlavorID allows flavors to be specified by ID. This field takes precedence + over Flavor. + minLength: 1 + type: string + floatingIPPoolRef: + description: |- + floatingIPPoolRef is a reference to a IPPool that will be assigned + to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP + will be assigned to the OpenStackMachine. + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + identityRef: + description: |- + IdentityRef is a reference to a secret holding OpenStack credentials + to be used when reconciling this machine. If not specified, the + credentials specified in the cluster will be used. + properties: + cloudName: + description: CloudName specifies the name of the entry in the + clouds.yaml file to use. + minLength: 1 + type: string + name: + description: |- + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 + type: string + region: + description: |- + Region specifies an OpenStack region to use. If specified, it overrides + any value in clouds.yaml. If specified for an OpenStackMachine, its + value will be included in providerID. + type: string + type: + default: Secret + description: Type specifies the identity reference type. Defaults + to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string + required: + - cloudName + - name + - type + type: object + x-kubernetes-validations: + - message: region is immutable + rule: (!has(self.region) && !has(oldSelf.region)) || self.region + == oldSelf.region + image: + description: |- + The image to use for your server instance. + If the rootVolume is specified, this will be used when creating the root volume. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + Filter describes a query for an image. If specified, the combination + of name and tags must return a single matching image or an error will + be raised. + minProperties: 1 + properties: + name: + description: The name of the desired image. If specified, + the combination of name and tags must return a single matching + image or an error will be raised. + type: string + tags: + description: The tags associated with the desired image. If + specified, the combination of name and tags must return + a single matching image or an error will be raised. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the image. ID will not be validated + before use. + format: uuid + type: string + imageRef: + description: |- + ImageRef is a reference to an ORC Image in the same namespace as the + referring object. + properties: + name: + description: Name is the name of the referenced resource + type: string + required: + - name + type: object + type: object + ports: + description: |- + Ports to be attached to the server instance. They are created if a port with the given name does not already exist. + If not specified a default port will be added for the default cluster network. + items: + properties: + adminStateUp: + description: AdminStateUp specifies whether the port should + be created in the up (true) or down (false) state. The default + is up. + type: boolean + allowedAddressPairs: + description: |- + AllowedAddressPairs is a list of address pairs which Neutron will + allow the port to send traffic from in addition to the port's + addresses. If not specified, the MAC Address will be the MAC Address + of the port. Depending on the configuration of Neutron, it may be + supported to specify a CIDR instead of a specific IP address. + items: + properties: + ipAddress: + description: |- + IPAddress is the IP address of the allowed address pair. Depending on + the configuration of Neutron, it may be supported to specify a CIDR + instead of a specific IP address. + type: string + macAddress: + description: |- + MACAddress is the MAC address of the allowed address pair. If not + specified, the MAC address will be the MAC address of the port. + type: string + required: + - ipAddress + type: object + type: array + description: + description: Description is a human-readable description for + the port. + type: string + disablePortSecurity: + description: |- + DisablePortSecurity enables or disables the port security when set. + When not set, it takes the value of the corresponding field at the network level. + type: boolean + fixedIPs: + description: FixedIPs is a list of pairs of subnet and/or IP + address to assign to the port. If specified, these must be + subnets of the port's network. + items: + properties: + ipAddress: + description: |- + IPAddress is a specific IP address to assign to the port. If Subnet + is also specified, IPAddress must be a valid IP address in the + subnet. If Subnet is not specified, IPAddress must be a valid IP + address in any subnet of the port's network. + type: string + subnet: + description: |- + Subnet is an openstack subnet query that will return the id of a subnet to create + the fixed IP of a port in. This query must not return more than one subnet. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select the + subnet. It must match exactly one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. It will + not be validated. + format: uuid + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic + hostID: + description: HostID specifies the ID of the host where the port + resides. + type: string + macAddress: + description: MACAddress specifies the MAC address of the port. + If not specified, the MAC address will be generated. + type: string + nameSuffix: + description: NameSuffix will be appended to the name of the + port if specified. If unspecified, instead the 0-based index + of the port in the list is used. + type: string + network: + description: |- + Network is a query for an openstack network that the port will be created or discovered on. + This will fail if the query returns more than one network. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select an OpenStack + network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. If ID is + provided, the other filters cannot be provided. Must be + in UUID format. + format: uuid + type: string + type: object + profile: + description: |- + Profile is a set of key-value pairs that are used for binding + details. We intentionally don't expose this as a map[string]string + because we only want to enable the users to set the values of the + keys that are known to work in OpenStack Networking API. See + https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + To set profiles, your tenant needs permissions rule:create_port, and + rule:create_port:binding:profile + properties: + ovsHWOffload: + description: |- + OVSHWOffload enables or disables the OVS hardware offload feature. + This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + See: https://bugs.launchpad.net/nova/+bug/2020813 + type: boolean + trustedVF: + description: TrustedVF enables or disables the “trusted + mode” for the VF. + type: boolean + type: object + propagateUplinkStatus: + description: PropageteUplinkStatus enables or disables the propagate + uplink status on the port. + type: boolean + securityGroups: + description: SecurityGroups is a list of the names, uuids, filters + or any combination these of the security groups to assign + to the instance. + items: + description: SecurityGroupParam specifies an OpenStack security + group. It may be specified by ID or filter, but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select an OpenStack + security group. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security group to use. + If ID is provided, the other filters cannot be provided. + Must be in UUID format. + format: uuid + type: string + type: object + type: array + x-kubernetes-list-type: atomic + tags: + description: |- + Tags applied to the port (and corresponding trunk, if a trunk is configured.) + These tags are applied in addition to the instance's tags, which will also be applied to the port. + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: |- + Trunk specifies whether trunking is enabled at the port level. If not + provided the value is inherited from the machine, or false for a + bastion host. + type: boolean + valueSpecs: + description: |- + Value specs are extra parameters to include in the API request with OpenStack. + This is an extension point for the API, so what they do and if they are supported, + depends on the specific OpenStack implementation. + items: + description: ValueSpec represents a single value_spec key-value + pair. + properties: + key: + description: Key is the key in the key-value pair. + type: string + name: + description: |- + Name is the name of the key-value pair. + This is just for identifying the pair and will not be sent to the OpenStack API. + type: string + value: + description: Value is the value in the key-value pair. + type: string + required: + - key + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + vnicType: + description: |- + VNICType specifies the type of vNIC which this port should be + attached to. This is used to determine which mechanism driver(s) to + be used to bind the port. The valid values are normal, macvtap, + direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + remote-managed, although these values will not be validated in this + API to ensure compatibility with future neutron changes or custom + implementations. What type of vNIC is actually available depends on + deployments. If not specified, the Neutron default value is used. + type: string + type: object + type: array + providerID: + description: ProviderID is the unique identifier as specified by the + cloud provider. + type: string + rootVolume: + description: The volume metadata to boot from + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from is 'Name' or default + rule: '!has(self.from) || self.from == ''Name'' ? has(self.name) + : !has(self.name)' + sizeGiB: + description: SizeGiB is the size of the block device in gibibytes + (GiB). + minimum: 1 + type: integer + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + required: + - sizeGiB + type: object + schedulerHintAdditionalProperties: + description: |- + SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + such as specifying certain host aggregates or availability zones. + items: + description: |- + SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. + It includes a Name to identify the property and a Value that can be of various types. + properties: + name: + description: |- + Name is the name of the scheduler hint property. + It is a unique identifier for the property. + minLength: 1 + type: string + value: + description: |- + Value is the value of the scheduler hint property, which can be of various types + (e.g., bool, string, int). The type is indicated by the Value.Type field. + properties: + bool: + description: |- + Bool is the boolean value of the scheduler hint, used when Type is "Bool". + This field is required if type is 'Bool', and must not be set otherwise. + type: boolean + number: + description: |- + Number is the integer value of the scheduler hint, used when Type is "Number". + This field is required if type is 'Number', and must not be set otherwise. + type: integer + string: + description: |- + String is the string value of the scheduler hint, used when Type is "String". + This field is required if type is 'String', and must not be set otherwise. + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + Type represents the type of the value. + Valid values are Bool, String, and Number. + enum: + - Bool + - String + - Number + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: bool is required when type is Bool, and forbidden + otherwise + rule: 'has(self.type) && self.type == ''Bool'' ? has(self.bool) + : !has(self.bool)' + - message: number is required when type is Number, and forbidden + otherwise + rule: 'has(self.type) && self.type == ''Number'' ? has(self.number) + : !has(self.number)' + - message: string is required when type is String, and forbidden + otherwise + rule: 'has(self.type) && self.type == ''String'' ? has(self.string) + : !has(self.string)' + required: + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityGroups: + description: The names of the security groups to assign to the instance + items: + description: SecurityGroupParam specifies an OpenStack security + group. It may be specified by ID or filter, but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select an OpenStack + security group. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security group to use. If ID + is provided, the other filters cannot be provided. Must be + in UUID format. + format: uuid + type: string + type: object + type: array + serverGroup: + description: The server group to assign the machine to. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select an OpenStack server + group. If provided, it cannot be empty. + minProperties: 1 + properties: + name: + description: Name is the name of a server group to look for. + type: string + type: object + id: + description: ID is the ID of the server group to use. + format: uuid + type: string + type: object + serverMetadata: + description: Metadata mapping. Allows you to create a map of key value + pairs to add to the server instance. + items: + properties: + key: + description: Key is the server metadata key + maxLength: 255 + type: string + value: + description: Value is the server metadata value + maxLength: 255 + type: string + required: + - key + - value + type: object + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + sshKeyName: + description: The ssh key to inject in the instance + type: string + tags: + description: |- + Tags which will be added to the machine and all dependent resources + which support them. These are in addition to Tags defined on the + cluster. + Requires Nova api 2.52 minimum! + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: Whether the server instance is created on a trunk port + or not. + type: boolean + required: + - image + type: object + x-kubernetes-validations: + - message: at least one of flavor or flavorID must be set + rule: (has(self.flavor) || has(self.flavorID)) + status: + description: OpenStackMachineStatus defines the observed state of OpenStackMachine. + properties: + addresses: + description: Addresses contains the OpenStack instance associated + addresses. + items: + description: NodeAddress contains information for the node's address. + properties: + address: + description: The node address. + type: string + type: + description: Node address type, one of Hostname, ExternalIP + or InternalIP. + type: string + required: + - address + - type + type: object + type: array + conditions: + description: |- + Conditions defines current service state of the OpenStackMachine. + This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + (both during initial provisioning and after the initial provisioning is completed). + 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 + type: array + initialization: + description: Initialization contains information about the initialization + status of the machine. + properties: + provisioned: + description: |- + Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object + instanceID: + description: InstanceID is the OpenStack instance ID for this machine. + type: string + instanceState: + description: |- + InstanceState is the state of the OpenStack instance for this machine. + This field is not set anymore by the OpenStackMachine controller. + Instead, it's set by the OpenStackServer controller. + type: string + resolved: + description: |- + Resolved contains parts of the machine spec with all external + references fully resolved. + properties: + flavorID: + description: FlavorID is the ID of the flavor to use. + type: string + imageID: + description: ImageID is the ID of the image to use for the machine + and is calculated based on ImageFilter. + type: string + ports: + description: Ports is the fully resolved list of ports to create + for the machine. + items: + description: ResolvedPortSpec is a PortOpts with all contained + references fully resolved. + properties: + adminStateUp: + description: AdminStateUp specifies whether the port should + be created in the up (true) or down (false) state. The + default is up. + type: boolean + allowedAddressPairs: + description: |- + AllowedAddressPairs is a list of address pairs which Neutron will + allow the port to send traffic from in addition to the port's + addresses. If not specified, the MAC Address will be the MAC Address + of the port. Depending on the configuration of Neutron, it may be + supported to specify a CIDR instead of a specific IP address. + items: + properties: + ipAddress: + description: |- + IPAddress is the IP address of the allowed address pair. Depending on + the configuration of Neutron, it may be supported to specify a CIDR + instead of a specific IP address. + type: string + macAddress: + description: |- + MACAddress is the MAC address of the allowed address pair. If not + specified, the MAC address will be the MAC address of the port. + type: string + required: + - ipAddress + type: object + type: array + description: + description: Description is a human-readable description + for the port. + type: string + disablePortSecurity: + description: |- + DisablePortSecurity enables or disables the port security when set. + When not set, it takes the value of the corresponding field at the network level. + type: boolean + fixedIPs: + description: FixedIPs is a list of pairs of subnet and/or + IP address to assign to the port. If specified, these + must be subnets of the port's network. + items: + description: ResolvedFixedIP is a FixedIP with the Subnet + resolved to an ID. + properties: + ipAddress: + description: |- + IPAddress is a specific IP address to assign to the port. If SubnetID + is also specified, IPAddress must be a valid IP address in the + subnet. If Subnet is not specified, IPAddress must be a valid IP + address in any subnet of the port's network. + type: string + subnet: + description: SubnetID is the id of a subnet to create + the fixed IP of a port in. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + hostID: + description: HostID specifies the ID of the host where the + port resides. + type: string + macAddress: + description: MACAddress specifies the MAC address of the + port. If not specified, the MAC address will be generated. + type: string + name: + description: Name is the name of the port. + type: string + networkID: + description: NetworkID is the ID of the network the port + will be created in. + type: string + profile: + description: |- + Profile is a set of key-value pairs that are used for binding + details. We intentionally don't expose this as a map[string]string + because we only want to enable the users to set the values of the + keys that are known to work in OpenStack Networking API. See + https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + To set profiles, your tenant needs permissions rule:create_port, and + rule:create_port:binding:profile + properties: + ovsHWOffload: + description: |- + OVSHWOffload enables or disables the OVS hardware offload feature. + This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + See: https://bugs.launchpad.net/nova/+bug/2020813 + type: boolean + trustedVF: + description: TrustedVF enables or disables the “trusted + mode” for the VF. + type: boolean + type: object + propagateUplinkStatus: + description: PropageteUplinkStatus enables or disables the + propagate uplink status on the port. + type: boolean + securityGroups: + description: SecurityGroups is a list of security group + IDs to assign to the port. + items: + type: string + type: array + x-kubernetes-list-type: atomic + tags: + description: Tags applied to the port (and corresponding + trunk, if a trunk is configured.) + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: Trunk specifies whether trunking is enabled + at the port level. + type: boolean + valueSpecs: + description: |- + Value specs are extra parameters to include in the API request with OpenStack. + This is an extension point for the API, so what they do and if they are supported, + depends on the specific OpenStack implementation. + items: + description: ValueSpec represents a single value_spec + key-value pair. + properties: + key: + description: Key is the key in the key-value pair. + type: string + name: + description: |- + Name is the name of the key-value pair. + This is just for identifying the pair and will not be sent to the OpenStack API. + type: string + value: + description: Value is the value in the key-value pair. + type: string + required: + - key + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + vnicType: + description: |- + VNICType specifies the type of vNIC which this port should be + attached to. This is used to determine which mechanism driver(s) to + be used to bind the port. The valid values are normal, macvtap, + direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + remote-managed, although these values will not be validated in this + API to ensure compatibility with future neutron changes or custom + implementations. What type of vNIC is actually available depends on + deployments. If not specified, the Neutron default value is used. + type: string + required: + - description + - name + - networkID + type: object + type: array + serverGroupID: + description: ServerGroupID is the ID of the server group the machine + should be added to and is calculated based on ServerGroupFilter. + type: string + type: object + resources: + description: Resources contains references to OpenStack resources + created for the machine. + properties: + ports: + description: Ports is the status of the ports created for the + machine. + items: + properties: + id: + description: ID is the unique identifier of the port. + type: string + required: + - id + type: object + type: array + type: object + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml index e57463f1c..9dd38f3d4 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml @@ -950,6 +950,1116 @@ spec: required: - template type: object + status: + description: OpenStackMachineTemplateStatus defines the observed state + of OpenStackMachineTemplate. + properties: + capacity: + 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: |- + Capacity defines the resource capacity for this machine. + This value is used for autoscaling from zero operations as defined in: + https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + type: object + conditions: + description: |- + Conditions defines current service state of the OpenStackMachineTemplate. + The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. + (both during initial provisioning and after the initial provisioning is completed). + 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 + nodeInfo: + description: NodeInfo contains information about the node's architecture + and operating system. + minProperties: 1 + properties: + operatingSystem: + description: |- + operatingSystem is a string representing the operating system of the node. + This may be a string like 'linux' or 'windows'. + type: string + type: object + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1beta2 + schema: + openAPIV3Schema: + description: OpenStackMachineTemplate is the Schema for the openstackmachinetemplates + 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: OpenStackMachineTemplateSpec defines the desired state of + OpenStackMachineTemplate. + properties: + template: + description: OpenStackMachineTemplateResource describes the data needed + to create a OpenStackMachine from a template. + properties: + spec: + description: Spec is the specification of the desired behavior + of the machine. + properties: + additionalBlockDevices: + description: AdditionalBlockDevices is a list of specifications + for additional block devices to attach to the server instance + items: + description: AdditionalBlockDevice is a block device to + attach to the server. + properties: + name: + description: |- + Name of the block device in the context of a machine. + If the block device is a volume, the Cinder volume will be named + as a combination of the machine name and this name. + Also, this name will be used for tagging the block device. + Information about the block device tag can be obtained from the OpenStack + metadata API or the config drive. + Name cannot be 'root', which is reserved for the root volume. + type: string + sizeGiB: + description: SizeGiB is the size of the block device + in gibibytes (GiB). + minimum: 1 + type: integer + storage: + description: |- + Storage specifies the storage type of the block device and + additional storage options. + properties: + type: + description: |- + Type is the type of block device to create. + This can be either "Volume" or "Local". + type: string + volume: + description: Volume contains additional storage + options for a volume block device. + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from is 'Name' + or default + rule: '!has(self.from) || self.from == ''Name'' + ? has(self.name) : !has(self.name)' + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + type: object + required: + - type + type: object + required: + - name + - sizeGiB + - storage + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + configDrive: + description: Config Drive support + type: boolean + flavor: + description: The flavor reference for the flavor for your + server instance. + minLength: 1 + type: string + flavorID: + description: |- + FlavorID allows flavors to be specified by ID. This field takes precedence + over Flavor. + minLength: 1 + type: string + floatingIPPoolRef: + description: |- + floatingIPPoolRef is a reference to a IPPool that will be assigned + to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP + will be assigned to the OpenStackMachine. + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + identityRef: + description: |- + IdentityRef is a reference to a secret holding OpenStack credentials + to be used when reconciling this machine. If not specified, the + credentials specified in the cluster will be used. + properties: + cloudName: + description: CloudName specifies the name of the entry + in the clouds.yaml file to use. + minLength: 1 + type: string + name: + description: |- + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 + type: string + region: + description: |- + Region specifies an OpenStack region to use. If specified, it overrides + any value in clouds.yaml. If specified for an OpenStackMachine, its + value will be included in providerID. + type: string + type: + default: Secret + description: Type specifies the identity reference type. + Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string + required: + - cloudName + - name + - type + type: object + x-kubernetes-validations: + - message: region is immutable + rule: (!has(self.region) && !has(oldSelf.region)) || self.region + == oldSelf.region + image: + description: |- + The image to use for your server instance. + If the rootVolume is specified, this will be used when creating the root volume. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + Filter describes a query for an image. If specified, the combination + of name and tags must return a single matching image or an error will + be raised. + minProperties: 1 + properties: + name: + description: The name of the desired image. If specified, + the combination of name and tags must return a single + matching image or an error will be raised. + type: string + tags: + description: The tags associated with the desired + image. If specified, the combination of name and + tags must return a single matching image or an error + will be raised. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the image. ID will not + be validated before use. + format: uuid + type: string + imageRef: + description: |- + ImageRef is a reference to an ORC Image in the same namespace as the + referring object. + properties: + name: + description: Name is the name of the referenced resource + type: string + required: + - name + type: object + type: object + ports: + description: |- + Ports to be attached to the server instance. They are created if a port with the given name does not already exist. + If not specified a default port will be added for the default cluster network. + items: + properties: + adminStateUp: + description: AdminStateUp specifies whether the port + should be created in the up (true) or down (false) + state. The default is up. + type: boolean + allowedAddressPairs: + description: |- + AllowedAddressPairs is a list of address pairs which Neutron will + allow the port to send traffic from in addition to the port's + addresses. If not specified, the MAC Address will be the MAC Address + of the port. Depending on the configuration of Neutron, it may be + supported to specify a CIDR instead of a specific IP address. + items: + properties: + ipAddress: + description: |- + IPAddress is the IP address of the allowed address pair. Depending on + the configuration of Neutron, it may be supported to specify a CIDR + instead of a specific IP address. + type: string + macAddress: + description: |- + MACAddress is the MAC address of the allowed address pair. If not + specified, the MAC address will be the MAC address of the port. + type: string + required: + - ipAddress + type: object + type: array + description: + description: Description is a human-readable description + for the port. + type: string + disablePortSecurity: + description: |- + DisablePortSecurity enables or disables the port security when set. + When not set, it takes the value of the corresponding field at the network level. + type: boolean + fixedIPs: + description: FixedIPs is a list of pairs of subnet and/or + IP address to assign to the port. If specified, these + must be subnets of the port's network. + items: + properties: + ipAddress: + description: |- + IPAddress is a specific IP address to assign to the port. If Subnet + is also specified, IPAddress must be a valid IP address in the + subnet. If Subnet is not specified, IPAddress must be a valid IP + address in any subnet of the port's network. + type: string + subnet: + description: |- + Subnet is an openstack subnet query that will return the id of a subnet to create + the fixed IP of a port in. This query must not return more than one subnet. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to + select the subnet. It must match exactly + one subnet. + minProperties: 1 + properties: + cidr: + type: string + description: + type: string + gatewayIP: + type: string + ipVersion: + type: integer + ipv6AddressMode: + type: string + ipv6RAMode: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the uuid of the subnet. + It will not be validated. + format: uuid + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic + hostID: + description: HostID specifies the ID of the host where + the port resides. + type: string + macAddress: + description: MACAddress specifies the MAC address of + the port. If not specified, the MAC address will be + generated. + type: string + nameSuffix: + description: NameSuffix will be appended to the name + of the port if specified. If unspecified, instead + the 0-based index of the port in the list is used. + type: string + network: + description: |- + Network is a query for an openstack network that the port will be created or discovered on. + This will fail if the query returns more than one network. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a filter to select + an OpenStack network. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the network to use. + If ID is provided, the other filters cannot be + provided. Must be in UUID format. + format: uuid + type: string + type: object + profile: + description: |- + Profile is a set of key-value pairs that are used for binding + details. We intentionally don't expose this as a map[string]string + because we only want to enable the users to set the values of the + keys that are known to work in OpenStack Networking API. See + https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + To set profiles, your tenant needs permissions rule:create_port, and + rule:create_port:binding:profile + properties: + ovsHWOffload: + description: |- + OVSHWOffload enables or disables the OVS hardware offload feature. + This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + See: https://bugs.launchpad.net/nova/+bug/2020813 + type: boolean + trustedVF: + description: TrustedVF enables or disables the “trusted + mode” for the VF. + type: boolean + type: object + propagateUplinkStatus: + description: PropageteUplinkStatus enables or disables + the propagate uplink status on the port. + type: boolean + securityGroups: + description: SecurityGroups is a list of the names, + uuids, filters or any combination these of the security + groups to assign to the instance. + items: + description: SecurityGroupParam specifies an OpenStack + security group. It may be specified by ID or filter, + but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select + an OpenStack security group. If provided, cannot + be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security group + to use. If ID is provided, the other filters + cannot be provided. Must be in UUID format. + format: uuid + type: string + type: object + type: array + x-kubernetes-list-type: atomic + tags: + description: |- + Tags applied to the port (and corresponding trunk, if a trunk is configured.) + These tags are applied in addition to the instance's tags, which will also be applied to the port. + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: |- + Trunk specifies whether trunking is enabled at the port level. If not + provided the value is inherited from the machine, or false for a + bastion host. + type: boolean + valueSpecs: + description: |- + Value specs are extra parameters to include in the API request with OpenStack. + This is an extension point for the API, so what they do and if they are supported, + depends on the specific OpenStack implementation. + items: + description: ValueSpec represents a single value_spec + key-value pair. + properties: + key: + description: Key is the key in the key-value pair. + type: string + name: + description: |- + Name is the name of the key-value pair. + This is just for identifying the pair and will not be sent to the OpenStack API. + type: string + value: + description: Value is the value in the key-value + pair. + type: string + required: + - key + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + vnicType: + description: |- + VNICType specifies the type of vNIC which this port should be + attached to. This is used to determine which mechanism driver(s) to + be used to bind the port. The valid values are normal, macvtap, + direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + remote-managed, although these values will not be validated in this + API to ensure compatibility with future neutron changes or custom + implementations. What type of vNIC is actually available depends on + deployments. If not specified, the Neutron default value is used. + type: string + type: object + type: array + providerID: + description: ProviderID is the unique identifier as specified + by the cloud provider. + type: string + rootVolume: + description: The volume metadata to boot from + properties: + availabilityZone: + description: |- + AvailabilityZone is the volume availability zone to create the volume + in. If not specified, the volume will be created without an explicit + availability zone. + properties: + from: + default: Name + description: |- + From specifies where we will obtain the availability zone for the + volume. The options are "Name" and "Machine". If "Name" is specified + then the Name field must also be specified. If "Machine" is specified + the volume will use the value of FailureDomain, if any, from the + associated Machine. + enum: + - Name + - Machine + type: string + name: + description: |- + Name is the name of a volume availability zone to use. It is required + if From is "Name". The volume availability zone name may not contain + spaces. + minLength: 1 + pattern: ^[^ ]+$ + type: string + type: object + x-kubernetes-validations: + - message: name is required when from is 'Name' or default + rule: '!has(self.from) || self.from == ''Name'' ? has(self.name) + : !has(self.name)' + sizeGiB: + description: SizeGiB is the size of the block device in + gibibytes (GiB). + minimum: 1 + type: integer + type: + description: |- + Type is the Cinder volume type of the volume. + If omitted, the default Cinder volume type that is configured in the OpenStack cloud + will be used. + type: string + required: + - sizeGiB + type: object + schedulerHintAdditionalProperties: + description: |- + SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + such as specifying certain host aggregates or availability zones. + items: + description: |- + SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. + It includes a Name to identify the property and a Value that can be of various types. + properties: + name: + description: |- + Name is the name of the scheduler hint property. + It is a unique identifier for the property. + minLength: 1 + type: string + value: + description: |- + Value is the value of the scheduler hint property, which can be of various types + (e.g., bool, string, int). The type is indicated by the Value.Type field. + properties: + bool: + description: |- + Bool is the boolean value of the scheduler hint, used when Type is "Bool". + This field is required if type is 'Bool', and must not be set otherwise. + type: boolean + number: + description: |- + Number is the integer value of the scheduler hint, used when Type is "Number". + This field is required if type is 'Number', and must not be set otherwise. + type: integer + string: + description: |- + String is the string value of the scheduler hint, used when Type is "String". + This field is required if type is 'String', and must not be set otherwise. + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + Type represents the type of the value. + Valid values are Bool, String, and Number. + enum: + - Bool + - String + - Number + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: bool is required when type is Bool, and forbidden + otherwise + rule: 'has(self.type) && self.type == ''Bool'' ? has(self.bool) + : !has(self.bool)' + - message: number is required when type is Number, and + forbidden otherwise + rule: 'has(self.type) && self.type == ''Number'' ? + has(self.number) : !has(self.number)' + - message: string is required when type is String, and + forbidden otherwise + rule: 'has(self.type) && self.type == ''String'' ? + has(self.string) : !has(self.string)' + required: + - name + - value + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityGroups: + description: The names of the security groups to assign to + the instance + items: + description: SecurityGroupParam specifies an OpenStack security + group. It may be specified by ID or filter, but not both. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select an OpenStack + security group. If provided, cannot be empty. + minProperties: 1 + properties: + description: + type: string + name: + type: string + notTags: + description: |- + NotTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + NotTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + projectID: + type: string + tags: + description: |- + Tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + TagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + minLength: 1 + pattern: ^[^,]+$ + type: string + type: array + x-kubernetes-list-type: set + type: object + id: + description: ID is the ID of the security group to use. + If ID is provided, the other filters cannot be provided. + Must be in UUID format. + format: uuid + type: string + type: object + type: array + serverGroup: + description: The server group to assign the machine to. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: Filter specifies a query to select an OpenStack + server group. If provided, it cannot be empty. + minProperties: 1 + properties: + name: + description: Name is the name of a server group to + look for. + type: string + type: object + id: + description: ID is the ID of the server group to use. + format: uuid + type: string + type: object + serverMetadata: + description: Metadata mapping. Allows you to create a map + of key value pairs to add to the server instance. + items: + properties: + key: + description: Key is the server metadata key + maxLength: 255 + type: string + value: + description: Value is the server metadata value + maxLength: 255 + type: string + required: + - key + - value + type: object + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + sshKeyName: + description: The ssh key to inject in the instance + type: string + tags: + description: |- + Tags which will be added to the machine and all dependent resources + which support them. These are in addition to Tags defined on the + cluster. + Requires Nova api 2.52 minimum! + items: + type: string + type: array + x-kubernetes-list-type: set + trunk: + description: Whether the server instance is created on a trunk + port or not. + type: boolean + required: + - image + type: object + x-kubernetes-validations: + - message: at least one of flavor or flavorID must be set + rule: (has(self.flavor) || has(self.flavorID)) + required: + - spec + type: object + required: + - template + type: object + status: + description: OpenStackMachineTemplateStatus defines the observed state + of OpenStackMachineTemplate. + properties: + capacity: + 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: |- + Capacity defines the resource capacity for this machine. + This value is used for autoscaling from zero operations as defined in: + https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + type: object + conditions: + description: |- + Conditions defines current service state of the OpenStackMachineTemplate. + The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. + (both during initial provisioning and after the initial provisioning is completed). + 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 + type: array + nodeInfo: + description: NodeInfo contains information about the node's architecture + and operating system. + minProperties: 1 + properties: + operatingSystem: + description: |- + operatingSystem is a string representing the operating system of the node. + This may be a string like 'linux' or 'windows'. + type: string + type: object + type: object type: object served: true storage: true + subresources: + status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml index 31de37e0a..c85041c29 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml @@ -980,51 +980,56 @@ spec: conditions: description: Conditions defines current service state of the OpenStackServer. 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/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 24258bb53..88ad340f9 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,6 +2,7 @@ labels: - pairs: # Mapping from CAPI contract to CAPO API versions. cluster.x-k8s.io/v1beta1: v1beta1 + cluster.x-k8s.io/v1beta2: v1beta2 # This kustomization.yaml is not intended to be run by itself, # since it depends on service name and namespace that are out of this kustomize package. diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 720fff6c0..ff5280841 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -21,134 +21,138 @@ patches: - path: manager_webhook_patch.yaml replacements: - - source: # Add cert-manager annotation to ValidatingWebhookConfiguration, MutatingWebhookConfiguration and CRDs +- source: + # Add cert-manager annotation to ValidatingWebhookConfiguration, MutatingWebhookConfiguration and CRDs + kind: Certificate + group: cert-manager.io + version: v1 + name: serving-cert # this name should match the one in certificate.yaml + fieldPath: .metadata.namespace # namespace of the certificate CR + targets: + - select: + kind: ValidatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 0 + create: true + - select: + kind: MutatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 0 + create: true + - select: + kind: CustomResourceDefinition + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 0 + create: true +- source: + kind: Certificate + group: cert-manager.io + version: v1 + name: serving-cert # this name should match the one in certificate.yaml + fieldPath: .metadata.name + targets: + - select: + kind: ValidatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 1 + create: true + - select: + kind: MutatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 1 + create: true + - select: + kind: CustomResourceDefinition + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 1 + create: true +- source: + # Add cert-manager annotation to the webhook Service + kind: Service + version: v1 + name: webhook-service + fieldPath: .metadata.name # namespace of the service + targets: + - select: kind: Certificate group: cert-manager.io version: v1 - name: serving-cert # this name should match the one in certificate.yaml - fieldPath: .metadata.namespace # namespace of the certificate CR - targets: - - select: - kind: ValidatingWebhookConfiguration - fieldPaths: - - .metadata.annotations.[cert-manager.io/inject-ca-from] - options: - delimiter: '/' - index: 0 - create: true - - select: - kind: MutatingWebhookConfiguration - fieldPaths: - - .metadata.annotations.[cert-manager.io/inject-ca-from] - options: - delimiter: '/' - index: 0 - create: true - - select: - kind: CustomResourceDefinition - fieldPaths: - - .metadata.annotations.[cert-manager.io/inject-ca-from] - options: - delimiter: '/' - index: 0 - create: true - - source: + name: serving-cert + fieldPaths: + - .spec.dnsNames.0 + - .spec.dnsNames.1 + options: + delimiter: '.' + index: 0 + create: false +- source: + kind: Service + version: v1 + name: webhook-service + fieldPath: .metadata.namespace # namespace of the service + targets: + - select: kind: Certificate group: cert-manager.io version: v1 - name: serving-cert # this name should match the one in certificate.yaml - fieldPath: .metadata.name - targets: - - select: - kind: ValidatingWebhookConfiguration - fieldPaths: - - .metadata.annotations.[cert-manager.io/inject-ca-from] - options: - delimiter: '/' - index: 1 - create: true - - select: - kind: MutatingWebhookConfiguration - fieldPaths: - - .metadata.annotations.[cert-manager.io/inject-ca-from] - options: - delimiter: '/' - index: 1 - create: true - - select: - kind: CustomResourceDefinition - fieldPaths: - - .metadata.annotations.[cert-manager.io/inject-ca-from] - options: - delimiter: '/' - index: 1 - create: true - - source: # Add cert-manager annotation to the webhook Service - kind: Service - version: v1 - name: webhook-service - fieldPath: .metadata.name # namespace of the service - targets: - - select: - kind: Certificate - group: cert-manager.io - version: v1 - name: serving-cert - fieldPaths: - - .spec.dnsNames.0 - - .spec.dnsNames.1 - options: - delimiter: '.' - index: 0 - create: false - - source: - kind: Service - version: v1 - name: webhook-service - fieldPath: .metadata.namespace # namespace of the service - targets: - - select: - kind: Certificate - group: cert-manager.io - version: v1 - name: serving-cert - fieldPaths: - - .spec.dnsNames.0 - - .spec.dnsNames.1 - options: - delimiter: '.' - index: 1 - create: false - - source: # Prefix the certificate secret name with the name of service - kind: Service - version: v1 - name: webhook-service - fieldPath: .metadata.name # namespace of the service - targets: - - select: - kind: Certificate - group: cert-manager.io - version: v1 - fieldPaths: - - .spec.secretName - options: - delimiter: '-' - index: 0 - create: false - - source: # Certificate secret name + name: serving-cert + fieldPaths: + - .spec.dnsNames.0 + - .spec.dnsNames.1 + options: + delimiter: '.' + index: 1 + create: false +- source: + # Prefix the certificate secret name with the name of service + kind: Service + version: v1 + name: webhook-service + fieldPath: .metadata.name # namespace of the service + targets: + - select: kind: Certificate group: cert-manager.io version: v1 - name: serving-cert - fieldPath: .spec.secretName - targets: - - select: - kind: Deployment - group: apps - version: v1 - name: controller-manager - fieldPaths: - - .spec.template.spec.volumes.[name=cert].secret.secretName + fieldPaths: + - .spec.secretName + options: + delimiter: '-' + index: 0 + create: false +- source: + # Certificate secret name + kind: Certificate + group: cert-manager.io + version: v1 + name: serving-cert + fieldPath: .spec.secretName + targets: + - select: + kind: Deployment + group: apps + version: v1 + name: controller-manager + fieldPaths: + - .spec.template.spec.volumes.[name=cert].secret.secretName configurations: - - kustomizeconfig.yaml +- kustomizeconfig.yaml diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 4aab6e0d3..98d1a5f88 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -17,37 +17,38 @@ spec: control-plane: capo-controller-manager spec: containers: - - command: - - /manager - args: - - "--leader-elect" - - "--v=2" - - "--diagnostics-address=127.0.0.1:8080" - - "--insecure-diagnostics=true" - image: controller:latest - imagePullPolicy: Always - name: manager - ports: - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - livenessProbe: - httpGet: - path: /healthz - port: healthz - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - privileged: false - runAsUser: 65532 - runAsGroup: 65532 - terminationMessagePolicy: FallbackToLogsOnError + - command: + - /manager + args: + - "--leader-elect" + - "--v=2" + - "--diagnostics-address=127.0.0.1:8080" + - "--insecure-diagnostics=true" + - "--feature-gates=PriorityQueue=${EXP_CAPO_PRIORITY_QUEUE:=false},AutoScaleFromZero=${EXP_CAPO_AUTOSCALE_FROM_ZERO:=false}" + image: controller:latest + imagePullPolicy: Always + name: manager + ports: + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + livenessProbe: + httpGet: + path: /healthz + port: healthz + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + runAsUser: 65532 + runAsGroup: 65532 + terminationMessagePolicy: FallbackToLogsOnError terminationGracePeriodSeconds: 10 securityContext: runAsNonRoot: true @@ -55,7 +56,7 @@ spec: type: RuntimeDefault serviceAccountName: manager tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - effect: NoSchedule - key: node-role.kubernetes.io/control-plane + - effect: NoSchedule + key: node-role.kubernetes.io/master + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index dc44ee6b1..70662a53b 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -24,6 +24,17 @@ rules: - get - list - watch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + - customresourcedefinitions/status + verbs: + - get + - list + - patch + - update + - watch - apiGroups: - authentication.k8s.io resources: @@ -51,10 +62,28 @@ rules: - infrastructure.cluster.x-k8s.io resources: - openstackclusteridentities + - openstackclustertemplates + - openstackmachinetemplates verbs: - get - list + - patch + - update - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - openstackclusteridentities/status + - openstackclusters/status + - openstackclustertemplates/status + - openstackfloatingippools/status + - openstackmachines/status + - openstackmachinetemplates/status + - openstackservers/status + verbs: + - get + - patch + - update - apiGroups: - infrastructure.cluster.x-k8s.io resources: @@ -70,17 +99,6 @@ rules: - patch - update - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - openstackclusters/status - - openstackfloatingippools/status - - openstackmachines/status - - openstackservers/status - verbs: - - get - - patch - - update - apiGroups: - ipam.cluster.x-k8s.io resources: diff --git a/config/webhook/kustomization.yaml b/config/webhook/kustomization.yaml index 9cf26134e..36d4cc6e4 100644 --- a/config/webhook/kustomization.yaml +++ b/config/webhook/kustomization.yaml @@ -1,6 +1,3 @@ resources: - manifests.yaml - service.yaml - -configurations: -- kustomizeconfig.yaml diff --git a/config/webhook/kustomizeconfig.yaml b/config/webhook/kustomizeconfig.yaml deleted file mode 100644 index 25e21e3c9..000000000 --- a/config/webhook/kustomizeconfig.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# the following config is for teaching kustomize where to look at when substituting vars. -# It requires kustomize v2.1.0 or newer to work properly. -nameReference: -- kind: Service - version: v1 - fieldSpecs: - - kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - - kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - -namespace: -- kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true -- kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true - -varReference: -- path: metadata/annotations diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index d47c93d80..46ff83e72 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -5,20 +5,20 @@ metadata: name: validating-webhook-configuration webhooks: - admissionReviewVersions: - - v1beta1 + - v1 clientConfig: service: name: webhook-service namespace: system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackcluster + path: /validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackcluster failurePolicy: Fail matchPolicy: Equivalent - name: validation.openstackcluster.infrastructure.cluster.x-k8s.io + name: validation.openstackcluster.v1beta2.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -26,20 +26,20 @@ webhooks: - openstackclusters sideEffects: None - admissionReviewVersions: - - v1beta1 + - v1 clientConfig: service: name: webhook-service namespace: system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackclustertemplate + path: /validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackclustertemplate failurePolicy: Fail matchPolicy: Equivalent - name: validation.openstackclustertemplate.infrastructure.cluster.x-k8s.io + name: validation.openstackclustertemplate.v1beta2.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -47,20 +47,20 @@ webhooks: - openstackclustertemplates sideEffects: None - admissionReviewVersions: - - v1beta1 + - v1 clientConfig: service: name: webhook-service namespace: system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackmachine + path: /validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackmachine failurePolicy: Fail matchPolicy: Equivalent - name: validation.openstackmachine.infrastructure.cluster.x-k8s.io + name: validation.openstackmachine.v1beta2.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE @@ -68,20 +68,20 @@ webhooks: - openstackmachines sideEffects: None - admissionReviewVersions: - - v1beta1 + - v1 clientConfig: service: name: webhook-service namespace: system - path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackmachinetemplate + path: /validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackmachinetemplate failurePolicy: Fail matchPolicy: Equivalent - name: validation.openstackmachinetemplate.infrastructure.cluster.x-k8s.io + name: validation.openstackmachinetemplate.v1beta2.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1beta1 + - v1beta2 operations: - CREATE - UPDATE diff --git a/config/webhook/service.yaml b/config/webhook/service.yaml index 711977f54..db070dff2 100644 --- a/config/webhook/service.yaml +++ b/config/webhook/service.yaml @@ -5,5 +5,5 @@ metadata: namespace: system spec: ports: - - port: 443 - targetPort: webhook-server + - port: 443 + targetPort: webhook-server diff --git a/controllers/openstackcluster_controller.go b/controllers/openstackcluster_controller.go index 3989fc155..7ebefba0e 100644 --- a/controllers/openstackcluster_controller.go +++ b/controllers/openstackcluster_controller.go @@ -20,23 +20,24 @@ import ( "context" "errors" "fmt" + "sort" "time" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/networks" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/ports" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/subnets" corev1 "k8s.io/api/core/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/collections" + conditions "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/cluster-api/util/predicates" ctrl "sigs.k8s.io/controller-runtime" @@ -48,7 +49,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/compute" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/loadbalancer" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking" @@ -59,14 +60,13 @@ import ( ) const ( - waitForBastionToReconcile = 15 * time.Second - waitForOctaviaPortsCleanup = 15 * time.Second + waitForBastionToReconcile = 15 * time.Second ) // OpenStackClusterReconciler reconciles a OpenStackCluster object. type OpenStackClusterReconciler struct { Client client.Client - Recorder record.EventRecorder + Recorder events.EventRecorder WatchFilterValue string ScopeFactory scope.Factory CaCertificates []byte // PEM encoded ca certificates. @@ -116,7 +116,14 @@ func (r *OpenStackClusterReconciler) Reconcile(ctx context.Context, req ctrl.Req // Always patch the openStackCluster when exiting this function so we can persist any OpenStackCluster changes. defer func() { - if err := patchHelper.Patch(ctx, openStackCluster); err != nil { + if err := patchHelper.Patch(ctx, openStackCluster, patch.WithOwnedConditions{Conditions: []string{ + clusterv1.ReadyCondition, + infrav1.OpenStackAuthenticationSucceeded, + infrav1.SecurityGroupsReadyCondition, + infrav1.APIEndpointReadyCondition, + infrav1.NetworkReadyCondition, + infrav1.RouterReadyCondition, + }}); err != nil { result = ctrl.Result{} reterr = kerrors.NewAggregate([]error{reterr, fmt.Errorf("error patching OpenStackCluster %s/%s: %w", openStackCluster.Namespace, openStackCluster.Name, err)}) } @@ -124,8 +131,19 @@ func (r *OpenStackClusterReconciler) Reconcile(ctx context.Context, req ctrl.Req clientScope, err := r.ScopeFactory.NewClientScopeFromObject(ctx, r.Client, r.CaCertificates, log, openStackCluster) if err != nil { + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackAuthenticationFailedReason, + Message: fmt.Sprintf("Failed to create OpenStack client scope: %v", err), + }) return reconcile.Result{}, err } + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) scope := scope.NewWithLogger(clientScope, log) // Handle deleted clusters @@ -188,7 +206,7 @@ func (r *OpenStackClusterReconciler) reconcileDelete(ctx context.Context, scope result, err := loadBalancerService.DeleteLoadBalancer(openStackCluster, clusterResourceName) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete load balancer: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete load balancer: %w", err)) return reconcile.Result{}, fmt.Errorf("failed to delete load balancer: %w", err) } if result != nil { @@ -199,23 +217,23 @@ func (r *OpenStackClusterReconciler) reconcileDelete(ctx context.Context, scope // if ManagedSubnets was not set, no network was created. if len(openStackCluster.Spec.ManagedSubnets) > 0 { if err = networkingService.DeleteRouter(openStackCluster, clusterResourceName); err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete router: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete router: %w", err)) return ctrl.Result{}, fmt.Errorf("failed to delete router: %w", err) } if err = networkingService.DeleteClusterPorts(openStackCluster); err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete ports: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete ports: %w", err)) return reconcile.Result{}, fmt.Errorf("failed to delete ports: %w", err) } if err = networkingService.DeleteNetwork(openStackCluster, clusterResourceName); err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete network: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete network: %w", err)) return ctrl.Result{}, fmt.Errorf("failed to delete network: %w", err) } } if err = networkingService.DeleteSecurityGroups(openStackCluster, clusterResourceName); err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete security groups: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete security groups: %w", err)) return reconcile.Result{}, fmt.Errorf("failed to delete security groups: %w", err) } @@ -264,7 +282,7 @@ func (r *OpenStackClusterReconciler) deleteBastion(ctx context.Context, scope *s // This decision was made so if a user specifies a pre-created floating IP that is intended to only be used for the bastion, the floating IP won't get removed once the bastion is destroyed. if statusFloatingIP != nil && (specFloatingIP == nil || *statusFloatingIP != *specFloatingIP) { if err = networkingService.DeleteFloatingIP(openStackCluster, openStackCluster.Status.Bastion.FloatingIP); err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete floating IP: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete floating IP: %w", err)) return fmt.Errorf("failed to delete floating IP: %w", err) } } @@ -295,7 +313,7 @@ func (r *OpenStackClusterReconciler) deleteBastion(ctx context.Context, scope *s } // Floating IP may not have properly saved in bastion status (thus not deleted above), delete any remaining floating IP if err = networkingService.DeleteFloatingIP(openStackCluster, address.Address); err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete floating IP: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete floating IP: %w", err)) return fmt.Errorf("failed to delete floating IP: %w", err) } } @@ -303,7 +321,7 @@ func (r *OpenStackClusterReconciler) deleteBastion(ctx context.Context, scope *s } if err := r.reconcileDeleteBastionServer(ctx, scope, openStackCluster, cluster); err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete bastion: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to delete bastion: %w", err)) return fmt.Errorf("failed to delete bastion: %w", err) } @@ -337,25 +355,49 @@ func (r *OpenStackClusterReconciler) reconcileNormal(ctx context.Context, scope return ctrl.Result{}, err } - // Create a new list in case any AZs have been removed from OpenStack - openStackCluster.Status.FailureDomains = make(clusterv1beta1.FailureDomains) - for _, az := range availabilityZones { - // By default, the AZ is used or not used for control plane nodes depending on the flag - found := !ptr.Deref(openStackCluster.Spec.ControlPlaneOmitAvailabilityZone, false) - // If explicit AZs for control plane nodes are given, they override the value - if len(openStackCluster.Spec.ControlPlaneAvailabilityZones) > 0 { - found = contains(openStackCluster.Spec.ControlPlaneAvailabilityZones, az.ZoneName) + // Only populate failure domains during initial provisioning to avoid + // unnecessary status updates from transient AZ changes (e.g. the default + // "nova" zone appearing briefly when a new compute host registers). + if len(openStackCluster.Status.FailureDomains) == 0 { + openStackCluster.Status.FailureDomains = make([]clusterv1.FailureDomain, 0, len(availabilityZones)) + for _, az := range availabilityZones { + // By default, the AZ is used or not used for control plane nodes depending on the flag + found := !ptr.Deref(openStackCluster.Spec.ControlPlaneOmitAvailabilityZone, false) + // If explicit AZs for control plane nodes are given, they override the value + if len(openStackCluster.Spec.ControlPlaneAvailabilityZones) > 0 { + found = contains(openStackCluster.Spec.ControlPlaneAvailabilityZones, az.ZoneName) + } + openStackCluster.Status.FailureDomains = append(openStackCluster.Status.FailureDomains, clusterv1.FailureDomain{ + Name: az.ZoneName, + ControlPlane: ptr.To(found), + }) } - // Add the AZ object to the failure domains for the cluster + sort.Slice(openStackCluster.Status.FailureDomains, func(i, j int) bool { + return openStackCluster.Status.FailureDomains[i].Name < openStackCluster.Status.FailureDomains[j].Name + }) + } - openStackCluster.Status.FailureDomains[az.ZoneName] = clusterv1beta1.FailureDomainSpec{ - ControlPlane: found, - } + // Set initialization.provisioned to true when initial infrastructure provisioning is complete. + // This field should only be set once and never changed afterward, as per CAPI v1beta2 contract. + // We set it here after all core infrastructure (network, router, security groups, control plane endpoint) + // has been successfully provisioned. + if openStackCluster.Status.Initialization == nil { + openStackCluster.Status.Initialization = &infrav1.ClusterInitialization{} + } + if !openStackCluster.Status.Initialization.Provisioned { + openStackCluster.Status.Initialization.Provisioned = true + scope.Logger().Info("Initial cluster infrastructure provisioning completed") } - openStackCluster.Status.Ready = true - openStackCluster.Status.FailureMessage = nil - openStackCluster.Status.FailureReason = nil + // Set the Ready condition to True when infrastructure is ready. + // This condition surfaces into Cluster's status.conditions[InfrastructureReady]. + // It reflects the current operational state of the cluster infrastructure. + conditions.Set(openStackCluster, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) + scope.Logger().Info("Reconciled Cluster created successfully") result, err := r.reconcileBastion(ctx, scope, cluster, openStackCluster) @@ -410,7 +452,7 @@ func (r *OpenStackClusterReconciler) reconcileBastion(ctx context.Context, scope port, err := computeService.GetManagementPort(openStackCluster, instanceStatus) if err != nil { err = fmt.Errorf("getting management port for bastion: %w", err) - handleUpdateOSCError(openStackCluster, err, false) + handleUpdateOSCError(openStackCluster, err) return nil, err } @@ -424,7 +466,7 @@ func (r *OpenStackClusterReconciler) reconcileBastion(ctx context.Context, scope func bastionAddFloatingIP(openStackCluster *infrav1.OpenStackCluster, clusterResourceName string, port *ports.Port, networkingService *networking.Service) (*reconcile.Result, error) { fp, err := networkingService.GetFloatingIPByPortID(port.ID) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to get or create floating IP for bastion: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to get or create floating IP for bastion: %w", err)) return nil, fmt.Errorf("failed to get floating IP for bastion port: %w", err) } if fp != nil { @@ -445,14 +487,14 @@ func bastionAddFloatingIP(openStackCluster *infrav1.OpenStackCluster, clusterRes // Check if there is an existing floating IP attached to bastion, in case where FloatingIP would not yet have been stored in cluster status fp, err = networkingService.GetOrCreateFloatingIP(openStackCluster, openStackCluster, clusterResourceName, floatingIP) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to get or create floating IP for bastion: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to get or create floating IP for bastion: %w", err)) return nil, fmt.Errorf("failed to get or create floating IP for bastion: %w", err) } openStackCluster.Status.Bastion.FloatingIP = fp.FloatingIP err = networkingService.AssociateFloatingIP(openStackCluster, fp, port.ID) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to associate floating IP with bastion: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to associate floating IP with bastion: %w", err)) return nil, fmt.Errorf("failed to associate floating IP with bastion: %w", err) } @@ -505,7 +547,7 @@ func (r *OpenStackClusterReconciler) reconcileBastionServer(ctx context.Context, if err != nil { return nil, true, err } - if !bastionNotFound && server != nil && !apiequality.Semantic.DeepEqual(bastionServerSpec, &server.Spec) { + if !bastionNotFound && server != nil && !equality.Semantic.DeepEqual(bastionServerSpec, &server.Spec) { scope.Logger().Info("Bastion spec has changed, re-creating the OpenStackServer object") if err := r.deleteBastion(ctx, scope, cluster, openStackCluster); err != nil { return nil, true, err @@ -623,60 +665,68 @@ func getBastionSecurityGroupID(openStackCluster *infrav1.OpenStackCluster) *stri func resolveLoadBalancerNetwork(openStackCluster *infrav1.OpenStackCluster, networkingService *networking.Service) error { lbSpec := openStackCluster.Spec.APIServerLoadBalancer - if lbSpec.IsEnabled() { - lbStatus := openStackCluster.Status.APIServerLoadBalancer - if lbStatus == nil { - lbStatus = &infrav1.LoadBalancer{} - openStackCluster.Status.APIServerLoadBalancer = lbStatus + + // if lb is not enabled, return early + if !lbSpec.IsEnabled() { + return nil + } + + lbStatus := openStackCluster.Status.APIServerLoadBalancer + if lbStatus == nil { + lbStatus = &infrav1.LoadBalancer{} + openStackCluster.Status.APIServerLoadBalancer = lbStatus + } + + lbNetStatus := lbStatus.LoadBalancerNetwork + if lbNetStatus == nil { + lbNetStatus = &infrav1.NetworkStatusWithSubnets{ + NetworkStatus: infrav1.NetworkStatus{}, } + } - lbNetStatus := lbStatus.LoadBalancerNetwork - if lbNetStatus == nil { - lbNetStatus = &infrav1.NetworkStatusWithSubnets{ - NetworkStatus: infrav1.NetworkStatus{}, + if lbSpec.Network != nil { + lbNet, err := networkingService.GetNetworkByParam(lbSpec.Network) + if err != nil { + if errors.Is(err, capoerrors.ErrFilterMatch) { + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to find loadbalancer network: %w", err)) } + return fmt.Errorf("failed to find network: %w", err) } - if lbSpec.Network != nil { - lbNet, err := networkingService.GetNetworkByParam(lbSpec.Network) - if err != nil { - if errors.Is(err, capoerrors.ErrFilterMatch) { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to find loadbalancer network: %w", err), true) + lbNetStatus.Name = lbNet.Name + lbNetStatus.ID = lbNet.ID + lbNetStatus.Tags = lbNet.Tags + + // Filter out only relevant subnets specified by the spec + lbNetStatus.Subnets = []infrav1.Subnet{} + for _, s := range lbSpec.Subnets { + matchFound := false + for _, subnetID := range lbNet.Subnets { + subnet, err := networkingService.GetSubnetByParam(&s) + if s.ID != nil && subnetID == *s.ID && err == nil { + matchFound = true + lbNetStatus.Subnets = append( + lbNetStatus.Subnets, infrav1.Subnet{ + ID: subnet.ID, + Name: subnet.Name, + CIDR: subnet.CIDR, + Tags: subnet.Tags, + }) } - return fmt.Errorf("failed to find network: %w", err) } - - lbNetStatus.Name = lbNet.Name - lbNetStatus.ID = lbNet.ID - lbNetStatus.Tags = lbNet.Tags - - // Filter out only relevant subnets specified by the spec - lbNetStatus.Subnets = []infrav1.Subnet{} - for _, s := range lbSpec.Subnets { - matchFound := false - for _, subnetID := range lbNet.Subnets { - subnet, err := networkingService.GetSubnetByParam(&s) - if s.ID != nil && subnetID == *s.ID && err == nil { - matchFound = true - lbNetStatus.Subnets = append( - lbNetStatus.Subnets, infrav1.Subnet{ - ID: subnet.ID, - Name: subnet.Name, - CIDR: subnet.CIDR, - Tags: subnet.Tags, - }) - } - } - if !matchFound { - handleUpdateOSCError(openStackCluster, fmt.Errorf("no subnet match was found in the specified network (specified subnet: %v, available subnets: %v)", s, lbNet.Subnets), false) - return fmt.Errorf("no subnet match was found in the specified network (specified subnet: %v, available subnets: %v)", s, lbNet.Subnets) - } + if !matchFound { + handleUpdateOSCError(openStackCluster, fmt.Errorf("no subnet match was found in the specified network (specified subnet: %v, available subnets: %v)", s, lbNet.Subnets)) + return fmt.Errorf("no subnet match was found in the specified network (specified subnet: %v, available subnets: %v)", s, lbNet.Subnets) } - - openStackCluster.Status.APIServerLoadBalancer.LoadBalancerNetwork = lbNetStatus } + } else { + lbNetStatus.ID = openStackCluster.Status.Network.ID + lbNetStatus.Name = openStackCluster.Status.Network.Name + lbNetStatus.Subnets = openStackCluster.Status.Network.Subnets } + openStackCluster.Status.APIServerLoadBalancer.LoadBalancerNetwork = lbNetStatus + return nil } @@ -692,7 +742,7 @@ func reconcileNetworkComponents(scope *scope.WithLogger, cluster *clusterv1.Clus err = networkingService.ReconcileExternalNetwork(openStackCluster) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile external network: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile external network: %w", err)) return fmt.Errorf("failed to reconcile external network: %w", err) } @@ -710,17 +760,44 @@ func reconcileNetworkComponents(scope *scope.WithLogger, cluster *clusterv1.Clus err = resolveLoadBalancerNetwork(openStackCluster, networkingService) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile loadbalancer network: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile loadbalancer network: %w", err)) return fmt.Errorf("failed to reconcile loadbalancer network: %w", err) } err = networkingService.ReconcileSecurityGroups(openStackCluster, clusterResourceName) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile security groups: %w", err), false) + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.SecurityGroupsReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.SecurityGroupReconcileFailedReason, + Message: fmt.Sprintf("Failed to reconcile security groups: %v", err), + }) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile security groups: %w", err)) return fmt.Errorf("failed to reconcile security groups: %w", err) } + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.SecurityGroupsReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) - return reconcileControlPlaneEndpoint(scope, networkingService, openStackCluster, clusterResourceName) + err = reconcileControlPlaneEndpoint(scope, networkingService, openStackCluster, clusterResourceName) + if err != nil { + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.APIEndpointReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.APIEndpointConfigFailedReason, + Message: fmt.Sprintf("Failed to reconcile control plane endpoint: %v", err), + }) + return err + } + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.APIEndpointReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) + + return nil } // reconcilePreExistingNetworkComponents reconciles the cluster network status when the cluster is @@ -736,7 +813,13 @@ func reconcilePreExistingNetworkComponents(scope *scope.WithLogger, networkingSe if openStackCluster.Spec.Network != nil { network, err := networkingService.GetNetworkByParam(openStackCluster.Spec.Network) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to find network: %w", err), false) + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: fmt.Sprintf("Failed to find network: %v", err), + }) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to find network: %w", err)) return fmt.Errorf("error fetching cluster network: %w", err) } setClusterNetwork(openStackCluster, network) @@ -744,6 +827,12 @@ func reconcilePreExistingNetworkComponents(scope *scope.WithLogger, networkingSe subnets, err := getClusterSubnets(networkingService, openStackCluster) if err != nil { + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: fmt.Sprintf("Failed to get cluster subnets: %v", err), + }) return err } @@ -759,6 +848,12 @@ func reconcilePreExistingNetworkComponents(scope *scope.WithLogger, networkingSe } } if err := utils.ValidateSubnets(capoSubnets); err != nil { + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: fmt.Sprintf("Failed to validate subnets: %v", err), + }) return err } openStackCluster.Status.Network.Subnets = capoSubnets @@ -769,15 +864,33 @@ func reconcilePreExistingNetworkComponents(scope *scope.WithLogger, networkingSe if openStackCluster.Status.Network.ID == "" && len(subnets) > 0 { network, err := networkingService.GetNetworkByID(subnets[0].NetworkID) if err != nil { + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: fmt.Sprintf("Failed to get network by ID: %v", err), + }) return err } setClusterNetwork(openStackCluster, network) } + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) + if openStackCluster.Spec.Router != nil { router, err := networkingService.GetRouterByParam(openStackCluster.Spec.Router) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to find router: %w", err), false) + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.RouterReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: fmt.Sprintf("Failed to find router: %v", err), + }) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to find router: %w", err)) return fmt.Errorf("error fetching cluster router: %w", err) } @@ -794,6 +907,11 @@ func reconcilePreExistingNetworkComponents(scope *scope.WithLogger, networkingSe Tags: router.Tags, IPs: routerIPs, } + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.RouterReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) } return nil @@ -804,19 +922,48 @@ func reconcilePreExistingNetworkComponents(scope *scope.WithLogger, networkingSe func reconcileProvisionedNetworkComponents(networkingService *networking.Service, openStackCluster *infrav1.OpenStackCluster, clusterResourceName string) error { err := networkingService.ReconcileNetwork(openStackCluster, clusterResourceName) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile network: %w", err), false) + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.NetworkReconcileFailedReason, + Message: fmt.Sprintf("Failed to reconcile network: %v", err), + }) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile network: %w", err)) return fmt.Errorf("failed to reconcile network: %w", err) } err = networkingService.ReconcileSubnet(openStackCluster, clusterResourceName) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile subnets: %w", err), false) + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.SubnetReconcileFailedReason, + Message: fmt.Sprintf("Failed to reconcile subnets: %v", err), + }) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile subnets: %w", err)) return fmt.Errorf("failed to reconcile subnets: %w", err) } + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.NetworkReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) + err = networkingService.ReconcileRouter(openStackCluster, clusterResourceName) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile router: %w", err), false) + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.RouterReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.RouterReconcileFailedReason, + Message: fmt.Sprintf("Failed to reconcile router: %v", err), + }) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile router: %w", err)) return fmt.Errorf("failed to reconcile router: %w", err) } + conditions.Set(openStackCluster, metav1.Condition{ + Type: infrav1.RouterReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) return nil } @@ -841,9 +988,9 @@ func reconcileControlPlaneEndpoint(scope *scope.WithLogger, networkingService *n return err } - terminalFailure, err := loadBalancerService.ReconcileLoadBalancer(openStackCluster, clusterResourceName, int(apiServerPort)) + _, err = loadBalancerService.ReconcileLoadBalancer(openStackCluster, clusterResourceName, int(apiServerPort)) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile load balancer: %w", err), terminalFailure) + handleUpdateOSCError(openStackCluster, fmt.Errorf("failed to reconcile load balancer: %w", err)) return fmt.Errorf("failed to reconcile load balancer: %w", err) } @@ -865,7 +1012,7 @@ func reconcileControlPlaneEndpoint(scope *scope.WithLogger, networkingService *n case !ptr.Deref(openStackCluster.Spec.DisableAPIServerFloatingIP, false) && !ptr.Deref(openStackCluster.Spec.DisableExternalNetwork, false): fp, err := networkingService.GetOrCreateFloatingIP(openStackCluster, openStackCluster, clusterResourceName, openStackCluster.Spec.APIServerFloatingIP) if err != nil { - handleUpdateOSCError(openStackCluster, fmt.Errorf("floating IP cannot be got or created: %w", err), false) + handleUpdateOSCError(openStackCluster, fmt.Errorf("floating IP cannot be got or created: %w", err)) return fmt.Errorf("floating IP cannot be got or created: %w", err) } host = fp.FloatingIP @@ -880,11 +1027,11 @@ func reconcileControlPlaneEndpoint(scope *scope.WithLogger, networkingService *n // Control plane endpoint is not set, and none can be created default: err := fmt.Errorf("unable to determine control plane endpoint") - handleUpdateOSCError(openStackCluster, err, false) + handleUpdateOSCError(openStackCluster, err) return err } - openStackCluster.Spec.ControlPlaneEndpoint = &clusterv1beta1.APIEndpoint{ + openStackCluster.Spec.ControlPlaneEndpoint = &clusterv1.APIEndpoint{ Host: host, Port: apiServerPort, } @@ -942,12 +1089,14 @@ func (r *OpenStackClusterReconciler) SetupWithManager(ctx context.Context, mgr c Complete(r) } -func handleUpdateOSCError(openstackCluster *infrav1.OpenStackCluster, message error, isFatal bool) { - if isFatal { - err := capoerrors.DeprecatedCAPOUpdateClusterError - openstackCluster.Status.FailureReason = &err - openstackCluster.Status.FailureMessage = ptr.To(message.Error()) - } +func handleUpdateOSCError(openstackCluster *infrav1.OpenStackCluster, message error) { + // Set the Ready condition to False for errors + conditions.Set(openstackCluster, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: message.Error(), + }) } // getClusterSubnets retrieves the subnets based on the Subnet filters specified on OpenstackCluster. @@ -973,7 +1122,7 @@ func getClusterSubnets(networkingService *networking.Service, openStackCluster * if err != nil { err = fmt.Errorf("failed to find subnets: %w", err) if errors.Is(err, capoerrors.ErrFilterMatch) { - handleUpdateOSCError(openStackCluster, err, true) + handleUpdateOSCError(openStackCluster, err) } return nil, err } @@ -986,7 +1135,7 @@ func getClusterSubnets(networkingService *networking.Service, openStackCluster * if err != nil { err = fmt.Errorf("failed to find subnet %d in network %s: %w", subnet, networkID, err) if errors.Is(err, capoerrors.ErrFilterMatch) { - handleUpdateOSCError(openStackCluster, err, true) + handleUpdateOSCError(openStackCluster, err) } return nil, err } diff --git a/controllers/openstackcluster_controller_test.go b/controllers/openstackcluster_controller_test.go index 548e7a28c..8332750bc 100644 --- a/controllers/openstackcluster_controller_test.go +++ b/controllers/openstackcluster_controller_test.go @@ -22,7 +22,9 @@ import ( "reflect" "testing" + "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/extensions/layer3/floatingips" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/extensions/layer3/routers" + "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/extensions/security/groups" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/networks" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/subnets" . "github.com/onsi/ginkgo/v2" //nolint:revive @@ -31,16 +33,16 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/util/annotations" + conditions "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) @@ -56,7 +58,6 @@ var ( ) var _ = Describe("OpenStackCluster controller", func() { - capiClusterName := "capi-cluster" testClusterName := "test-cluster" testNum := 0 bastionSpec := infrav1.OpenStackMachineSpec{ @@ -221,7 +222,7 @@ var _ = Describe("OpenStackCluster controller", func() { Expect(created.Spec.IdentityRef.Region).To(Equal("RegionOne")) }) - It("should fail when namespace is denied access to ClusterIdentity", func() { + It("should fail when namespace is denied access to ClusterIdentity and set OpenStackAuthenticationSucceededCondition to False", func() { testCluster.SetName("identity-access-denied") testCluster.Spec.IdentityRef = infrav1.OpenStackIdentityReference{ Type: "ClusterIdentity", @@ -245,6 +246,51 @@ var _ = Describe("OpenStackCluster controller", func() { Expect(err).To(MatchError(identityAccessErr)) Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackCluster to verify the condition was set + updatedCluster := &infrav1.OpenStackCluster{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testCluster.Name, Namespace: testCluster.Namespace}, updatedCluster)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedCluster, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedCluster, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when credentials secret is missing", func() { + testCluster.SetName("missing-credentials") + testCluster.Spec.IdentityRef = infrav1.OpenStackIdentityReference{ + Type: "Secret", + Name: "non-existent-secret", + CloudName: "openstack", + } + + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + credentialsErr := fmt.Errorf("secret not found: non-existent-secret") + mockScopeFactory.SetClientScopeCreateError(credentialsErr) + + req := createRequestFromOSCluster(testCluster) + result, err := reconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(credentialsErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackCluster to verify the condition was set + updatedCluster := &infrav1.OpenStackCluster{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testCluster.Name, Namespace: testCluster.Namespace}, updatedCluster)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedCluster, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedCluster, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) }) It("should reject updates that modify identityRef.region (immutable)", func() { @@ -446,6 +492,11 @@ var _ = Describe("OpenStackCluster controller", func() { err = reconcileNetworkComponents(scope, capiCluster, testCluster) Expect(err).To(BeNil()) + + // Verify conditions are set correctly + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.SecurityGroupsReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.APIEndpointReadyCondition)).To(BeTrue()) }) It("should allow two subnets for the cluster network", func() { @@ -528,6 +579,11 @@ var _ = Describe("OpenStackCluster controller", func() { err = reconcileNetworkComponents(scope, capiCluster, testCluster) Expect(err).To(BeNil()) Expect(len(testCluster.Status.Network.Subnets)).To(Equal(2)) + + // Verify conditions are set correctly + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.SecurityGroupsReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.APIEndpointReadyCondition)).To(BeTrue()) }) It("should allow fetch network by subnet", func() { @@ -574,6 +630,11 @@ var _ = Describe("OpenStackCluster controller", func() { err = reconcileNetworkComponents(scope, capiCluster, testCluster) Expect(err).To(BeNil()) Expect(testCluster.Status.Network.ID).To(Equal(clusterNetworkID)) + + // Verify conditions are set correctly + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.SecurityGroupsReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.APIEndpointReadyCondition)).To(BeTrue()) }) It("reconcile pre-existing network components by id", func() { @@ -634,6 +695,10 @@ var _ = Describe("OpenStackCluster controller", func() { Expect(testCluster.Status.Network.ID).To(Equal(clusterNetworkID)) Expect(testCluster.Status.Network.Subnets[0].ID).To(Equal(clusterSubnetID)) Expect(testCluster.Status.Router.ID).To(Equal(clusterRouterID)) + + // Verify conditions are set correctly + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.RouterReadyCondition)).To(BeTrue()) }) It("reconcile pre-existing network components by name", func() { @@ -716,6 +781,457 @@ var _ = Describe("OpenStackCluster controller", func() { Expect(testCluster.Status.Network.ID).To(Equal(clusterNetworkID)) Expect(testCluster.Status.Network.Subnets[0].ID).To(Equal(clusterSubnetID)) Expect(testCluster.Status.Router.ID).To(Equal(clusterRouterID)) + + // Verify conditions are set correctly + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.RouterReadyCondition)).To(BeTrue()) + }) + + It("should reconcile API endpoint with floating IP and set condition", func() { + const externalNetworkID = "a42211a2-4d2c-426f-9413-830e4b4abbbc" + const clusterNetworkID = "6c90b532-7ba0-418a-a276-5ae55060b5b0" + const clusterSubnetID = "cad5a91a-36de-4388-823b-b0cc82cadfdc" + const floatingIP = "203.0.113.10" + + testCluster.SetName("api-endpoint-floating-ip") + testCluster.Spec = infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + ExternalNetwork: &infrav1.NetworkParam{ + ID: ptr.To(externalNetworkID), + }, + Network: &infrav1.NetworkParam{ + ID: ptr.To(clusterNetworkID), + }, + // When DisableAPIServerFloatingIP is not set and external network is configured, + // a floating IP should be created for the API server + } + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + log := GinkgoLogr + clientScope, err := mockScopeFactory.NewClientScopeFromObject(ctx, k8sClient, nil, log, testCluster) + Expect(err).To(BeNil()) + scope := scope.NewWithLogger(clientScope, log) + + networkClientRecorder := mockScopeFactory.NetworkClient.EXPECT() + + // Fetch external network + networkClientRecorder.GetNetwork(externalNetworkID).Return(&networks.Network{ + ID: externalNetworkID, + Name: "external-network", + }, nil) + + // Fetch cluster network + networkClientRecorder.GetNetwork(clusterNetworkID).Return(&networks.Network{ + ID: clusterNetworkID, + Name: "cluster-network", + }, nil) + + // Fetching cluster subnets + networkClientRecorder.ListSubnet(subnets.ListOpts{ + NetworkID: clusterNetworkID, + }).Return([]subnets.Subnet{ + { + ID: clusterSubnetID, + Name: "cluster-subnet", + CIDR: "192.168.0.0/24", + }, + }, nil) + + // Mock floating IP creation for API server + // When no specific IP is requested, it will just create a new floating IP + networkClientRecorder.CreateFloatingIP(gomock.Any()).Return(&floatingips.FloatingIP{ + FloatingIP: floatingIP, + ID: "floating-ip-id", + }, nil) + + err = reconcileNetworkComponents(scope, capiCluster, testCluster) + Expect(err).To(BeNil()) + + // Verify API endpoint was set + Expect(testCluster.Spec.ControlPlaneEndpoint).ToNot(BeNil()) + Expect(testCluster.Spec.ControlPlaneEndpoint.Host).To(Equal(floatingIP)) + Expect(testCluster.Spec.ControlPlaneEndpoint.Port).To(Equal(int32(6443))) + + // Verify conditions are set correctly + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.SecurityGroupsReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.APIEndpointReadyCondition)).To(BeTrue()) + }) + + It("should reconcile API endpoint with fixed IP and set condition", func() { + const clusterNetworkID = "6c90b532-7ba0-418a-a276-5ae55060b5b0" + const clusterSubnetID = "cad5a91a-36de-4388-823b-b0cc82cadfdc" + const fixedIP = "192.168.0.10" + + testCluster.SetName("api-endpoint-fixed-ip") + testCluster.Spec = infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + Network: &infrav1.NetworkParam{ + ID: ptr.To(clusterNetworkID), + }, + DisableExternalNetwork: ptr.To(true), + DisableAPIServerFloatingIP: ptr.To(true), + APIServerFixedIP: ptr.To(fixedIP), + } + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + log := GinkgoLogr + clientScope, err := mockScopeFactory.NewClientScopeFromObject(ctx, k8sClient, nil, log, testCluster) + Expect(err).To(BeNil()) + scope := scope.NewWithLogger(clientScope, log) + + networkClientRecorder := mockScopeFactory.NetworkClient.EXPECT() + + // Fetch cluster network + networkClientRecorder.GetNetwork(clusterNetworkID).Return(&networks.Network{ + ID: clusterNetworkID, + Name: "cluster-network", + }, nil) + + // Fetching cluster subnets + networkClientRecorder.ListSubnet(subnets.ListOpts{ + NetworkID: clusterNetworkID, + }).Return([]subnets.Subnet{ + { + ID: clusterSubnetID, + Name: "cluster-subnet", + CIDR: "192.168.0.0/24", + }, + }, nil) + + err = reconcileNetworkComponents(scope, capiCluster, testCluster) + Expect(err).To(BeNil()) + + // Verify API endpoint was set with fixed IP + Expect(testCluster.Spec.ControlPlaneEndpoint).ToNot(BeNil()) + Expect(testCluster.Spec.ControlPlaneEndpoint.Host).To(Equal(fixedIP)) + Expect(testCluster.Spec.ControlPlaneEndpoint.Port).To(Equal(int32(6443))) + + // Verify conditions are set correctly + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.SecurityGroupsReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.APIEndpointReadyCondition)).To(BeTrue()) + }) + + It("should set NetworkReadyCondition to False when network lookup fails", func() { + const clusterNetworkID = "6c90b532-7ba0-418a-a276-5ae55060b5b0" + + testCluster.SetName("network-lookup-failure") + testCluster.Spec = infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + Network: &infrav1.NetworkParam{ + ID: ptr.To(clusterNetworkID), + }, + DisableExternalNetwork: ptr.To(true), + DisableAPIServerFloatingIP: ptr.To(true), + APIServerFixedIP: ptr.To("192.168.0.10"), + } + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + log := GinkgoLogr + clientScope, err := mockScopeFactory.NewClientScopeFromObject(ctx, k8sClient, nil, log, testCluster) + Expect(err).To(BeNil()) + scope := scope.NewWithLogger(clientScope, log) + + networkClientRecorder := mockScopeFactory.NetworkClient.EXPECT() + + // Simulate network lookup failure + networkClientRecorder.GetNetwork(clusterNetworkID).Return(nil, fmt.Errorf("unable to get network")) + + err = reconcileNetworkComponents(scope, capiCluster, testCluster) + Expect(err).ToNot(BeNil()) + Expect(err.Error()).To(ContainSubstring("error fetching cluster network")) + + // Verify NetworkReadyCondition is set to False + Expect(conditions.IsFalse(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + condition := conditions.Get(testCluster, infrav1.NetworkReadyCondition) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackErrorReason)) + Expect(condition.Message).To(ContainSubstring("Failed to find network")) + }) + + It("should set NetworkReadyCondition to False when subnet lookup fails", func() { + const clusterNetworkID = "6c90b532-7ba0-418a-a276-5ae55060b5b0" + + testCluster.SetName("subnet-lookup-failure") + testCluster.Spec = infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + Network: &infrav1.NetworkParam{ + ID: ptr.To(clusterNetworkID), + }, + DisableExternalNetwork: ptr.To(true), + DisableAPIServerFloatingIP: ptr.To(true), + APIServerFixedIP: ptr.To("192.168.0.10"), + } + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + log := GinkgoLogr + clientScope, err := mockScopeFactory.NewClientScopeFromObject(ctx, k8sClient, nil, log, testCluster) + Expect(err).To(BeNil()) + scope := scope.NewWithLogger(clientScope, log) + + networkClientRecorder := mockScopeFactory.NetworkClient.EXPECT() + + // Network lookup succeeds + networkClientRecorder.GetNetwork(clusterNetworkID).Return(&networks.Network{ + ID: clusterNetworkID, + Name: "cluster-network", + }, nil) + + // Subnet list lookup fails + networkClientRecorder.ListSubnet(subnets.ListOpts{ + NetworkID: clusterNetworkID, + }).Return(nil, fmt.Errorf("failed to list subnets")) + + err = reconcileNetworkComponents(scope, capiCluster, testCluster) + Expect(err).ToNot(BeNil()) + + // Verify NetworkReadyCondition is set to False + Expect(conditions.IsFalse(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + condition := conditions.Get(testCluster, infrav1.NetworkReadyCondition) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackErrorReason)) + }) + + It("should set RouterReadyCondition to False when router lookup fails", func() { + const clusterNetworkID = "6c90b532-7ba0-418a-a276-5ae55060b5b0" + const clusterSubnetID = "cad5a91a-36de-4388-823b-b0cc82cadfdc" + const clusterRouterID = "a0e2b0a5-4d2f-4e8d-9a1c-6b3e7f8c9d0e" + + testCluster.SetName("router-lookup-failure") + testCluster.Spec = infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + Network: &infrav1.NetworkParam{ + ID: ptr.To(clusterNetworkID), + }, + Router: &infrav1.RouterParam{ + ID: ptr.To(clusterRouterID), + }, + DisableExternalNetwork: ptr.To(true), + DisableAPIServerFloatingIP: ptr.To(true), + APIServerFixedIP: ptr.To("192.168.0.10"), + } + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + log := GinkgoLogr + clientScope, err := mockScopeFactory.NewClientScopeFromObject(ctx, k8sClient, nil, log, testCluster) + Expect(err).To(BeNil()) + scope := scope.NewWithLogger(clientScope, log) + + networkClientRecorder := mockScopeFactory.NetworkClient.EXPECT() + + // Network lookup succeeds + networkClientRecorder.GetNetwork(clusterNetworkID).Return(&networks.Network{ + ID: clusterNetworkID, + Name: "cluster-network", + }, nil) + + // Subnet lookup succeeds + networkClientRecorder.ListSubnet(subnets.ListOpts{ + NetworkID: clusterNetworkID, + }).Return([]subnets.Subnet{ + { + ID: clusterSubnetID, + Name: "cluster-subnet", + CIDR: "192.168.0.0/24", + }, + }, nil) + + // Router lookup fails + networkClientRecorder.GetRouter(clusterRouterID).Return(nil, fmt.Errorf("unable to get router")) + + err = reconcileNetworkComponents(scope, capiCluster, testCluster) + Expect(err).ToNot(BeNil()) + Expect(err.Error()).To(ContainSubstring("error fetching cluster router")) + + // Verify RouterReadyCondition is set to False + Expect(conditions.IsFalse(testCluster, infrav1.RouterReadyCondition)).To(BeTrue()) + condition := conditions.Get(testCluster, infrav1.RouterReadyCondition) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackErrorReason)) + Expect(condition.Message).To(ContainSubstring("Failed to find router")) + + // NetworkReadyCondition should still be True since network succeeded + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + }) + + It("should set SecurityGroupsReadyCondition to False when security group reconciliation fails", func() { + const clusterNetworkID = "6c90b532-7ba0-418a-a276-5ae55060b5b0" + const clusterSubnetID = "cad5a91a-36de-4388-823b-b0cc82cadfdc" + + testCluster.SetName("security-group-failure") + testCluster.Spec = infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + Network: &infrav1.NetworkParam{ + ID: ptr.To(clusterNetworkID), + }, + DisableExternalNetwork: ptr.To(true), + DisableAPIServerFloatingIP: ptr.To(true), + APIServerFixedIP: ptr.To("192.168.0.10"), + ManagedSecurityGroups: &infrav1.ManagedSecurityGroups{ + AllNodesSecurityGroupRules: []infrav1.SecurityGroupRuleSpec{ + { + Direction: "ingress", + Protocol: ptr.To("tcp"), + RemoteManagedGroups: []infrav1.ManagedSecurityGroupName{ + "worker", + }, + }, + }, + }, + } + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + log := GinkgoLogr + clientScope, err := mockScopeFactory.NewClientScopeFromObject(ctx, k8sClient, nil, log, testCluster) + Expect(err).To(BeNil()) + scope := scope.NewWithLogger(clientScope, log) + + networkClientRecorder := mockScopeFactory.NetworkClient.EXPECT() + + // Network lookup succeeds + networkClientRecorder.GetNetwork(clusterNetworkID).Return(&networks.Network{ + ID: clusterNetworkID, + Name: "cluster-network", + }, nil) + + // Subnet lookup succeeds + networkClientRecorder.ListSubnet(subnets.ListOpts{ + NetworkID: clusterNetworkID, + }).Return([]subnets.Subnet{ + { + ID: clusterSubnetID, + Name: "cluster-subnet", + CIDR: "192.168.0.0/24", + }, + }, nil) + + // Security group creation fails - this will trigger an error in getOrCreateSecurityGroup + networkClientRecorder.ListSecGroup(gomock.Any()).Return([]groups.SecGroup{}, nil).AnyTimes() + networkClientRecorder.CreateSecGroup(gomock.Any()).Return(nil, fmt.Errorf("quota exceeded")).AnyTimes() + + err = reconcileNetworkComponents(scope, capiCluster, testCluster) + Expect(err).ToNot(BeNil()) + Expect(err.Error()).To(ContainSubstring("failed to reconcile security groups")) + + // Verify SecurityGroupsReadyCondition is set to False + Expect(conditions.IsFalse(testCluster, infrav1.SecurityGroupsReadyCondition)).To(BeTrue()) + condition := conditions.Get(testCluster, infrav1.SecurityGroupsReadyCondition) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.SecurityGroupReconcileFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to reconcile security groups")) + + // NetworkReadyCondition should still be True since network succeeded + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + }) + + It("should set APIEndpointReadyCondition to False when floating IP creation fails", func() { + const externalNetworkID = "a42211a2-4d2c-426f-9413-830e4b4abbbc" + const clusterNetworkID = "6c90b532-7ba0-418a-a276-5ae55060b5b0" + const clusterSubnetID = "cad5a91a-36de-4388-823b-b0cc82cadfdc" + + testCluster.SetName("floating-ip-failure") + testCluster.Spec = infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + ExternalNetwork: &infrav1.NetworkParam{ + ID: ptr.To(externalNetworkID), + }, + Network: &infrav1.NetworkParam{ + ID: ptr.To(clusterNetworkID), + }, + // When DisableAPIServerFloatingIP is not set and external network is configured, + // a floating IP should be created for the API server + } + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + + log := GinkgoLogr + clientScope, err := mockScopeFactory.NewClientScopeFromObject(ctx, k8sClient, nil, log, testCluster) + Expect(err).To(BeNil()) + scope := scope.NewWithLogger(clientScope, log) + + networkClientRecorder := mockScopeFactory.NetworkClient.EXPECT() + + // Fetch external network + networkClientRecorder.GetNetwork(externalNetworkID).Return(&networks.Network{ + ID: externalNetworkID, + Name: "external-network", + }, nil) + + // Fetch cluster network + networkClientRecorder.GetNetwork(clusterNetworkID).Return(&networks.Network{ + ID: clusterNetworkID, + Name: "cluster-network", + }, nil) + + // Fetching cluster subnets + networkClientRecorder.ListSubnet(subnets.ListOpts{ + NetworkID: clusterNetworkID, + }).Return([]subnets.Subnet{ + { + ID: clusterSubnetID, + Name: "cluster-subnet", + CIDR: "192.168.0.0/24", + }, + }, nil) + + // Mock floating IP creation failure + networkClientRecorder.CreateFloatingIP(gomock.Any()).Return(nil, fmt.Errorf("quota exceeded")) + + err = reconcileNetworkComponents(scope, capiCluster, testCluster) + Expect(err).ToNot(BeNil()) + + // Verify APIEndpointReadyCondition is set to False + Expect(conditions.IsFalse(testCluster, infrav1.APIEndpointReadyCondition)).To(BeTrue()) + condition := conditions.Get(testCluster, infrav1.APIEndpointReadyCondition) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.APIEndpointConfigFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to reconcile control plane endpoint")) + + // NetworkReadyCondition and SecurityGroupsReadyCondition should still be True + Expect(conditions.IsTrue(testCluster, infrav1.NetworkReadyCondition)).To(BeTrue()) + Expect(conditions.IsTrue(testCluster, infrav1.SecurityGroupsReadyCondition)).To(BeTrue()) }) }) @@ -765,7 +1281,7 @@ func Test_getAPIServerPort(t *testing.T) { name: "with a control plane endpoint", openStackCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: "192.168.0.1", Port: 6444, }, diff --git a/controllers/openstackfloatingippool_controller.go b/controllers/openstackfloatingippool_controller.go index c96e92a8f..713c2905c 100644 --- a/controllers/openstackfloatingippool_controller.go +++ b/controllers/openstackfloatingippool_controller.go @@ -26,11 +26,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" - v1beta1conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -39,7 +38,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) @@ -60,7 +59,7 @@ var backoff = wait.Backoff{ // OpenStackFloatingIPPoolReconciler reconciles a OpenStackFloatingIPPool object. type OpenStackFloatingIPPoolReconciler struct { Client client.Client - Recorder record.EventRecorder + Recorder events.EventRecorder WatchFilterValue string ScopeFactory scope.Factory CaCertificates []byte // PEM encoded ca certificates. @@ -80,10 +79,34 @@ func (r *OpenStackFloatingIPPoolReconciler) Reconcile(ctx context.Context, req c return ctrl.Result{}, client.IgnoreNotFound(err) } + patchHelper, err := patch.NewHelper(pool, r.Client) + if err != nil { + return ctrl.Result{}, err + } + + defer func() { + if err := patchHelper.Patch(ctx, pool); err != nil { + if reterr == nil { + reterr = fmt.Errorf("error patching OpenStackFloatingIPPool %s/%s: %w", pool.Namespace, pool.Name, err) + } + } + }() + clientScope, err := r.ScopeFactory.NewClientScopeFromObject(ctx, r.Client, r.CaCertificates, log, pool) if err != nil { + conditions.Set(pool, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackAuthenticationFailedReason, + Message: fmt.Sprintf("Failed to create OpenStack client scope: %v", err), + }) return reconcile.Result{}, err } + conditions.Set(pool, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) scope := scope.NewWithLogger(clientScope, log) // This is done before deleting the pool, because we want to handle deleted IPs before we delete the pool @@ -101,19 +124,6 @@ func (r *OpenStackFloatingIPPoolReconciler) Reconcile(ctx context.Context, req c return ctrl.Result{}, r.reconcileDelete(ctx, scope, pool) } - patchHelper, err := patch.NewHelper(pool, r.Client) - if err != nil { - return ctrl.Result{}, err - } - - defer func() { - if err := patchHelper.Patch(ctx, pool); err != nil { - if reterr == nil { - reterr = fmt.Errorf("error patching OpenStackFloatingIPPool %s/%s: %w", pool.Namespace, pool.Name, err) - } - } - }() - if err := r.reconcileFloatingIPNetwork(scope, pool); err != nil { return ctrl.Result{}, err } @@ -196,7 +206,11 @@ func (r *OpenStackFloatingIPPoolReconciler) Reconcile(ctx context.Context, req c scope.Logger().Info("Claimed IP", "ip", ipAddress.Spec.Address) } } - v1beta1conditions.MarkTrue(pool, infrav1alpha1.OpenstackFloatingIPPoolReadyCondition) + conditions.Set(pool, metav1.Condition{ + Type: infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) return ctrl.Result{}, r.Client.Status().Update(ctx, pool) } @@ -354,14 +368,24 @@ func (r *OpenStackFloatingIPPoolReconciler) getIP(ctx context.Context, scope *sc // If we have reached the maximum number of IPs, we should not create more IPs if maxIPs != -1 && len(pool.Status.ClaimedIPs) >= maxIPs { scope.Logger().Info("MaxIPs reached", "pool", pool.Name) - v1beta1conditions.MarkFalse(pool, infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, infrav1alpha1.MaxIPsReachedReason, clusterv1beta1.ConditionSeverityError, "Maximum number of IPs reached, we will not allocate more IPs for this pool") + conditions.Set(pool, metav1.Condition{ + Type: infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1alpha1.MaxIPsReachedReason, + Message: "Maximum number of IPs reached, we will not allocate more IPs for this pool", + }) return "", errMaxIPsReached } fp, err := networkingService.CreateFloatingIPForPool(pool) if err != nil { scope.Logger().Error(err, "Failed to create floating IP", "pool", pool.Name) - v1beta1conditions.MarkFalse(pool, infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, infrav1.OpenStackErrorReason, clusterv1beta1.ConditionSeverityError, "Failed to create floating IP: %v", err) + conditions.Set(pool, metav1.Condition{ + Type: infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: fmt.Sprintf("Failed to create floating IP: %v", err), + }) return "", err } defer func() { @@ -379,7 +403,11 @@ func (r *OpenStackFloatingIPPoolReconciler) getIP(ctx context.Context, scope *sc } }() - v1beta1conditions.MarkTrue(pool, infrav1alpha1.OpenstackFloatingIPPoolReadyCondition) + conditions.Set(pool, metav1.Condition{ + Type: infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) ip = fp.FloatingIP pool.Status.ClaimedIPs = append(pool.Status.ClaimedIPs, ip) return ip, nil @@ -408,7 +436,12 @@ func (r *OpenStackFloatingIPPoolReconciler) reconcileFloatingIPNetwork(scope *sc network, err := networkingService.GetNetworkByParam(networkParam, networking.ExternalNetworksOnly) if err != nil { - v1beta1conditions.MarkFalse(pool, infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, infrav1alpha1.UnableToFindNetwork, clusterv1beta1.ConditionSeverityError, "Failed to find network: %v", err) + conditions.Set(pool, metav1.Condition{ + Type: infrav1alpha1.OpenstackFloatingIPPoolReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1alpha1.UnableToFindNetwork, + Message: fmt.Sprintf("Failed to find network: %v", err), + }) return fmt.Errorf("failed to find network: %w", err) } diff --git a/controllers/openstackfloatingippool_controller_test.go b/controllers/openstackfloatingippool_controller_test.go new file mode 100644 index 000000000..86ce112d7 --- /dev/null +++ b/controllers/openstackfloatingippool_controller_test.go @@ -0,0 +1,175 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controllers + +import ( + "fmt" + + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive + "go.uber.org/mock/gomock" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/cluster-api/test/framework" + conditions "sigs.k8s.io/cluster-api/util/conditions" + "sigs.k8s.io/cluster-api/util/patch" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" +) + +var _ = Describe("OpenStackFloatingIPPool controller", func() { + var ( + testPool *infrav1alpha1.OpenStackFloatingIPPool + testNamespace string + poolReconciler *OpenStackFloatingIPPoolReconciler + poolMockCtrl *gomock.Controller + poolMockFactory *scope.MockScopeFactory + testNum int + ) + + BeforeEach(func() { + testNum++ + testNamespace = fmt.Sprintf("pool-test-%d", testNum) + + testPool = &infrav1alpha1.OpenStackFloatingIPPool{ + TypeMeta: metav1.TypeMeta{ + APIVersion: infrav1alpha1.SchemeGroupVersion.Group + "/" + infrav1alpha1.SchemeGroupVersion.Version, + Kind: "OpenStackFloatingIPPool", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-pool", + Namespace: testNamespace, + }, + Spec: infrav1alpha1.OpenStackFloatingIPPoolSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + ReclaimPolicy: infrav1alpha1.ReclaimDelete, + }, + } + + input := framework.CreateNamespaceInput{ + Creator: k8sClient, + Name: testNamespace, + } + framework.CreateNamespace(ctx, input) + + poolMockCtrl = gomock.NewController(GinkgoT()) + poolMockFactory = scope.NewMockScopeFactory(poolMockCtrl, "") + poolReconciler = &OpenStackFloatingIPPoolReconciler{ + Client: k8sClient, + ScopeFactory: poolMockFactory, + } + }) + + AfterEach(func() { + orphan := metav1.DeletePropagationOrphan + deleteOptions := client.DeleteOptions{ + PropagationPolicy: &orphan, + } + + // Remove finalizers and delete openstackfloatingippool + patchHelper, err := patch.NewHelper(testPool, k8sClient) + Expect(err).To(BeNil()) + testPool.SetFinalizers([]string{}) + err = patchHelper.Patch(ctx, testPool) + Expect(err).To(BeNil()) + err = k8sClient.Delete(ctx, testPool, &deleteOptions) + Expect(err).To(BeNil()) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when credentials secret is missing", func() { + testPool.SetName("missing-pool-credentials") + testPool.Spec.IdentityRef = infrav1.OpenStackIdentityReference{ + Type: "Secret", + Name: "non-existent-secret", + CloudName: "openstack", + } + + err := k8sClient.Create(ctx, testPool) + Expect(err).To(BeNil()) + + credentialsErr := fmt.Errorf("secret not found: non-existent-secret") + poolMockFactory.SetClientScopeCreateError(credentialsErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testPool.Name, + Namespace: testPool.Namespace, + }, + } + result, err := poolReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(credentialsErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackFloatingIPPool to verify the condition was set + updatedPool := &infrav1alpha1.OpenStackFloatingIPPool{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testPool.Name, Namespace: testPool.Namespace}, updatedPool)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedPool, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedPool, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when namespace is denied access to ClusterIdentity", func() { + testPool.SetName("identity-access-denied-pool") + testPool.Spec.IdentityRef = infrav1.OpenStackIdentityReference{ + Type: "ClusterIdentity", + Name: "test-cluster-identity", + CloudName: "openstack", + } + + err := k8sClient.Create(ctx, testPool) + Expect(err).To(BeNil()) + + identityAccessErr := &scope.IdentityAccessDeniedError{ + IdentityName: "test-cluster-identity", + RequesterNamespace: testNamespace, + } + poolMockFactory.SetClientScopeCreateError(identityAccessErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testPool.Name, + Namespace: testPool.Namespace, + }, + } + result, err := poolReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(identityAccessErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackFloatingIPPool to verify the condition was set + updatedPool := &infrav1alpha1.OpenStackFloatingIPPool{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testPool.Name, Namespace: testPool.Namespace}, updatedPool)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedPool, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedPool, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) +}) diff --git a/controllers/openstackmachine_controller.go b/controllers/openstackmachine_controller.go index 725b24b11..90f5bc1bb 100644 --- a/controllers/openstackmachine_controller.go +++ b/controllers/openstackmachine_controller.go @@ -25,16 +25,16 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" - v1beta1conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/cluster-api/util/predicates" ctrl "sigs.k8s.io/controller-runtime" @@ -46,18 +46,19 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/compute" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/loadbalancer" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" + controllers "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/controllers" capoerrors "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" ) // OpenStackMachineReconciler reconciles a OpenStackMachine object. type OpenStackMachineReconciler struct { Client client.Client - Recorder record.EventRecorder + Recorder events.EventRecorder WatchFilterValue string ScopeFactory scope.Factory CaCertificates []byte // PEM encoded ca certificates. @@ -122,7 +123,7 @@ func (r *OpenStackMachineReconciler) Reconcile(ctx context.Context, req ctrl.Req return ctrl.Result{}, nil } - infraCluster, err := r.getInfraCluster(ctx, cluster, openStackMachine) + infraCluster, err := controllers.GetInfraCluster(ctx, r.Client, cluster) if err != nil { return ctrl.Result{}, errors.New("error getting infra provider cluster") } @@ -149,8 +150,19 @@ func (r *OpenStackMachineReconciler) Reconcile(ctx context.Context, req ctrl.Req clientScope, err := r.ScopeFactory.NewClientScopeFromObject(ctx, r.Client, r.CaCertificates, log, openStackMachine, infraCluster) if err != nil { + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackAuthenticationFailedReason, + Message: fmt.Sprintf("Failed to create OpenStack client scope: %v", err), + }) return reconcile.Result{}, err } + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) scope := scope.NewWithLogger(clientScope, log) clusterResourceName := fmt.Sprintf("%s-%s", cluster.Namespace, cluster.Name) @@ -164,28 +176,15 @@ func (r *OpenStackMachineReconciler) Reconcile(ctx context.Context, req ctrl.Req return r.reconcileNormal(ctx, scope, clusterResourceName, infraCluster, machine, openStackMachine) } -func patchMachine(ctx context.Context, patchHelper *patch.Helper, openStackMachine *infrav1.OpenStackMachine, machine *clusterv1.Machine, options ...patch.Option) error { - // Always update the readyCondition by summarizing the state of other conditions. - applicableConditions := []clusterv1beta1.ConditionType{ - infrav1.InstanceReadyCondition, - } - - if util.IsControlPlaneMachine(machine) { - applicableConditions = append(applicableConditions, infrav1.APIServerIngressReadyCondition) - } - - v1beta1conditions.SetSummary(openStackMachine, - v1beta1conditions.WithConditions(applicableConditions...), - ) - +func patchMachine(ctx context.Context, patchHelper *patch.Helper, openStackMachine *infrav1.OpenStackMachine, _ *clusterv1.Machine, options ...patch.Option) error { // Patch the object, ignoring conflicts on the conditions owned by this controller. // Also, if requested, we are adding additional options like e.g. Patch ObservedGeneration when issuing the // patch at the end of the reconcile loop. options = append(options, patch.WithOwnedConditions{Conditions: []string{ clusterv1.ReadyCondition, - string(infrav1.InstanceReadyCondition), - string(infrav1.APIServerIngressReadyCondition), + infrav1.InstanceReadyCondition, + infrav1.APIServerIngressReadyCondition, }}, ) return patchHelper.Patch(ctx, openStackMachine, options...) @@ -233,8 +232,8 @@ func (r *OpenStackMachineReconciler) reconcileDelete(ctx context.Context, scope return ctrl.Result{}, err } - // Nothing to do if the cluster is not ready because no machine resources were created. - if !openStackCluster.Status.Ready || openStackCluster.Status.Network == nil { + // Nothing to do if the cluster infrastructure was never provisioned because no machine resources were created. + if openStackCluster.Status.Initialization == nil || !openStackCluster.Status.Initialization.Provisioned || openStackCluster.Status.Network == nil { // The finalizer should not have been added yet in this case, // but the following handles the upgrade case. controllerutil.RemoveFinalizer(openStackMachine, infrav1.MachineFinalizer) @@ -263,7 +262,12 @@ func (r *OpenStackMachineReconciler) reconcileDelete(ctx context.Context, scope if machineServer != nil { scope.Logger().Info("Deleting server", "name", machineServer.Name) if err := r.Client.Delete(ctx, machineServer); err != nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.InstanceReadyCondition, infrav1.InstanceDeleteFailedReason, clusterv1beta1.ConditionSeverityError, "Deleting instance failed: %v", err) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeleteFailedReason, + Message: fmt.Sprintf("Deleting instance failed: %v", err), + }) return ctrl.Result{}, err } // If the server was found, we need to wait for it to be deleted before @@ -286,7 +290,12 @@ func removeAPIServerEndpoint(scope *scope.WithLogger, openStackCluster *infrav1. err = loadBalancerService.DeleteLoadBalancerMember(openStackCluster, openStackMachine, clusterResourceName) if err != nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.LoadBalancerMemberErrorReason, clusterv1beta1.ConditionSeverityWarning, "Machine could not be removed from load balancer: %v", err) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.LoadBalancerMemberErrorReason, + Message: fmt.Sprintf("Machine could not be removed from load balancer: %v", err), + }) return err } return nil @@ -300,10 +309,12 @@ func removeAPIServerEndpoint(scope *scope.WithLogger, openStackCluster *infrav1. if openStackCluster.Spec.APIServerFloatingIP == nil && instanceStatus != nil { instanceNS, err := instanceStatus.NetworkStatus() if err != nil { - openStackMachine.SetFailure( - capoerrors.DeprecatedCAPIUpdateMachineError, - fmt.Errorf("get network status for OpenStack instance %s with ID %s: %v", instanceStatus.Name(), instanceStatus.ID(), err), - ) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackErrorReason, + Message: fmt.Sprintf("get network status for OpenStack instance %s with ID %s: %v", instanceStatus.Name(), instanceStatus.ID(), err), + }) return nil } @@ -316,7 +327,12 @@ func removeAPIServerEndpoint(scope *scope.WithLogger, openStackCluster *infrav1. for _, address := range addresses { if address.Type == corev1.NodeExternalIP { if err = networkingService.DeleteFloatingIP(openStackMachine, address.Address); err != nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.FloatingIPErrorReason, clusterv1beta1.ConditionSeverityError, "Deleting floating IP failed: %v", err) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingIPErrorReason, + Message: fmt.Sprintf("Deleting floating IP failed: %v", err), + }) return fmt.Errorf("delete floating IP %q: %w", address.Address, err) } } @@ -338,22 +354,31 @@ func GetPortIDs(ports []infrav1.PortStatus) []string { func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope *scope.WithLogger, clusterResourceName string, openStackCluster *infrav1.OpenStackCluster, machine *clusterv1.Machine, openStackMachine *infrav1.OpenStackMachine) (_ ctrl.Result, reterr error) { var err error - // If the OpenStackMachine is in an error state, return early. - if openStackMachine.Status.FailureReason != nil || openStackMachine.Status.FailureMessage != nil { - scope.Logger().Info("Not reconciling machine in failed state. See openStackMachine.status.failureReason, openStackMachine.status.failureMessage, or previously logged error for details") + // If the OpenStackMachine has a terminal error condition, return early. + readyCond := conditions.Get(openStackMachine, clusterv1.ReadyCondition) + if readyCond != nil && readyCond.Status == metav1.ConditionFalse && readyCond.Reason == infrav1.InstanceStateErrorReason { + scope.Logger().Info("Not reconciling machine in failed state. See openStackMachine.status.conditions or previously logged error for details") return ctrl.Result{}, nil } - if !openStackCluster.Status.Ready { + if openStackCluster.Status.Initialization == nil || !openStackCluster.Status.Initialization.Provisioned { scope.Logger().Info("Cluster infrastructure is not ready yet, re-queuing machine") - v1beta1conditions.MarkFalse(openStackMachine, infrav1.InstanceReadyCondition, infrav1.WaitingForClusterInfrastructureReason, clusterv1beta1.ConditionSeverityInfo, "") + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.WaitingForClusterInfrastructureReason, + }) return ctrl.Result{RequeueAfter: waitForClusterInfrastructureReadyDuration}, nil } // Make sure bootstrap data is available and populated. if machine.Spec.Bootstrap.DataSecretName == nil { scope.Logger().Info("Bootstrap data secret reference is not yet available") - v1beta1conditions.MarkFalse(openStackMachine, infrav1.InstanceReadyCondition, infrav1.WaitingForBootstrapDataReason, clusterv1beta1.ConditionSeverityInfo, "") + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.WaitingForBootstrapDataReason, + }) return ctrl.Result{}, nil } @@ -363,11 +388,21 @@ func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope scope.Logger().Info("Reconciling Machine") - machineServer, waitingForServer, err := r.reconcileMachineServer(ctx, scope, openStackMachine, openStackCluster, machine) - if err != nil || waitingForServer { + machineServer, err := r.reconcileMachineServer(ctx, scope, openStackMachine, openStackCluster, machine) + if err != nil { return ctrl.Result{}, err } + // Reconcile machine state early to propagate any errors from the OpenStackServer + // (e.g., image not found, instance creation failed) to the OpenStackMachine. + // This must happen before checking server readiness to ensure error states are visible. + result := r.reconcileMachineState(scope, openStackMachine, machine, machineServer) + if result != nil { + return *result, nil + } + + // At this point the instance is ACTIVE. We can proceed with the rest of the reconciliation. + computeService, err := compute.NewService(scope) if err != nil { return ctrl.Result{}, err @@ -381,8 +416,18 @@ func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope } if instanceStatus == nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.InstanceReadyCondition, infrav1.InstanceDeletedReason, clusterv1beta1.ConditionSeverityError, infrav1.ServerUnexpectedDeletedMessage) - openStackMachine.SetFailure(capoerrors.DeprecatedCAPIUpdateMachineError, errors.New(infrav1.ServerUnexpectedDeletedMessage)) //nolint:staticcheck // This error is not used as an error + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeletedReason, + Message: infrav1.ServerUnexpectedDeletedMessage, + }) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeletedReason, + Message: infrav1.ServerUnexpectedDeletedMessage, + }) return ctrl.Result{}, nil } @@ -408,12 +453,11 @@ func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope return ctrl.Result{}, err } - v1beta1conditions.MarkTrue(openStackMachine, infrav1.APIServerIngressReadyCondition) - } - - result := r.reconcileMachineState(scope, openStackMachine, machine, machineServer) - if result != nil { - return *result, nil + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) } scope.Logger().Info("Reconciled Machine create successfully") @@ -422,12 +466,53 @@ func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope // reconcileMachineState updates the conditions of the OpenStackMachine instance based on the instance state // and sets the ProviderID and Ready fields when the instance is active. -// It returns a reconcile request if the instance is not yet active. -func (r *OpenStackMachineReconciler) reconcileMachineState(scope *scope.WithLogger, openStackMachine *infrav1.OpenStackMachine, machine *clusterv1.Machine, openStackServer *infrav1alpha1.OpenStackServer) *ctrl.Result { +// It returns a reconcile request if the instance is not yet active or in an error state. +func (r *OpenStackMachineReconciler) reconcileMachineState(scope *scope.WithLogger, openStackMachine *infrav1.OpenStackMachine, _ *clusterv1.Machine, openStackServer *infrav1alpha1.OpenStackServer) *ctrl.Result { + // Handle the case where the instance state is not yet available. + // This can happen when the server is still being created or when + // there was an error during resource resolution (e.g., image not found). + if openStackServer.Status.InstanceState == nil { + scope.Logger().Info("Waiting for OpenStackServer instance state", "name", openStackServer.Name) + + if condition := meta.FindStatusCondition(openStackServer.Status.Conditions, infrav1.InstanceReadyCondition); condition != nil && condition.Status == metav1.ConditionFalse { + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: condition.Reason, + Message: condition.Message, + }) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: condition.Reason, + Message: condition.Message, + }) + return &ctrl.Result{RequeueAfter: waitForBuildingInstanceToReconcile} + } + + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Waiting for instance to be created", + }) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Waiting for instance to be created", + }) + return &ctrl.Result{RequeueAfter: waitForBuildingInstanceToReconcile} + } + switch *openStackServer.Status.InstanceState { case infrav1.InstanceStateActive: scope.Logger().Info("Machine instance state is ACTIVE", "id", openStackServer.Status.InstanceID) - v1beta1conditions.MarkTrue(openStackMachine, infrav1.InstanceReadyCondition) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) // Set properties required by CAPI machine controller var region string @@ -436,31 +521,85 @@ func (r *OpenStackMachineReconciler) reconcileMachineState(scope *scope.WithLogg } openStackMachine.Spec.ProviderID = ptr.To(fmt.Sprintf("openstack://%s/%s", region, *openStackServer.Status.InstanceID)) openStackMachine.Status.InstanceID = openStackServer.Status.InstanceID - openStackMachine.Status.Ready = true + + // Set initialization.provisioned to true when initial infrastructure provisioning is complete. + // This field should only be set once and never changed afterward, as per CAPI v1beta2 contract. + // We set it here when the machine becomes ACTIVE for the first time. + if openStackMachine.Status.Initialization == nil { + openStackMachine.Status.Initialization = &infrav1.MachineInitialization{} + } + if !openStackMachine.Status.Initialization.Provisioned { + openStackMachine.Status.Initialization.Provisioned = true + scope.Logger().Info("Initial machine infrastructure provisioning completed") + } + + // Set the Ready condition to True when infrastructure is ready. + // This condition surfaces into Machine's status.conditions[InfrastructureReady]. + // It reflects the current operational state of the machine infrastructure. + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) case infrav1.InstanceStateError: - // If the machine has a NodeRef then it must have been working at some point, - // so the error could be something temporary. - // If not, it is more likely a configuration error so we set failure and never retry. scope.Logger().Info("Machine instance state is ERROR", "id", openStackServer.Status.InstanceID) - if !machine.Status.NodeRef.IsDefined() { - err := fmt.Errorf("instance state %v is unexpected", openStackServer.Status.InstanceState) - openStackMachine.SetFailure(capoerrors.DeprecatedCAPIUpdateMachineError, err) - } - v1beta1conditions.MarkFalse(openStackMachine, infrav1.InstanceReadyCondition, infrav1.InstanceStateErrorReason, clusterv1beta1.ConditionSeverityError, "") + errorMessage := "Instance is in ERROR state" + if condition := meta.FindStatusCondition(openStackServer.Status.Conditions, infrav1.InstanceReadyCondition); condition != nil && condition.Message != "" { + errorMessage = condition.Message + } + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + Message: errorMessage, + }) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + Message: errorMessage, + }) return &ctrl.Result{} case infrav1.InstanceStateDeleted: // we should avoid further actions for DELETED VM scope.Logger().Info("Machine instance state is DELETED, no actions") - v1beta1conditions.MarkFalse(openStackMachine, infrav1.InstanceReadyCondition, infrav1.InstanceDeletedReason, clusterv1beta1.ConditionSeverityError, "") + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeletedReason, + }) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeletedReason, + Message: "Instance has been deleted", + }) return &ctrl.Result{} case infrav1.InstanceStateBuild, infrav1.InstanceStateUndefined: scope.Logger().Info("Waiting for instance to become ACTIVE", "id", openStackServer.Status.InstanceID, "status", openStackServer.Status.InstanceState) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Instance is building", + }) return &ctrl.Result{RequeueAfter: waitForBuildingInstanceToReconcile} default: // The other state is normal (for example, migrating, shutoff) but we don't want to proceed until it's ACTIVE // due to potential conflict or unexpected actions scope.Logger().Info("Waiting for instance to become ACTIVE", "id", openStackServer.Status.InstanceID, "status", openStackServer.Status.InstanceState) - v1beta1conditions.MarkUnknown(openStackMachine, infrav1.InstanceReadyCondition, infrav1.InstanceNotReadyReason, "Instance state is not handled: %v", ptr.Deref(openStackServer.Status.InstanceState, infrav1.InstanceStateUndefined)) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionUnknown, + Reason: infrav1.InstanceNotReadyReason, + Message: fmt.Sprintf("Instance state is not handled: %v", ptr.Deref(openStackServer.Status.InstanceState, infrav1.InstanceStateUndefined)), + }) + conditions.Set(openStackMachine, metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionUnknown, + Reason: infrav1.InstanceNotReadyReason, + Message: fmt.Sprintf("Instance state is: %v", ptr.Deref(openStackServer.Status.InstanceState, infrav1.InstanceStateUndefined)), + }) return &ctrl.Result{RequeueAfter: waitForInstanceBecomeActiveToReconcile} } @@ -576,22 +715,18 @@ func openStackMachineSpecToOpenStackServerSpec(openStackMachineSpec *infrav1.Ope } // reconcileMachineServer reconciles the OpenStackServer object for the OpenStackMachine. -// It returns the OpenStackServer object and a boolean indicating if the OpenStackServer is ready. -func (r *OpenStackMachineReconciler) reconcileMachineServer(ctx context.Context, scope *scope.WithLogger, openStackMachine *infrav1.OpenStackMachine, openStackCluster *infrav1.OpenStackCluster, machine *clusterv1.Machine) (*infrav1alpha1.OpenStackServer, bool, error) { - var server *infrav1alpha1.OpenStackServer +// It returns the OpenStackServer object. The caller should check the server status +// using reconcileMachineState to handle different server states appropriately. +func (r *OpenStackMachineReconciler) reconcileMachineServer(ctx context.Context, scope *scope.WithLogger, openStackMachine *infrav1.OpenStackMachine, openStackCluster *infrav1.OpenStackCluster, machine *clusterv1.Machine) (*infrav1alpha1.OpenStackServer, error) { server, err := r.getOrCreateMachineServer(ctx, openStackCluster, openStackMachine, machine) if err != nil { // If an error occurs while getting or creating the OpenStackServer, // we won't requeue the request so reconcileNormal can add conditions to the OpenStackMachine // and we can see the error in the logs. scope.Logger().Error(err, "Failed to get or create OpenStackServer") - return server, false, err + return server, err } - if !server.Status.Ready { - scope.Logger().Info("Waiting for OpenStackServer to be ready", "name", server.Name) - return server, true, nil - } - return server, false, nil + return server, nil } // getOrCreateMachineServer gets or creates the OpenStackServer object for the OpenStackMachine. @@ -666,7 +801,12 @@ func (r *OpenStackMachineReconciler) reconcileAPIServerLoadBalancer(scope *scope if openStackCluster.Spec.APIServerLoadBalancer.IsEnabled() { err = r.reconcileLoadBalancerMember(scope, openStackCluster, openStackMachine, instanceNS, clusterResourceName) if err != nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.LoadBalancerMemberErrorReason, clusterv1beta1.ConditionSeverityError, "Reconciling load balancer member failed: %v", err) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.LoadBalancerMemberErrorReason, + Message: fmt.Sprintf("Reconciling load balancer member failed: %v", err), + }) return fmt.Errorf("reconcile load balancer member: %w", err) } } else if !ptr.Deref(openStackCluster.Spec.DisableAPIServerFloatingIP, false) && !ptr.Deref(openStackCluster.Spec.DisableExternalNetwork, false) { @@ -679,12 +819,22 @@ func (r *OpenStackMachineReconciler) reconcileAPIServerLoadBalancer(scope *scope } fp, err := networkingService.GetOrCreateFloatingIP(openStackMachine, openStackCluster, clusterResourceName, floatingIPAddress) if err != nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.FloatingIPErrorReason, clusterv1beta1.ConditionSeverityError, "Floating IP cannot be obtained or created: %v", err) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingIPErrorReason, + Message: fmt.Sprintf("Floating IP cannot be obtained or created: %v", err), + }) return fmt.Errorf("get or create floating IP %v: %w", floatingIPAddress, err) } port, err := computeService.GetManagementPort(openStackCluster, instanceStatus) if err != nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.FloatingIPErrorReason, clusterv1beta1.ConditionSeverityError, "Obtaining management port for control plane machine failed: %v", err) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingIPErrorReason, + Message: fmt.Sprintf("Obtaining management port for control plane machine failed: %v", err), + }) return fmt.Errorf("get management port for control plane machine: %w", err) } @@ -693,12 +843,21 @@ func (r *OpenStackMachineReconciler) reconcileAPIServerLoadBalancer(scope *scope } else { err = networkingService.AssociateFloatingIP(openStackMachine, fp, port.ID) if err != nil { - v1beta1conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.FloatingIPErrorReason, clusterv1beta1.ConditionSeverityError, "Associating floating IP failed: %v", err) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingIPErrorReason, + Message: fmt.Sprintf("Associating floating IP failed: %v", err), + }) return fmt.Errorf("associate floating IP %q with port %q: %w", fp.FloatingIP, port.ID, err) } } } - v1beta1conditions.MarkTrue(openStackMachine, infrav1.APIServerIngressReadyCondition) + conditions.Set(openStackMachine, metav1.Condition{ + Type: infrav1.APIServerIngressReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) return nil } @@ -804,15 +963,3 @@ func (r *OpenStackMachineReconciler) requestsForCluster(ctx context.Context, log } return result } - -func (r *OpenStackMachineReconciler) getInfraCluster(ctx context.Context, cluster *clusterv1.Cluster, openStackMachine *infrav1.OpenStackMachine) (*infrav1.OpenStackCluster, error) { - openStackCluster := &infrav1.OpenStackCluster{} - openStackClusterName := client.ObjectKey{ - Namespace: openStackMachine.Namespace, - Name: cluster.Spec.InfrastructureRef.Name, - } - if err := r.Client.Get(ctx, openStackClusterName, openStackCluster); err != nil { - return nil, err - } - return openStackCluster, nil -} diff --git a/controllers/openstackmachine_controller_test.go b/controllers/openstackmachine_controller_test.go index 78bf6f693..9f4e62e91 100644 --- a/controllers/openstackmachine_controller_test.go +++ b/controllers/openstackmachine_controller_test.go @@ -17,14 +17,29 @@ limitations under the License. package controllers import ( + "context" + "fmt" "reflect" "testing" + "github.com/go-logr/logr" + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive + "go.uber.org/mock/gomock" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/utils/ptr" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/test/framework" + conditions "sigs.k8s.io/cluster-api/util/conditions" + "sigs.k8s.io/cluster-api/util/patch" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/reconcile" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) const ( @@ -42,6 +57,7 @@ const ( flavorName = "test-flavor" sshKeyName = "test-ssh-key" failureDomain = "test-failure-domain" + testInstanceID = "test-instance-id-12345" ) func TestOpenStackMachineSpecToOpenStackServerSpec(t *testing.T) { @@ -428,3 +444,528 @@ func TestGetPortIDs(t *testing.T) { }) } } + +func TestReconcileMachineState(t *testing.T) { //nolint:gocyclo,cyclop // this is test code + tests := []struct { + name string + instanceState *infrav1.InstanceState + serverConditions []metav1.Condition + expectRequeue bool + expectedInstanceReadyCondition *metav1.Condition + expectedReadyCondition *metav1.Condition + expectInitializationProvisioned bool + }{ + { + name: "Nil InstanceState with DependencyFailed condition propagates error to machine", + instanceState: nil, + serverConditions: []metav1.Condition{ + { + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.DependencyFailedReason, + Message: "Failed to resolve server spec: image not found", + }, + }, + expectRequeue: true, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.DependencyFailedReason, + Message: "Failed to resolve server spec: image not found", + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.DependencyFailedReason, + Message: "Failed to resolve server spec: image not found", + }, + }, + { + name: "Nil InstanceState with InstanceNotReady condition propagates info to machine", + instanceState: nil, + serverConditions: []metav1.Condition{ + { + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Waiting for dependencies", + }, + }, + expectRequeue: true, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Waiting for dependencies", + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Waiting for dependencies", + }, + }, + { + name: "Nil InstanceState with no server condition sets default waiting conditions", + instanceState: nil, + expectRequeue: true, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Waiting for instance to be created", + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: "Waiting for instance to be created", + }, + }, + { + name: "Instance state ACTIVE sets conditions to True and initialization.provisioned", + instanceState: ptr.To(infrav1.InstanceStateActive), + expectRequeue: false, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionTrue, + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionTrue, + }, + expectInitializationProvisioned: true, + }, + { + name: "Instance state ERROR sets conditions to False", + instanceState: ptr.To(infrav1.InstanceStateError), + expectRequeue: true, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + }, + }, + { + name: "Instance state ERROR propagates error message from server condition", + instanceState: ptr.To(infrav1.InstanceStateError), + serverConditions: []metav1.Condition{ + { + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + Message: "Server entered ERROR state: No valid host was found", + }, + }, + expectRequeue: true, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + Message: "Server entered ERROR state: No valid host was found", + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + Message: "Server entered ERROR state: No valid host was found", + }, + }, + { + name: "Instance state DELETED sets conditions to False", + instanceState: ptr.To(infrav1.InstanceStateDeleted), + expectRequeue: true, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeletedReason, + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeletedReason, + }, + }, + { + name: "Instance state BUILD sets ReadyCondition to False", + instanceState: ptr.To(infrav1.InstanceStateBuild), + expectRequeue: true, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + }, + }, + { + name: "Instance state SHUTOFF sets conditions to Unknown", + instanceState: ptr.To(infrav1.InstanceStateShutoff), + expectRequeue: true, + expectedInstanceReadyCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionUnknown, + Reason: infrav1.InstanceNotReadyReason, + }, + expectedReadyCondition: &metav1.Condition{ + Type: clusterv1.ReadyCondition, + Status: metav1.ConditionUnknown, + Reason: infrav1.InstanceNotReadyReason, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + openStackMachine := &infrav1.OpenStackMachine{ + ObjectMeta: metav1.ObjectMeta{ + Name: openStackMachineName, + Namespace: namespace, + }, + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To(flavorName), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("test-image"), + }, + }, + }, + } + + machine := &clusterv1.Machine{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-machine", + Namespace: namespace, + }, + } + openStackServer := &infrav1alpha1.OpenStackServer{ + ObjectMeta: metav1.ObjectMeta{ + Name: openStackMachineName, + Namespace: namespace, + }, + Status: infrav1alpha1.OpenStackServerStatus{ + InstanceID: ptr.To(testInstanceID), + InstanceState: tt.instanceState, + }, + } + + // Set any pre-existing conditions on the OpenStackServer + openStackServer.Status.Conditions = tt.serverConditions + + r := &OpenStackMachineReconciler{} + result := r.reconcileMachineState(scope.NewWithLogger(nil, logr.Discard()), openStackMachine, machine, openStackServer) + + // Check requeue + if tt.expectRequeue && result == nil { + t.Errorf("expected requeue result, got nil") + } + if !tt.expectRequeue && result != nil { + t.Errorf("expected no requeue, got %v", result) + } + + // Check InstanceReadyCondition + if tt.expectedInstanceReadyCondition != nil { + condition := conditions.Get(openStackMachine, tt.expectedInstanceReadyCondition.Type) + if condition == nil { + t.Errorf("expected %s condition to be set", tt.expectedInstanceReadyCondition.Type) + } else { + if condition.Status != tt.expectedInstanceReadyCondition.Status { + t.Errorf("expected %s status %s, got %s", tt.expectedInstanceReadyCondition.Type, tt.expectedInstanceReadyCondition.Status, condition.Status) + } + if tt.expectedInstanceReadyCondition.Reason != "" && condition.Reason != tt.expectedInstanceReadyCondition.Reason { + t.Errorf("expected %s reason %s, got %s", tt.expectedInstanceReadyCondition.Type, tt.expectedInstanceReadyCondition.Reason, condition.Reason) + } + if tt.expectedInstanceReadyCondition.Message != "" && condition.Message != tt.expectedInstanceReadyCondition.Message { + t.Errorf("expected %s message %q, got %q", tt.expectedInstanceReadyCondition.Type, tt.expectedInstanceReadyCondition.Message, condition.Message) + } + } + } + + // Check ReadyCondition + if tt.expectedReadyCondition != nil { + condition := conditions.Get(openStackMachine, tt.expectedReadyCondition.Type) + if condition == nil { + t.Errorf("expected %s condition to be set", tt.expectedReadyCondition.Type) + } else { + if condition.Status != tt.expectedReadyCondition.Status { + t.Errorf("expected %s status %s, got %s", tt.expectedReadyCondition.Type, tt.expectedReadyCondition.Status, condition.Status) + } + if tt.expectedReadyCondition.Reason != "" && condition.Reason != tt.expectedReadyCondition.Reason { + t.Errorf("expected %s reason %s, got %s", tt.expectedReadyCondition.Type, tt.expectedReadyCondition.Reason, condition.Reason) + } + if tt.expectedReadyCondition.Message != "" && condition.Message != tt.expectedReadyCondition.Message { + t.Errorf("expected %s message %q, got %q", tt.expectedReadyCondition.Type, tt.expectedReadyCondition.Message, condition.Message) + } + } + } + + // Check initialization.provisioned + if tt.expectInitializationProvisioned { + if openStackMachine.Status.Initialization == nil || !openStackMachine.Status.Initialization.Provisioned { + t.Errorf("expected Initialization.Provisioned to be true") + } + } + + // Note: v1beta2 doesn't have FailureReason/FailureMessage fields + // Failures are now communicated via conditions only + // So we skip the failure field checks for v1beta2 + }) + } +} + +var _ = Describe("OpenStackMachine controller", func() { + var ( + testMachine *infrav1.OpenStackMachine + capiMachine *clusterv1.Machine + capiCluster *clusterv1.Cluster + testCluster *infrav1.OpenStackCluster + testNamespace string + machineReconciler *OpenStackMachineReconciler + machineMockCtrl *gomock.Controller + machineMockFactory *scope.MockScopeFactory + testNum int + ) + + testClusterName := "test-cluster" + testMachineName := "test-machine" + capiMachineName := "capi-machine" + + BeforeEach(func() { + ctx = context.TODO() + testNum++ + testNamespace = fmt.Sprintf("machine-test-%d", testNum) + + testCluster = &infrav1.OpenStackCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: infrav1.SchemeGroupVersion.Group + "/" + infrav1.SchemeGroupVersion.Version, + Kind: "OpenStackCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: testClusterName, + Namespace: testNamespace, + OwnerReferences: []metav1.OwnerReference{ + { + APIVersion: clusterv1.GroupVersion.Group + "/" + clusterv1.GroupVersion.Version, + Kind: "Cluster", + Name: capiClusterName, + UID: types.UID("cluster-uid"), + }, + }, + }, + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + }, + Status: infrav1.OpenStackClusterStatus{}, + } + + capiCluster = &clusterv1.Cluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: clusterv1.GroupVersion.Group + "/" + clusterv1.GroupVersion.Version, + Kind: "Cluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: capiClusterName, + Namespace: testNamespace, + }, + Spec: clusterv1.ClusterSpec{ + InfrastructureRef: clusterv1.ContractVersionedObjectReference{ + APIGroup: infrav1.GroupName, + Kind: "OpenStackCluster", + Name: testClusterName, + }, + }, + } + + capiMachine = &clusterv1.Machine{ + TypeMeta: metav1.TypeMeta{ + APIVersion: clusterv1.GroupVersion.Group + "/" + clusterv1.GroupVersion.Version, + Kind: "Machine", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: capiMachineName, + Namespace: testNamespace, + Labels: map[string]string{ + clusterv1.ClusterNameLabel: capiClusterName, + }, + }, + } + + testMachine = &infrav1.OpenStackMachine{ + TypeMeta: metav1.TypeMeta{ + APIVersion: infrav1.SchemeGroupVersion.Group + "/" + infrav1.SchemeGroupVersion.Version, + Kind: "OpenStackMachine", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: testMachineName, + Namespace: testNamespace, + OwnerReferences: []metav1.OwnerReference{ + { + APIVersion: clusterv1.GroupVersion.Group + "/" + clusterv1.GroupVersion.Version, + Kind: "Machine", + Name: capiMachineName, + UID: types.UID("machine-uid"), + }, + }, + }, + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To(flavorName), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("test-image"), + }, + }, + }, + } + + input := framework.CreateNamespaceInput{ + Creator: k8sClient, + Name: testNamespace, + } + framework.CreateNamespace(ctx, input) + + machineMockCtrl = gomock.NewController(GinkgoT()) + machineMockFactory = scope.NewMockScopeFactory(machineMockCtrl, "") + machineReconciler = &OpenStackMachineReconciler{ + Client: k8sClient, + ScopeFactory: machineMockFactory, + } + }) + + AfterEach(func() { + orphan := metav1.DeletePropagationOrphan + deleteOptions := client.DeleteOptions{ + PropagationPolicy: &orphan, + } + + // Remove finalizers and delete openstackmachine + patchHelper, err := patch.NewHelper(testMachine, k8sClient) + Expect(err).To(BeNil()) + testMachine.SetFinalizers([]string{}) + err = patchHelper.Patch(ctx, testMachine) + Expect(err).To(BeNil()) + err = k8sClient.Delete(ctx, testMachine, &deleteOptions) + Expect(err).To(BeNil()) + + // Remove finalizers and delete openstackcluster + patchHelper, err = patch.NewHelper(testCluster, k8sClient) + Expect(err).To(BeNil()) + testCluster.SetFinalizers([]string{}) + err = patchHelper.Patch(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Delete(ctx, testCluster, &deleteOptions) + Expect(err).To(BeNil()) + + // Remove finalizers and delete cluster + patchHelper, err = patch.NewHelper(capiCluster, k8sClient) + Expect(err).To(BeNil()) + capiCluster.SetFinalizers([]string{}) + err = patchHelper.Patch(ctx, capiCluster) + Expect(err).To(BeNil()) + err = k8sClient.Delete(ctx, capiCluster, &deleteOptions) + Expect(err).To(BeNil()) + + // Remove finalizers and delete machine + patchHelper, err = patch.NewHelper(capiMachine, k8sClient) + Expect(err).To(BeNil()) + capiMachine.SetFinalizers([]string{}) + err = patchHelper.Patch(ctx, capiMachine) + Expect(err).To(BeNil()) + err = k8sClient.Delete(ctx, capiMachine, &deleteOptions) + Expect(err).To(BeNil()) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when credentials secret is missing", func() { + testMachine.SetName("missing-machine-credentials") + testMachine.Spec.IdentityRef = &infrav1.OpenStackIdentityReference{ + Type: "Secret", + Name: "non-existent-secret", + CloudName: "openstack", + } + + err := k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiMachine) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, testMachine) + Expect(err).To(BeNil()) + + credentialsErr := fmt.Errorf("secret not found: non-existent-secret") + machineMockFactory.SetClientScopeCreateError(credentialsErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testMachine.Name, + Namespace: testMachine.Namespace, + }, + } + result, err := machineReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(credentialsErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackMachine to verify the condition was set + updatedMachine := &infrav1.OpenStackMachine{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testMachine.Name, Namespace: testMachine.Namespace}, updatedMachine)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedMachine, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedMachine, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when namespace is denied access to ClusterIdentity", func() { + testMachine.SetName("identity-access-denied-machine") + testMachine.Spec.IdentityRef = &infrav1.OpenStackIdentityReference{ + Type: "ClusterIdentity", + Name: "test-cluster-identity", + CloudName: "openstack", + } + + err := k8sClient.Create(ctx, capiCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, capiMachine) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, testMachine) + Expect(err).To(BeNil()) + + identityAccessErr := &scope.IdentityAccessDeniedError{ + IdentityName: "test-cluster-identity", + RequesterNamespace: testNamespace, + } + machineMockFactory.SetClientScopeCreateError(identityAccessErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testMachine.Name, + Namespace: testMachine.Namespace, + }, + } + result, err := machineReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(identityAccessErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackMachine to verify the condition was set + updatedMachine := &infrav1.OpenStackMachine{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testMachine.Name, Namespace: testMachine.Namespace}, updatedMachine)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedMachine, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedMachine, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) +}) diff --git a/controllers/openstackmachinetemplate_controller.go b/controllers/openstackmachinetemplate_controller.go new file mode 100644 index 000000000..993d0cd74 --- /dev/null +++ b/controllers/openstackmachinetemplate_controller.go @@ -0,0 +1,235 @@ +/* +Copyright 2025 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package controllers + +import ( + "context" + "errors" + "fmt" + + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/client-go/tools/events" + "sigs.k8s.io/cluster-api/util" + "sigs.k8s.io/cluster-api/util/annotations" + conditions "sigs.k8s.io/cluster-api/util/conditions" + "sigs.k8s.io/cluster-api/util/patch" + "sigs.k8s.io/cluster-api/util/predicates" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/compute" + "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" + controllers "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/controllers" +) + +const imagePropertyForOS = "os_type" + +// Set here so we can easily mock it in tests. +var newComputeService = compute.NewService + +// OpenStackMachineTemplateReconciler reconciles a OpenStackMachineTemplate object. +// it only updates the .status field to allow auto-scaling. +type OpenStackMachineTemplateReconciler struct { + Client client.Client + Recorder events.EventRecorder + WatchFilterValue string + ScopeFactory scope.Factory + CaCertificates []byte // PEM encoded ca certificates. +} + +// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=openstackmachinetemplates,verbs=get;list;watch +// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=openstackmachinetemplates/status,verbs=get;update;patch + +func (r *OpenStackMachineTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, reterr error) { + log := ctrl.LoggerFrom(ctx) + + // Fetch the OpenStackMachine instance. + openStackMachineTemplate := &infrav1.OpenStackMachineTemplate{} + err := r.Client.Get(ctx, req.NamespacedName, openStackMachineTemplate) + if err != nil { + if apierrors.IsNotFound(err) { + return ctrl.Result{}, nil + } + return ctrl.Result{}, err + } + + log = log.WithValues("openStackMachineTemplate", openStackMachineTemplate.Name) + log.V(4).Info("Reconciling openStackMachineTemplate") + + // If OSMT is set for deletion, do nothing + if !openStackMachineTemplate.DeletionTimestamp.IsZero() { + log.Info("OpenStackMachineTemplate marked for deletion, skipping reconciliation") + return ctrl.Result{}, nil + } + + // Fetch the Cluster. + // OSMT can be a valid OSMT owned a running cluster OR a OSMT owned by a ClusterClass. + // We skip reconciliation on the latter as in this case OSMT.spec might have values that + // are patched by the CC and thus not valid. + cluster, err := util.GetOwnerCluster(ctx, r.Client, openStackMachineTemplate.ObjectMeta) + if err != nil || cluster == nil { + log.Info("openStackMachineTemplate is missing owner cluster or cluster does not exist") + return ctrl.Result{}, nil + } + + log = log.WithValues("cluster", cluster.Name) + + if annotations.IsPaused(cluster, openStackMachineTemplate) { + log.Info("OpenStackMachineTemplate or linked Cluster is marked as paused. Won't reconcile") + return ctrl.Result{}, nil + } + + infraCluster, err := controllers.GetInfraCluster(ctx, r.Client, cluster) + if err != nil { + return ctrl.Result{}, errors.New("error getting infra provider cluster") + } + if infraCluster == nil { + log.Info("OpenStackCluster not ready", "name", cluster.Spec.InfrastructureRef.Name) + return ctrl.Result{}, nil + } + + log = log.WithValues("openStackCluster", infraCluster.Name) + + // Initialize the patch helper + patchHelper, err := patch.NewHelper(openStackMachineTemplate, r.Client) + if err != nil { + return ctrl.Result{}, err + } + + // Always patch the openStackMachine when exiting this function so we can persist any OpenStackMachineTemplate changes. + defer func() { + if err := patchHelper.Patch(ctx, openStackMachineTemplate); err != nil { + log.Error(err, "Failed to patch OpenStackMachineTemplate after reconciliation") + result = ctrl.Result{} + reterr = kerrors.NewAggregate([]error{reterr, err}) + } + }() + + clientScope, err := r.ScopeFactory.NewClientScopeFromObject(ctx, r.Client, r.CaCertificates, log, openStackMachineTemplate, infraCluster) + if err != nil { + conditions.Set(openStackMachineTemplate, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackAuthenticationFailedReason, + Message: fmt.Sprintf("Failed to create OpenStack client scope: %v", err), + }) + return ctrl.Result{}, err + } + conditions.Set(openStackMachineTemplate, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) + scope := scope.NewWithLogger(clientScope, log) + + // Handle non-deleted OpenStackMachineTemplates + if err := r.reconcileNormal(ctx, scope, openStackMachineTemplate); err != nil { + return ctrl.Result{}, err + } + log.V(4).Info("Successfully reconciled OpenStackMachineTemplate") + return ctrl.Result{}, nil +} + +func (r *OpenStackMachineTemplateReconciler) reconcileNormal(ctx context.Context, scope *scope.WithLogger, openStackMachineTemplate *infrav1.OpenStackMachineTemplate) (reterr error) { + log := scope.Logger() + + computeService, err := newComputeService(scope) + if err != nil { + return err + } + + flavorID, err := computeService.GetFlavorID(openStackMachineTemplate.Spec.Template.Spec.FlavorID, openStackMachineTemplate.Spec.Template.Spec.Flavor) + if err != nil { + return err + } + + flavor, err := computeService.GetFlavor(flavorID) + if err != nil { + return err + } + + log.V(4).Info("Retrieved flavor details", "flavorID", flavorID) + + if openStackMachineTemplate.Status.Capacity == nil { + log.V(4).Info("Initializing status capacity map") + openStackMachineTemplate.Status.Capacity = corev1.ResourceList{} + } + + if flavor.VCPUs > 0 { + openStackMachineTemplate.Status.Capacity[corev1.ResourceCPU] = *resource.NewQuantity(int64(flavor.VCPUs), resource.DecimalSI) + } + + if flavor.RAM > 0 { + // flavor.RAM is in MiB -> convert to bytes + ramBytes := int64(flavor.RAM) * 1024 * 1024 + openStackMachineTemplate.Status.Capacity[corev1.ResourceMemory] = *resource.NewQuantity(ramBytes, resource.BinarySI) + } + + if flavor.Ephemeral > 0 { + // flavor.Ephemeral is in GiB -> convert to bytes + ephemeralBytes := int64(flavor.Ephemeral) * 1024 * 1024 * 1024 + openStackMachineTemplate.Status.Capacity[corev1.ResourceEphemeralStorage] = *resource.NewQuantity(ephemeralBytes, resource.BinarySI) + } + + // storage depends on whether user boots-from-volume or not + if openStackMachineTemplate.Spec.Template.Spec.RootVolume != nil && openStackMachineTemplate.Spec.Template.Spec.RootVolume.SizeGiB > 0 { + // RootVolume.SizeGib is in GiB -> convert to bytes + storageBytes := int64(openStackMachineTemplate.Spec.Template.Spec.RootVolume.SizeGiB) * 1024 * 1024 * 1024 + openStackMachineTemplate.Status.Capacity[corev1.ResourceStorage] = *resource.NewQuantity(storageBytes, resource.BinarySI) + } else if flavor.Disk > 0 { + // flavor.Disk is in GiB -> convert to bytes + storageBytes := int64(flavor.Disk) * 1024 * 1024 * 1024 + openStackMachineTemplate.Status.Capacity[corev1.ResourceStorage] = *resource.NewQuantity(storageBytes, resource.BinarySI) + } + + imageID, err := computeService.GetImageID(ctx, r.Client, openStackMachineTemplate.Namespace, openStackMachineTemplate.Spec.Template.Spec.Image) + if err != nil { + return err + } + + image, err := computeService.GetImageDetails(*imageID) + if err != nil { + return err + } + + log.V(4).Info("Retrieved image details", "imageID", imageID) + + if image.Properties != nil { + if v, ok := image.Properties[imagePropertyForOS]; ok { + if osType, ok := v.(string); ok { + openStackMachineTemplate.Status.NodeInfo.OperatingSystem = osType + } + } + } + + return nil +} + +func (r *OpenStackMachineTemplateReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error { + log := ctrl.LoggerFrom(ctx) + + return ctrl.NewControllerManagedBy(mgr). + WithOptions(options). + For(&infrav1.OpenStackMachineTemplate{}). + WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue)). + Complete(r) +} diff --git a/controllers/openstackmachinetemplate_controller_test.go b/controllers/openstackmachinetemplate_controller_test.go new file mode 100644 index 000000000..7bcbabbbf --- /dev/null +++ b/controllers/openstackmachinetemplate_controller_test.go @@ -0,0 +1,667 @@ +/* +Copyright 2025 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controllers + +import ( + "context" + "fmt" + "testing" + + "github.com/gophercloud/gophercloud/v2/openstack/compute/v2/flavors" + "github.com/gophercloud/gophercloud/v2/openstack/image/v2/images" + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive + "go.uber.org/mock/gomock" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/utils/ptr" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/test/framework" + capiannotations "sigs.k8s.io/cluster-api/util/annotations" + conditions "sigs.k8s.io/cluster-api/util/conditions" + "sigs.k8s.io/cluster-api/util/patch" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" +) + +var ( + flavorID = "661c21bc-be52-44e3-9d2e-8d1e11623b59" + imageID = "ce96e584-7ebc-46d6-9e55-987d72e3806c" +) + +func TestOpenStackMachineTemplateReconciler_Reconcile_UnhappyPaths(t *testing.T) { + ctx := context.Background() + + scheme := runtime.NewScheme() + _ = corev1.AddToScheme(scheme) + _ = clusterv1.AddToScheme(scheme) + _ = infrav1.AddToScheme(scheme) + + ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "test-ns"}} + + tests := []struct { + name string + reqName string + objects []client.Object + setup func(r *OpenStackMachineTemplateReconciler) + wantErr string + }{ + { + name: "object does not exist", + reqName: "does-not-exist", + objects: []client.Object{ns}, + }, + { + name: "marked for deletion", + reqName: "to-be-deleted", + objects: func() []client.Object { + tpl := newOSMT("to-be-deleted", "c1", false, false, true) + now := metav1.Now() + tpl.DeletionTimestamp = &now + tpl.Finalizers = []string{"test.finalizer.cluster.x-k8s.io"} + return []client.Object{ns, tpl} + }(), + }, + { + name: "missing cluster owner", + reqName: "no-cluster", + objects: []client.Object{ + ns, + func() *infrav1.OpenStackMachineTemplate { + tpl := newOSMT("no-cluster", "c1", false, false, false) + delete(tpl.Labels, clusterv1.ClusterNameLabel) + return tpl + }(), + }, + }, + { + name: "paused cluster", + reqName: "paused-cluster", + objects: []client.Object{ + ns, + newOSMT("paused-cluster", "paused-cluster", false, false, true), + newCluster("paused-cluster", "oscluster", true), + newOSCluster("oscluster"), + }, + }, + { + name: "paused tpl", + reqName: "paused-tpl", + objects: []client.Object{ + ns, + newOSMT("paused-tpl", "cluster", true, false, true), + newCluster("cluster", "oscluster", false), + newOSCluster("oscluster"), + }, + }, + { + name: "scope factory returns error", + reqName: "scope-error", + objects: []client.Object{ + ns, + newOSMT("scope-error", "c1", false, false, true), + newCluster("c1", "oscluster", false), + newOSCluster("oscluster"), + }, + setup: func(r *OpenStackMachineTemplateReconciler) { + mockCtrl := gomock.NewController(t) + mockScopeFactory := scope.NewMockScopeFactory(mockCtrl, "proj") + mockScopeFactory.SetClientScopeCreateError(fmt.Errorf("boom")) + r.ScopeFactory = mockScopeFactory + t.Cleanup(mockCtrl.Finish) + }, + wantErr: "boom", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + + cl := fake.NewClientBuilder(). + WithScheme(scheme). + WithObjects(tt.objects...). + Build() + + r := &OpenStackMachineTemplateReconciler{ + Client: cl, + ScopeFactory: nil, // set in setup when needed + } + + if tt.setup != nil { + tt.setup(r) + } + + req := ctrl.Request{ + NamespacedName: client.ObjectKey{ + Namespace: "test-ns", + Name: tt.reqName, + }, + } + + _, err := r.Reconcile(ctx, req) + if tt.wantErr == "" { + g.Expect(err).ToNot(HaveOccurred()) + } else { + g.Expect(err).To(HaveOccurred()) + g.Expect(err.Error()).To(ContainSubstring(tt.wantErr)) + } + }) + } +} + +func TestOpenStackMachineTemplateReconciler_reconcileNormal(t *testing.T) { + g := NewWithT(t) + ctx := context.Background() + + // --- Scheme setup --- + scheme := runtime.NewScheme() + g.Expect(corev1.AddToScheme(scheme)).To(Succeed()) + g.Expect(infrav1.AddToScheme(scheme)).To(Succeed()) + + type testCase struct { + name string + tpl *infrav1.OpenStackMachineTemplate + expect func(mf *scope.MockScopeFactory) + wantErr string + verify func(g Gomega, tpl *infrav1.OpenStackMachineTemplate) + } + + tests := []testCase{ + { + name: "error getting flavor details", + tpl: newOSMT("test-osmt", "test-cluster", false, false, true), + expect: func(mf *scope.MockScopeFactory) { + mf.ComputeClient. + EXPECT(). + GetFlavor(flavorID). + Return(nil, fmt.Errorf("flavor-details-error")) + }, + wantErr: "flavor-details-error", + }, + { + name: "error getting image details", + tpl: newOSMT("test-osmt", "test-cluster", false, false, true), + expect: func(mf *scope.MockScopeFactory) { + mf.ComputeClient. + EXPECT(). + GetFlavor(flavorID). + Return(&flavors.Flavor{ + VCPUs: 2, RAM: 1024, Disk: 5, Ephemeral: 1, + }, nil) + + mf.ImageClient. + EXPECT(). + GetImage(imageID). + Return(nil, fmt.Errorf("image-details-error")) + }, + wantErr: "image-details-error", + }, + { + name: "boot-from-image", + tpl: newOSMT("test-osmt", "test-cluster", false, false, true), + expect: func(mf *scope.MockScopeFactory) { + mf.ComputeClient. + EXPECT(). + GetFlavor(flavorID). + Return(&flavors.Flavor{ + VCPUs: 4, + RAM: 8192, + Disk: 50, + Ephemeral: 10, + }, nil) + + mf.ImageClient. + EXPECT(). + GetImage(imageID). + Return(&images.Image{ + ID: imageID, + Properties: map[string]any{ + imagePropertyForOS: "linux", + }, + }, nil) + }, + wantErr: "", + verify: func(g Gomega, tpl *infrav1.OpenStackMachineTemplate) { + // CPU = 4 cores + expCPU := *resource.NewQuantity(4, resource.DecimalSI) + g.Expect(tpl.Status.Capacity[corev1.ResourceCPU]).To(Equal(expCPU)) + + // Memory = 8192 MiB → bytes + ramBytes := int64(8192) * 1024 * 1024 + expMem := *resource.NewQuantity(ramBytes, resource.BinarySI) + g.Expect(tpl.Status.Capacity[corev1.ResourceMemory]).To(Equal(expMem)) + + // Ephemeral = 10 GiB → bytes + ephBytes := int64(10) * 1024 * 1024 * 1024 + expEph := *resource.NewQuantity(ephBytes, resource.BinarySI) + g.Expect(tpl.Status.Capacity[corev1.ResourceEphemeralStorage]).To(Equal(expEph)) + + // Storage = Disk = 50 GiB → bytes (because RootVolume is nil) + storageBytes := int64(50) * 1024 * 1024 * 1024 + expStorage := *resource.NewQuantity(storageBytes, resource.BinarySI) + g.Expect(tpl.Status.Capacity[corev1.ResourceStorage]).To(Equal(expStorage)) + + // OS property + g.Expect(tpl.Status.NodeInfo.OperatingSystem).To(Equal("linux")) + }, + }, + { + name: "boot-from-volume", + tpl: newOSMT("test-osmt", "test-cluster", false, true, true), + expect: func(mf *scope.MockScopeFactory) { + mf.ComputeClient. + EXPECT(). + GetFlavor(flavorID). + Return(&flavors.Flavor{ + VCPUs: 4, + RAM: 8192, + Disk: 50, + Ephemeral: 10, + }, nil) + + mf.ImageClient. + EXPECT(). + GetImage(imageID). + Return(&images.Image{ + ID: imageID, + Properties: map[string]any{ + imagePropertyForOS: "linux", + }, + }, nil) + }, + wantErr: "", + verify: func(g Gomega, tpl *infrav1.OpenStackMachineTemplate) { + // CPU = 4 cores + expCPU := *resource.NewQuantity(4, resource.DecimalSI) + g.Expect(tpl.Status.Capacity[corev1.ResourceCPU]).To(Equal(expCPU)) + + // Memory = 8192 MiB → bytes + ramBytes := int64(8192) * 1024 * 1024 + expMem := *resource.NewQuantity(ramBytes, resource.BinarySI) + g.Expect(tpl.Status.Capacity[corev1.ResourceMemory]).To(Equal(expMem)) + + // Ephemeral = 10 GiB → bytes + ephBytes := int64(10) * 1024 * 1024 * 1024 + expEph := *resource.NewQuantity(ephBytes, resource.BinarySI) + g.Expect(tpl.Status.Capacity[corev1.ResourceEphemeralStorage]).To(Equal(expEph)) + + // Storage = Disk = 100 GiB → bytes (because RootVolume is set) + storageBytes := int64(100) * 1024 * 1024 * 1024 + expStorage := *resource.NewQuantity(storageBytes, resource.BinarySI) + g.Expect(tpl.Status.Capacity[corev1.ResourceStorage]).To(Equal(expStorage)) + + // OS property + g.Expect(tpl.Status.NodeInfo.OperatingSystem).To(Equal("linux")) + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + + // fake k8s client (used by GetImageID) + k8sClient := fake.NewClientBuilder(). + WithScheme(scheme). + Build() + + // gomock controller + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + // CAPO's MockScopeFactory (this is the key) + mf := scope.NewMockScopeFactory(mockCtrl, "proj") + + // The scope this function expects: + log := ctrl.Log.WithName("test") + withLogger := scope.NewWithLogger(mf, log) + + // reconciler + r := &OpenStackMachineTemplateReconciler{ + Client: k8sClient, + ScopeFactory: mf, + } + + tpl := tt.tpl.DeepCopy() + + tt.expect(mf) + + err := r.reconcileNormal(ctx, withLogger, tpl) + + if tt.wantErr == "" { + g.Expect(err).ToNot(HaveOccurred()) + if tt.verify != nil { + tt.verify(g, tpl) + } + } else { + g.Expect(err).To(HaveOccurred()) + g.Expect(err.Error()).To(ContainSubstring(tt.wantErr)) + } + }) + } +} + +func newOSMT(name, clusterName string, paused bool, rootVolume bool, ownerRef bool) *infrav1.OpenStackMachineTemplate { + osmt := &infrav1.OpenStackMachineTemplate{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test-ns", + Name: name, + Labels: map[string]string{ + clusterv1.ClusterNameLabel: clusterName, + }, + }, + Spec: infrav1.OpenStackMachineTemplateSpec{ + Template: infrav1.OpenStackMachineTemplateResource{ + Spec: infrav1.OpenStackMachineSpec{ + FlavorID: ptr.To(flavorID), + Image: infrav1.ImageParam{ + ID: &imageID, + }, + }, + }, + }, + } + + if rootVolume { + osmt.Spec.Template.Spec.RootVolume = &infrav1.RootVolume{ + SizeGiB: 100, + } + } + + if ownerRef { + osmt.OwnerReferences = append(osmt.OwnerReferences, metav1.OwnerReference{ + APIVersion: clusterv1.GroupVersion.String(), + Kind: "Cluster", + Name: clusterName, + UID: types.UID("291655c1-d923-4b50-8a3b-d552c03e33a7"), + }) + } + + if paused { + capiannotations.AddAnnotations(osmt, map[string]string{ + clusterv1.PausedAnnotation: "true", + }) + } + + return osmt +} + +func newCluster(name, infraName string, paused bool) *clusterv1.Cluster { + c := &clusterv1.Cluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test-ns", + Name: name, + }, + Spec: clusterv1.ClusterSpec{ + InfrastructureRef: clusterv1.ContractVersionedObjectReference{ + APIGroup: infrav1.GroupName, + Kind: "OpenStackCluster", + Name: infraName, + }, + }, + } + if paused { + c.Spec.Paused = &paused + } + return c +} + +func newOSCluster(name string) *infrav1.OpenStackCluster { + return &infrav1.OpenStackCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test-ns", + Name: name, + }, + } +} + +var _ = Describe("OpenStackMachineTemplate controller", func() { + var ( + testOSMT *infrav1.OpenStackMachineTemplate + testCluster *clusterv1.Cluster + testOSCluster *infrav1.OpenStackCluster + testNamespace string + osmtReconciler *OpenStackMachineTemplateReconciler + osmtMockCtrl *gomock.Controller + osmtMockFactory *scope.MockScopeFactory + testNum int + ) + + testOSClusterName := "test-oscluster" + + BeforeEach(func() { + testNum++ + testNamespace = fmt.Sprintf("osmt-test-%d", testNum) + + testOSCluster = &infrav1.OpenStackCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: infrav1.SchemeGroupVersion.Group + "/" + infrav1.SchemeGroupVersion.Version, + Kind: "OpenStackCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: testOSClusterName, + Namespace: testNamespace, + OwnerReferences: []metav1.OwnerReference{ + { + APIVersion: clusterv1.GroupVersion.String(), + Kind: "Cluster", + Name: capiClusterName, + UID: types.UID("cluster-uid"), + }, + }, + }, + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + }, + } + + testCluster = &clusterv1.Cluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: clusterv1.GroupVersion.String(), + Kind: "Cluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: capiClusterName, + Namespace: testNamespace, + }, + Spec: clusterv1.ClusterSpec{ + InfrastructureRef: clusterv1.ContractVersionedObjectReference{ + APIGroup: infrav1.GroupName, + Kind: "OpenStackCluster", + Name: testOSClusterName, + }, + }, + } + + testOSMT = &infrav1.OpenStackMachineTemplate{ + TypeMeta: metav1.TypeMeta{ + APIVersion: infrav1.SchemeGroupVersion.Group + "/" + infrav1.SchemeGroupVersion.Version, + Kind: "OpenStackMachineTemplate", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-osmt", + Namespace: testNamespace, + Labels: map[string]string{ + clusterv1.ClusterNameLabel: capiClusterName, + }, + }, + Spec: infrav1.OpenStackMachineTemplateSpec{ + Template: infrav1.OpenStackMachineTemplateResource{ + Spec: infrav1.OpenStackMachineSpec{ + FlavorID: ptr.To(flavorID), + Image: infrav1.ImageParam{ + ID: &imageID, + }, + }, + }, + }, + } + + input := framework.CreateNamespaceInput{ + Creator: k8sClient, + Name: testNamespace, + } + framework.CreateNamespace(ctx, input) + + osmtMockCtrl = gomock.NewController(GinkgoT()) + osmtMockFactory = scope.NewMockScopeFactory(osmtMockCtrl, "") + osmtReconciler = &OpenStackMachineTemplateReconciler{ + Client: k8sClient, + ScopeFactory: osmtMockFactory, + } + }) + + AfterEach(func() { + orphan := metav1.DeletePropagationOrphan + deleteOptions := client.DeleteOptions{ + PropagationPolicy: &orphan, + } + + // Remove finalizers and delete openstackmachinetemplate + patchHelper, err := patch.NewHelper(testOSMT, k8sClient) + Expect(err).To(BeNil()) + testOSMT.SetFinalizers([]string{}) + err = patchHelper.Patch(ctx, testOSMT) + Expect(err).To(BeNil()) + err = k8sClient.Delete(ctx, testOSMT, &deleteOptions) + Expect(err).To(BeNil()) + + err = k8sClient.Delete(ctx, testCluster, &deleteOptions) + Expect(client.IgnoreNotFound(err)).To(BeNil()) + err = k8sClient.Delete(ctx, testOSCluster, &deleteOptions) + Expect(client.IgnoreNotFound(err)).To(BeNil()) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when credentials secret is missing", func() { + testOSMT.SetName("missing-osmt-credentials") + + // Create cluster first to get the UID + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + + // Fetch the cluster to get the generated UID + createdCluster := &clusterv1.Cluster{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testCluster.Name, Namespace: testCluster.Namespace}, createdCluster)).To(Succeed()) + + // Set owner reference on OSMT with correct UID + testOSMT.OwnerReferences = []metav1.OwnerReference{ + { + APIVersion: clusterv1.GroupVersion.String(), + Kind: "Cluster", + Name: createdCluster.Name, + UID: createdCluster.UID, + }, + } + + err = k8sClient.Create(ctx, testOSCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, testOSMT) + Expect(err).To(BeNil()) + + credentialsErr := fmt.Errorf("secret not found: non-existent-secret") + osmtMockFactory.SetClientScopeCreateError(credentialsErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testOSMT.Name, + Namespace: testOSMT.Namespace, + }, + } + result, err := osmtReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(credentialsErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackMachineTemplate to verify the condition was set + updatedOSMT := &infrav1.OpenStackMachineTemplate{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testOSMT.Name, Namespace: testOSMT.Namespace}, updatedOSMT)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedOSMT, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedOSMT, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when namespace is denied access to ClusterIdentity", func() { + testOSMT.SetName("identity-access-denied-osmt") + + // Create cluster first to get the UID + err := k8sClient.Create(ctx, testCluster) + Expect(err).To(BeNil()) + + // Fetch the cluster to get the generated UID + createdCluster := &clusterv1.Cluster{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testCluster.Name, Namespace: testCluster.Namespace}, createdCluster)).To(Succeed()) + + // Set owner reference on OSMT with correct UID + testOSMT.OwnerReferences = []metav1.OwnerReference{ + { + APIVersion: clusterv1.GroupVersion.String(), + Kind: "Cluster", + Name: createdCluster.Name, + UID: createdCluster.UID, + }, + } + + err = k8sClient.Create(ctx, testOSCluster) + Expect(err).To(BeNil()) + err = k8sClient.Create(ctx, testOSMT) + Expect(err).To(BeNil()) + + identityAccessErr := &scope.IdentityAccessDeniedError{ + IdentityName: "test-cluster-identity", + RequesterNamespace: testNamespace, + } + osmtMockFactory.SetClientScopeCreateError(identityAccessErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testOSMT.Name, + Namespace: testOSMT.Namespace, + }, + } + result, err := osmtReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(identityAccessErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackMachineTemplate to verify the condition was set + updatedOSMT := &infrav1.OpenStackMachineTemplate{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testOSMT.Name, Namespace: testOSMT.Namespace}, updatedOSMT)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedOSMT, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedOSMT, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) +}) diff --git a/controllers/openstackserver_controller.go b/controllers/openstackserver_controller.go index 26494bfa4..d1f743f37 100644 --- a/controllers/openstackserver_controller.go +++ b/controllers/openstackserver_controller.go @@ -29,16 +29,16 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" kerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" "k8s.io/klog/v2" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" - v1beta1conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions" + conditions "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" + "sigs.k8s.io/cluster-api/util/predicates" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" @@ -50,10 +50,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" orcv1alpha1 "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" - "github.com/k-orc/openstack-resource-controller/v2/pkg/predicates" + orcpredicates "github.com/k-orc/openstack-resource-controller/v2/pkg/predicates" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/compute" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" @@ -68,7 +68,7 @@ const ( // OpenStackServerReconciler reconciles a OpenStackServer object. type OpenStackServerReconciler struct { Client client.Client - Recorder record.EventRecorder + Recorder events.EventRecorder WatchFilterValue string ScopeFactory scope.Factory CaCertificates []byte // PEM encoded ca certificates. @@ -78,6 +78,7 @@ type OpenStackServerReconciler struct { // +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=openstackservers,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=openstackservers/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch // +kubebuilder:rbac:groups=ipam.cluster.x-k8s.io,resources=ipaddressclaims;ipaddressclaims/status,verbs=get;watch;create;update;patch;delete // +kubebuilder:rbac:groups=ipam.cluster.x-k8s.io,resources=ipaddresses;ipaddresses/status,verbs=get;list;watch // +kubebuilder:rbac:groups=openstack.k-orc.cloud,resources=images,verbs=get;list;watch @@ -97,10 +98,44 @@ func (r *OpenStackServerReconciler) Reconcile(ctx context.Context, req ctrl.Requ return reconcile.Result{}, err } + patchHelper, err := patch.NewHelper(openStackServer, r.Client) + if err != nil { + return ctrl.Result{}, err + } + + defer func() { + // Propagate terminal errors + terminalError := &capoerrors.TerminalError{} + if errors.As(reterr, &terminalError) { + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: terminalError.Reason, + Message: terminalError.Message, + }) + } + + if err := patchServer(ctx, patchHelper, openStackServer); err != nil { + result = ctrl.Result{} + reterr = kerrors.NewAggregate([]error{reterr, err}) + } + }() + clientScope, err := r.ScopeFactory.NewClientScopeFromObject(ctx, r.Client, r.CaCertificates, log, openStackServer) if err != nil { + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionFalse, + Reason: infrav1.OpenStackAuthenticationFailedReason, + Message: fmt.Sprintf("Failed to create OpenStack client scope: %v", err), + }) return reconcile.Result{}, err } + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.OpenStackAuthenticationSucceeded, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) scope := scope.NewWithLogger(clientScope, log) scope.Logger().Info("Reconciling OpenStackServer") @@ -116,24 +151,7 @@ func (r *OpenStackServerReconciler) Reconcile(ctx context.Context, req ctrl.Requ } } - patchHelper, err := patch.NewHelper(openStackServer, r.Client) - if err != nil { - return ctrl.Result{}, err - } - - defer func() { - // Propagate terminal errors - terminalError := &capoerrors.TerminalError{} - if errors.As(reterr, &terminalError) { - v1beta1conditions.MarkFalse(openStackServer, infrav1.InstanceReadyCondition, terminalError.Reason, clusterv1beta1.ConditionSeverityError, "%s", terminalError.Message) - } - - if err := patchServer(ctx, patchHelper, openStackServer); err != nil { - result = ctrl.Result{} - reterr = kerrors.NewAggregate([]error{reterr, err}) - } - }() - + // Handle deleted servers if !openStackServer.DeletionTimestamp.IsZero() { // When moving a cluster, we need to populate the server status with the resources // that were in another object's status. @@ -146,30 +164,20 @@ func (r *OpenStackServerReconciler) Reconcile(ctx context.Context, req ctrl.Requ return reconcile.Result{}, r.reconcileDelete(scope, openStackServer) } + // Handle non-deleted servers return r.reconcileNormal(ctx, scope, openStackServer) } func patchServer(ctx context.Context, patchHelper *patch.Helper, openStackServer *infrav1alpha1.OpenStackServer, options ...patch.Option) error { - // Always update the readyCondition by summarizing the state of other conditions. - applicableConditions := []clusterv1beta1.ConditionType{ - infrav1.InstanceReadyCondition, - } - - v1beta1conditions.SetSummary(openStackServer, v1beta1conditions.WithConditions(applicableConditions...)) - // Patch the object, ignoring conflicts on the conditions owned by this controller. // Also, if requested, we are adding additional options like e.g. Patch ObservedGeneration when issuing the // patch at the end of the reconcile loop. options = append(options, patch.WithOwnedConditions{Conditions: []string{ clusterv1.ReadyCondition, - string(infrav1.InstanceReadyCondition), - }}, - ) - v1beta1conditions.SetSummary(openStackServer, - v1beta1conditions.WithConditions( infrav1.InstanceReadyCondition, - ), + infrav1.FloatingAddressFromPoolReadyCondition, + }}, ) return patchHelper.Patch(ctx, openStackServer, options...) @@ -218,7 +226,12 @@ func (r *OpenStackServerReconciler) SetupWithManager(ctx context.Context, mgr ct } return requests }), - builder.WithPredicates(predicates.NewBecameAvailable(mgr.GetLogger(), &orcv1alpha1.Image{})), + builder.WithPredicates(orcpredicates.NewBecameAvailable(mgr.GetLogger(), &orcv1alpha1.Image{})), + ). + Watches( + &clusterv1.Cluster{}, + handler.EnqueueRequestsFromMapFunc(r.requeueOpenStackServersForCluster(ctx)), + builder.WithPredicates(predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log)), ). Watches( &ipamv1.IPAddressClaim{}, @@ -258,7 +271,12 @@ func (r *OpenStackServerReconciler) reconcileDelete(scope *scope.WithLogger, ope } } else { if err := computeService.DeleteInstance(openStackServer, instanceStatus); err != nil { - v1beta1conditions.MarkFalse(openStackServer, infrav1.InstanceReadyCondition, infrav1.InstanceDeleteFailedReason, clusterv1beta1.ConditionSeverityError, "Deleting instance failed: %v", err) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeleteFailedReason, + Message: fmt.Sprintf("Deleting instance failed: %v", err), + }) return fmt.Errorf("delete instance: %w", err) } } @@ -308,10 +326,30 @@ func (r *OpenStackServerReconciler) reconcileNormal(ctx context.Context, scope * openStackServer.SetLabels(labels) } - changed, resolveDone, err := compute.ResolveServerSpec(ctx, scope, r.Client, openStackServer) - if err != nil || !resolveDone { + changed, resolveDone, pendingDependencies, err := compute.ResolveServerSpec(ctx, scope, r.Client, openStackServer) + if err != nil { + // Set a condition to make the error visible on the OpenStackServer status. + // This helps users understand why the server is not being created. + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.DependencyFailedReason, + Message: fmt.Sprintf("Failed to resolve server spec: %v", err), + }) return ctrl.Result{}, err } + if !resolveDone { + // Set a condition to indicate we're waiting for dependencies (e.g., ORC Image not ready yet). + // This helps users understand why the server is not being created. + // Include the list of pending dependencies to help with debugging. + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceNotReadyReason, + Message: fmt.Sprintf("Waiting for server dependencies to be resolved: %v", pendingDependencies), + }) + return ctrl.Result{}, nil + } // Also add the finalizer when writing resolved resources so we can start creating resources on the next reconcile. if controllerutil.AddFinalizer(openStackServer, infrav1alpha1.OpenStackServerFinalizer) { @@ -366,10 +404,19 @@ func (r *OpenStackServerReconciler) reconcileNormal(ctx context.Context, scope * if floatingAddressClaim != nil { if err := r.associateIPAddressFromIPAddressClaim(ctx, openStackServer, instanceStatus, instanceNS, floatingAddressClaim, networkingService); err != nil { - v1beta1conditions.MarkFalse(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition, infrav1.FloatingAddressFromPoolErrorReason, clusterv1beta1.ConditionSeverityError, "Failed while associating ip from pool: %v", err) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingAddressFromPoolErrorReason, + Message: fmt.Sprintf("Failed while associating ip from pool: %v", err), + }) return ctrl.Result{}, err } - v1beta1conditions.MarkTrue(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) } state := instanceStatus.State() @@ -379,16 +426,29 @@ func (r *OpenStackServerReconciler) reconcileNormal(ctx context.Context, scope * switch instanceStatus.State() { case infrav1.InstanceStateActive: scope.Logger().Info("Server instance state is ACTIVE", "id", instanceStatus.ID()) - v1beta1conditions.MarkTrue(openStackServer, infrav1.InstanceReadyCondition) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) + // Set the Ready field for v1alpha1 compatibility with predicates openStackServer.Status.Ready = true case infrav1.InstanceStateError: scope.Logger().Info("Server instance state is ERROR", "id", instanceStatus.ID()) - v1beta1conditions.MarkFalse(openStackServer, infrav1.InstanceReadyCondition, infrav1.InstanceStateErrorReason, clusterv1beta1.ConditionSeverityError, "") + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceStateErrorReason, + }) return ctrl.Result{}, nil case infrav1.InstanceStateDeleted: // we should avoid further actions for DELETED VM scope.Logger().Info("Server instance state is DELETED, no actions") - v1beta1conditions.MarkFalse(openStackServer, infrav1.InstanceReadyCondition, infrav1.InstanceDeletedReason, clusterv1beta1.ConditionSeverityError, "") + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceDeletedReason, + }) return ctrl.Result{}, nil case infrav1.InstanceStateBuild, infrav1.InstanceStateUndefined: scope.Logger().Info("Waiting for instance to become ACTIVE", "id", instanceStatus.ID(), "status", instanceStatus.State()) @@ -397,7 +457,12 @@ func (r *OpenStackServerReconciler) reconcileNormal(ctx context.Context, scope * // The other state is normal (for example, migrating, shutoff) but we don't want to proceed until it's ACTIVE // due to potential conflict or unexpected actions scope.Logger().Info("Waiting for instance to become ACTIVE", "id", instanceStatus.ID(), "status", instanceStatus.State()) - v1beta1conditions.MarkUnknown(openStackServer, infrav1.InstanceReadyCondition, infrav1.InstanceNotReadyReason, "Instance state is not handled: %s", instanceStatus.State()) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionUnknown, + Reason: infrav1.InstanceNotReadyReason, + Message: fmt.Sprintf("Instance state is not handled: %s", instanceStatus.State()), + }) return ctrl.Result{RequeueAfter: waitForInstanceBecomeActiveToReconcile}, nil } @@ -430,6 +495,12 @@ func getOrCreateServerPorts(openStackServer *infrav1alpha1.OpenStackServer, netw desiredPorts := resolved.Ports if err := networkingService.EnsurePorts(openStackServer, desiredPorts, resources); err != nil { + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.PortCreateFailedReason, + Message: err.Error(), + }) return fmt.Errorf("creating ports: %w", err) } @@ -454,7 +525,12 @@ func (r *OpenStackServerReconciler) getOrCreateServer(ctx context.Context, logge msg = infrav1.ServerUnexpectedDeletedMessage reason = infrav1.InstanceNotFoundReason } - v1beta1conditions.MarkFalse(openStackServer, infrav1.InstanceReadyCondition, reason, clusterv1beta1.ConditionSeverityError, "%s", msg) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: reason, + Message: msg, + }) return nil, err } } @@ -478,7 +554,12 @@ func (r *OpenStackServerReconciler) getOrCreateServer(ctx context.Context, logge instanceSpec.Name = openStackServer.Name instanceStatus, err = computeService.CreateInstance(openStackServer, instanceSpec, portIDs) if err != nil { - v1beta1conditions.MarkFalse(openStackServer, infrav1.InstanceReadyCondition, infrav1.InstanceCreateFailedReason, clusterv1beta1.ConditionSeverityError, "%s", err.Error()) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.InstanceCreateFailedReason, + Message: err.Error(), + }) openStackServer.Status.InstanceState = &infrav1.InstanceStateError return nil, fmt.Errorf("create OpenStack instance: %w", err) } @@ -576,14 +657,23 @@ func (r *OpenStackServerReconciler) reconcileFloatingAddressFromPool(ctx context var claim *ipamv1.IPAddressClaim claim, err := r.getOrCreateIPAddressClaimForFloatingAddress(ctx, scope, openStackServer) if err != nil { - v1beta1conditions.MarkFalse(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition, infrav1.FloatingAddressFromPoolErrorReason, clusterv1beta1.ConditionSeverityInfo, "Failed to reconcile floating IP claims: %v", err) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingAddressFromPoolErrorReason, + Message: fmt.Sprintf("Failed to reconcile floating IP claims: %v", err), + }) return nil, true, err } if claim.Status.AddressRef.Name == "" { - r.Recorder.Eventf(openStackServer, corev1.EventTypeNormal, "WaitingForIPAddressClaim", "Waiting for IPAddressClaim %s/%s to be allocated", claim.Namespace, claim.Name) + r.Recorder.Eventf(openStackServer, nil, corev1.EventTypeNormal, "WaitingForIPAddressClaim", "WaitingForIPAddressClaim", "Waiting for IPAddressClaim %s/%s to be allocated", claim.Namespace, claim.Name) return claim, true, nil } - v1beta1conditions.MarkTrue(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) return claim, false, nil } @@ -636,7 +726,7 @@ func (r *OpenStackServerReconciler) getOrCreateIPAddressClaimForFloatingAddress( return nil, err } - r.Recorder.Eventf(openStackServer, corev1.EventTypeNormal, "CreatingIPAddressClaim", "Creating IPAddressClaim %s/%s", claim.Namespace, claim.Name) + r.Recorder.Eventf(openStackServer, nil, corev1.EventTypeNormal, "CreatingIPAddressClaim", "CreatingIPAddressClaim", "Creating IPAddressClaim %s/%s", claim.Namespace, claim.Name) scope.Logger().Info("Created IPAddressClaim", "name", claim.Name) return claim, nil } @@ -652,7 +742,11 @@ func (r *OpenStackServerReconciler) associateIPAddressFromIPAddressClaim(ctx con instanceAddresses := instanceNS.Addresses() for _, instanceAddress := range instanceAddresses { if instanceAddress.Address == address.Spec.Address { - v1beta1conditions.MarkTrue(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) return nil } } @@ -663,7 +757,12 @@ func (r *OpenStackServerReconciler) associateIPAddressFromIPAddressClaim(ctx con } if fip == nil { - v1beta1conditions.MarkFalse(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition, infrav1.FloatingAddressFromPoolErrorReason, clusterv1beta1.ConditionSeverityError, "floating IP does not exist") + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingAddressFromPoolErrorReason, + Message: "floating IP does not exist", + }) return fmt.Errorf("floating IP %q does not exist", address.Spec.Address) } @@ -673,14 +772,23 @@ func (r *OpenStackServerReconciler) associateIPAddressFromIPAddressClaim(ctx con } if port == nil { - v1beta1conditions.MarkFalse(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition, infrav1.FloatingAddressFromPoolErrorReason, clusterv1beta1.ConditionSeverityError, "Can't find port for floating IP %q on external network %s", fip.FloatingIP, fip.FloatingNetworkID) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.FloatingAddressFromPoolErrorReason, + Message: fmt.Sprintf("Can't find port for floating IP %q on external network %s", fip.FloatingIP, fip.FloatingNetworkID), + }) return fmt.Errorf("port for floating IP %q on network %s does not exist", fip.FloatingIP, fip.FloatingNetworkID) } if err = networkingService.AssociateFloatingIP(openStackServer, fip, port.ID); err != nil { return err } - v1beta1conditions.MarkTrue(openStackServer, infrav1.FloatingAddressFromPoolReadyCondition) + conditions.Set(openStackServer, metav1.Condition{ + Type: infrav1.FloatingAddressFromPoolReadyCondition, + Status: metav1.ConditionTrue, + Reason: infrav1.ReadyConditionReason, + }) return nil } @@ -752,3 +860,50 @@ func OpenStackServerReconcileComplete(log logr.Logger) predicate.Funcs { GenericFunc: func(event.GenericEvent) bool { return false }, } } + +// requeueOpenStackServersForCluster returns a handler.MapFunc that watches for +// Cluster changes and triggers reconciliation of all OpenStackServers in that cluster. +func (r *OpenStackServerReconciler) requeueOpenStackServersForCluster(ctx context.Context) handler.MapFunc { + log := ctrl.LoggerFrom(ctx) + return func(ctx context.Context, o client.Object) []ctrl.Request { + c, ok := o.(*clusterv1.Cluster) + if !ok { + panic(fmt.Sprintf("Expected a Cluster but got a %T", o)) + } + + log := log.WithValues("objectMapper", "clusterToOpenStackServer", "namespace", c.Namespace, "cluster", c.Name) + + // Don't handle deleted clusters - servers will be cleaned up via their own deletion flow + if !c.DeletionTimestamp.IsZero() { + log.V(4).Info("Cluster has a deletion timestamp, skipping mapping.") + return nil + } + + // List all OpenStackServers in the cluster + serverList := &infrav1alpha1.OpenStackServerList{} + if err := r.Client.List( + ctx, + serverList, + client.InNamespace(c.Namespace), + client.MatchingLabels{clusterv1.ClusterNameLabel: c.Name}, + ); err != nil { + log.Error(err, "Failed to list OpenStackServers for cluster") + return nil + } + + // Create reconcile requests for all servers + requests := make([]ctrl.Request, 0, len(serverList.Items)) + for i := range serverList.Items { + server := &serverList.Items[i] + requests = append(requests, ctrl.Request{ + NamespacedName: client.ObjectKey{ + Namespace: server.Namespace, + Name: server.Name, + }, + }) + log.V(5).Info("Queueing OpenStackServer for reconciliation", "server", server.Name) + } + + return requests + } +} diff --git a/controllers/openstackserver_controller_test.go b/controllers/openstackserver_controller_test.go index 253264fb2..5ef670fd8 100644 --- a/controllers/openstackserver_controller_test.go +++ b/controllers/openstackserver_controller_test.go @@ -17,6 +17,7 @@ limitations under the License. package controllers import ( + "context" "fmt" "reflect" "testing" @@ -29,16 +30,22 @@ import ( "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/extensions/portsbinding" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/extensions/trunks" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/ports" - . "github.com/onsi/gomega" //nolint:revive + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive "go.uber.org/mock/gomock" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" - "sigs.k8s.io/cluster-api/util/conditions" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/test/framework" + conditions "sigs.k8s.io/cluster-api/util/conditions" + "sigs.k8s.io/cluster-api/util/patch" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/reconcile" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/compute" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" @@ -101,6 +108,17 @@ var createDefaultPort = func(r *recorders) { }, nil) } +var createDefaultPortFails = func(r *recorders) { + createOpts := ports.CreateOpts{ + Name: openStackServerName + "-0", + NetworkID: networkUUID, + } + portsBuilder := portsbinding.CreateOptsExt{ + CreateOptsBuilder: createOpts, + } + r.network.CreatePort(portsBuilder).Return(nil, fmt.Errorf("Error creating port")) +} + var createDefaultServer = func(r *recorders) { // Mock any server creation r.compute.CreateServer(gomock.Any(), gomock.Any()).Return(&servers.Server{ID: instanceUUID}, nil) @@ -194,6 +212,192 @@ var deleteRootVolume = func(r *recorders) { r.volume.DeleteVolume(rootVolumeUUID, volumes.DeleteOpts{}).Return(nil) } +func TestOpenStackServerReconciler_requeueOpenStackServersForCluster(t *testing.T) { + tests := []struct { + name string + cluster *clusterv1.Cluster + servers []*infrav1alpha1.OpenStackServer + clusterDeleting bool + wantRequests int + wantServerNames []string + }{ + { + name: "returns reconcile requests for all servers in cluster", + cluster: &clusterv1.Cluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-cluster", + Namespace: "test-ns", + }, + }, + servers: []*infrav1alpha1.OpenStackServer{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "server-1", + Namespace: "test-ns", + Labels: map[string]string{ + clusterv1.ClusterNameLabel: "test-cluster", + }, + }, + Spec: infrav1alpha1.OpenStackServerSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{Name: ptr.To("test-image")}, + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "server-2", + Namespace: "test-ns", + Labels: map[string]string{ + clusterv1.ClusterNameLabel: "test-cluster", + }, + }, + Spec: infrav1alpha1.OpenStackServerSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{Name: ptr.To("test-image")}, + }, + }, + }, + }, + wantRequests: 2, + wantServerNames: []string{"server-1", "server-2"}, + }, + { + name: "returns empty for deleted cluster", + cluster: &clusterv1.Cluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-cluster", + Namespace: "test-ns", + }, + }, + servers: []*infrav1alpha1.OpenStackServer{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "server-1", + Namespace: "test-ns", + Labels: map[string]string{ + clusterv1.ClusterNameLabel: "test-cluster", + }, + }, + Spec: infrav1alpha1.OpenStackServerSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{Name: ptr.To("test-image")}, + }, + }, + }, + }, + clusterDeleting: true, + wantRequests: 0, + }, + { + name: "returns empty when no servers exist", + cluster: &clusterv1.Cluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-cluster", + Namespace: "test-ns", + }, + }, + servers: []*infrav1alpha1.OpenStackServer{}, + wantRequests: 0, + }, + { + name: "only returns servers from same cluster", + cluster: &clusterv1.Cluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-cluster", + Namespace: "test-ns", + }, + }, + servers: []*infrav1alpha1.OpenStackServer{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "server-1", + Namespace: "test-ns", + Labels: map[string]string{ + clusterv1.ClusterNameLabel: "test-cluster", + }, + }, + Spec: infrav1alpha1.OpenStackServerSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{Name: ptr.To("test-image")}, + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "server-2", + Namespace: "test-ns", + Labels: map[string]string{ + clusterv1.ClusterNameLabel: "other-cluster", + }, + }, + Spec: infrav1alpha1.OpenStackServerSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{Name: ptr.To("test-image")}, + }, + }, + }, + }, + wantRequests: 1, + wantServerNames: []string{"server-1"}, + }, + } + + for i := range tests { + tt := &tests[i] + t.Run(tt.name, func(t *testing.T) { + g := NewGomegaWithT(t) + ctx := context.TODO() + + // Set deletion timestamp and finalizers if needed + if tt.clusterDeleting { + now := metav1.Now() + tt.cluster.DeletionTimestamp = &now + tt.cluster.Finalizers = []string{"test-finalizer"} + } + + // Create a fake client with the test data + scheme := runtime.NewScheme() + g.Expect(clusterv1.AddToScheme(scheme)).To(Succeed()) + g.Expect(infrav1alpha1.AddToScheme(scheme)).To(Succeed()) + + objs := make([]client.Object, 0, 1+len(tt.servers)) + objs = append(objs, tt.cluster) + for _, server := range tt.servers { + objs = append(objs, server) + } + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(objs...).Build() + + // Create reconciler and call mapper function + reconciler := &OpenStackServerReconciler{ + Client: fakeClient, + } + mapFunc := reconciler.requeueOpenStackServersForCluster(ctx) + requests := mapFunc(ctx, tt.cluster) + + // Verify results + if tt.wantRequests == 0 { + g.Expect(requests).To(Or(BeNil(), BeEmpty())) + } else { + g.Expect(requests).To(HaveLen(tt.wantRequests)) + if len(tt.wantServerNames) > 0 { + gotNames := make([]string, len(requests)) + for i, req := range requests { + gotNames[i] = req.Name + } + g.Expect(gotNames).To(ConsistOf(tt.wantServerNames)) + } + } + }) + } +} + func TestOpenStackServer_serverToInstanceSpec(t *testing.T) { tests := []struct { name string @@ -468,9 +672,11 @@ func Test_OpenStackServerReconcileDelete(t *testing.T) { func Test_OpenStackServerReconcileCreate(t *testing.T) { tests := []struct { - name string - osServer infrav1alpha1.OpenStackServer - expect func(r *recorders) + name string + osServer infrav1alpha1.OpenStackServer + expect func(r *recorders) + wantErr error + wantCondition *metav1.Condition }{ { name: "Minimal server spec creating port and server", @@ -518,6 +724,35 @@ func Test_OpenStackServerReconcileCreate(t *testing.T) { listDefaultServerFound(r) }, }, + { + name: "Port created with error", + osServer: infrav1alpha1.OpenStackServer{ + Spec: infrav1alpha1.OpenStackServerSpec{ + Flavor: ptr.To(defaultFlavor), + Image: defaultImage, + Ports: defaultPortOpts, + }, + Status: infrav1alpha1.OpenStackServerStatus{ + Resolved: &infrav1alpha1.ResolvedServerSpec{ + ImageID: imageUUID, + FlavorID: flavorUUID, + Ports: defaultResolvedPorts, + }, + }, + }, + expect: func(r *recorders) { + listDefaultPortsNotFound(r) + listDefaultPortsNotFound(r) + createDefaultPortFails(r) + }, + wantErr: fmt.Errorf("creating ports: %w", fmt.Errorf("Error creating port")), + wantCondition: &metav1.Condition{ + Type: infrav1.InstanceReadyCondition, + Status: metav1.ConditionFalse, + Reason: infrav1.PortCreateFailedReason, + Message: "Error creating port", + }, + }, } for i := range tests { tt := &tests[i] @@ -545,7 +780,29 @@ func Test_OpenStackServerReconcileCreate(t *testing.T) { osServer.Finalizers = []string{infrav1alpha1.OpenStackServerFinalizer} _, err := reconciler.reconcileNormal(ctx, scopeWithLogger, &tt.osServer) - g.Expect(err).ToNot(HaveOccurred()) + + // Check error result + if tt.wantErr != nil { + g.Expect(err).To(Equal(tt.wantErr)) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + + // Check the condition is set correctly + if tt.wantCondition != nil { + // print openstackServer conditions + for _, condition := range tt.osServer.Status.Conditions { + t.Logf("Condition: %s, Status: %s, Reason: %s", condition.Type, condition.Status, condition.Reason) + } + unstructuredServer, err := tt.osServer.ToUnstructured() + g.Expect(err).ToNot(HaveOccurred()) + conditionType, err := conditions.UnstructuredGet(unstructuredServer, tt.wantCondition.Type) + g.Expect(err).ToNot(HaveOccurred()) + g.Expect(conditionType).ToNot(BeNil()) + g.Expect(string(conditionType.Status)).To(Equal(string(tt.wantCondition.Status))) + g.Expect(conditionType.Reason).To(Equal(tt.wantCondition.Reason)) + g.Expect(conditionType.Message).To(Equal(tt.wantCondition.Message)) + } }) } } @@ -557,7 +814,7 @@ func TestOpenStackServerReconciler_getOrCreateServer(t *testing.T) { setupMocks func(r *recorders) wantServer *servers.Server wantErr bool - wantCondition *clusterv1beta1.Condition + wantCondition *metav1.Condition }{ { name: "instanceID set in status but server not found", @@ -570,9 +827,9 @@ func TestOpenStackServerReconciler_getOrCreateServer(t *testing.T) { r.compute.GetServer(instanceUUID).Return(nil, gophercloud.ErrUnexpectedResponseCode{Actual: 404}) }, wantErr: false, - wantCondition: &clusterv1beta1.Condition{ + wantCondition: &metav1.Condition{ Type: infrav1.InstanceReadyCondition, - Status: corev1.ConditionFalse, + Status: metav1.ConditionFalse, Reason: infrav1.InstanceNotFoundReason, Message: infrav1.ServerUnexpectedDeletedMessage, }, @@ -588,9 +845,9 @@ func TestOpenStackServerReconciler_getOrCreateServer(t *testing.T) { r.compute.GetServer(instanceUUID).Return(nil, fmt.Errorf("error")) }, wantErr: true, - wantCondition: &clusterv1beta1.Condition{ + wantCondition: &metav1.Condition{ Type: infrav1.InstanceReadyCondition, - Status: corev1.ConditionFalse, + Status: metav1.ConditionFalse, Reason: infrav1.OpenStackErrorReason, Message: "get server \"" + instanceUUID + "\" detail failed: error", }, @@ -661,9 +918,9 @@ func TestOpenStackServerReconciler_getOrCreateServer(t *testing.T) { r.compute.CreateServer(gomock.Any(), gomock.Any()).Return(nil, fmt.Errorf("error")) }, wantErr: true, - wantCondition: &clusterv1beta1.Condition{ + wantCondition: &metav1.Condition{ Type: infrav1.InstanceReadyCondition, - Status: corev1.ConditionFalse, + Status: metav1.ConditionFalse, Reason: infrav1.InstanceCreateFailedReason, Message: "error creating Openstack instance: " + "error", }, @@ -723,7 +980,7 @@ func TestOpenStackServerReconciler_getOrCreateServer(t *testing.T) { } unstructuredServer, err := tt.openStackServer.ToUnstructured() g.Expect(err).ToNot(HaveOccurred()) - conditionType, err := conditions.UnstructuredGet(unstructuredServer, string(tt.wantCondition.Type)) + conditionType, err := conditions.UnstructuredGet(unstructuredServer, tt.wantCondition.Type) g.Expect(err).ToNot(HaveOccurred()) g.Expect(conditionType).ToNot(BeNil()) g.Expect(string(conditionType.Status)).To(Equal(string(tt.wantCondition.Status))) @@ -733,3 +990,152 @@ func TestOpenStackServerReconciler_getOrCreateServer(t *testing.T) { }) } } + +var _ = Describe("OpenStackServer controller", func() { + var ( + testServer *infrav1alpha1.OpenStackServer + testNamespace string + serverReconciler *OpenStackServerReconciler + serverMockCtrl *gomock.Controller + serverMockFactory *scope.MockScopeFactory + testNum int + ) + + BeforeEach(func() { + testNum++ + testNamespace = fmt.Sprintf("server-test-%d", testNum) + + testServer = &infrav1alpha1.OpenStackServer{ + TypeMeta: metav1.TypeMeta{ + APIVersion: infrav1alpha1.SchemeGroupVersion.Group + "/" + infrav1alpha1.SchemeGroupVersion.Version, + Kind: "OpenStackServer", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-server", + Namespace: testNamespace, + }, + Spec: infrav1alpha1.OpenStackServerSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "test-creds", + CloudName: "openstack", + }, + Flavor: ptr.To(defaultFlavor), + Image: defaultImage, + SSHKeyName: "test-ssh-key", + Ports: []infrav1.PortOpts{ + { + Network: &infrav1.NetworkParam{ + ID: ptr.To(networkUUID), + }, + }, + }, + }, + } + + input := framework.CreateNamespaceInput{ + Creator: k8sClient, + Name: testNamespace, + } + framework.CreateNamespace(ctx, input) + + serverMockCtrl = gomock.NewController(GinkgoT()) + serverMockFactory = scope.NewMockScopeFactory(serverMockCtrl, "") + serverReconciler = &OpenStackServerReconciler{ + Client: k8sClient, + ScopeFactory: serverMockFactory, + } + }) + + AfterEach(func() { + orphan := metav1.DeletePropagationOrphan + deleteOptions := client.DeleteOptions{ + PropagationPolicy: &orphan, + } + + // Remove finalizers and delete openstackserver + patchHelper, err := patch.NewHelper(testServer, k8sClient) + Expect(err).To(BeNil()) + testServer.SetFinalizers([]string{}) + err = patchHelper.Patch(ctx, testServer) + Expect(err).To(BeNil()) + err = k8sClient.Delete(ctx, testServer, &deleteOptions) + Expect(err).To(BeNil()) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when credentials secret is missing", func() { + testServer.SetName("missing-server-credentials") + testServer.Spec.IdentityRef = infrav1.OpenStackIdentityReference{ + Type: "Secret", + Name: "non-existent-secret", + CloudName: "openstack", + } + + err := k8sClient.Create(ctx, testServer) + Expect(err).To(BeNil()) + + credentialsErr := fmt.Errorf("secret not found: non-existent-secret") + serverMockFactory.SetClientScopeCreateError(credentialsErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testServer.Name, + Namespace: testServer.Namespace, + }, + } + result, err := serverReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(credentialsErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackServer to verify the condition was set + updatedServer := &infrav1alpha1.OpenStackServer{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testServer.Name, Namespace: testServer.Namespace}, updatedServer)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedServer, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedServer, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) + + It("should set OpenStackAuthenticationSucceededCondition to False when namespace is denied access to ClusterIdentity", func() { + testServer.SetName("identity-access-denied-server") + testServer.Spec.IdentityRef = infrav1.OpenStackIdentityReference{ + Type: "ClusterIdentity", + Name: "test-cluster-identity", + CloudName: "openstack", + } + + err := k8sClient.Create(ctx, testServer) + Expect(err).To(BeNil()) + + identityAccessErr := &scope.IdentityAccessDeniedError{ + IdentityName: "test-cluster-identity", + RequesterNamespace: testNamespace, + } + serverMockFactory.SetClientScopeCreateError(identityAccessErr) + + req := reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: testServer.Name, + Namespace: testServer.Namespace, + }, + } + result, err := serverReconciler.Reconcile(ctx, req) + + Expect(err).To(MatchError(identityAccessErr)) + Expect(result).To(Equal(reconcile.Result{})) + + // Fetch the updated OpenStackServer to verify the condition was set + updatedServer := &infrav1alpha1.OpenStackServer{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Name: testServer.Name, Namespace: testServer.Namespace}, updatedServer)).To(Succeed()) + + // Verify OpenStackAuthenticationSucceededCondition is set to False + Expect(conditions.IsFalse(updatedServer, infrav1.OpenStackAuthenticationSucceeded)).To(BeTrue()) + condition := conditions.Get(updatedServer, infrav1.OpenStackAuthenticationSucceeded) + Expect(condition).ToNot(BeNil()) + Expect(condition.Reason).To(Equal(infrav1.OpenStackAuthenticationFailedReason)) + Expect(condition.Message).To(ContainSubstring("Failed to create OpenStack client scope")) + }) +}) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 7312e54cd..f3a1df0e1 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -35,13 +35,17 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/test/helpers/external" ) // These tests use Ginkgo (BDD-style Go testing framework). Refer to // http://onsi.github.io/ginkgo/ to learn more about Ginkgo. +const ( + capiClusterName = "capi-cluster" +) + var ( cfg *rest.Config k8sClient client.Client diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 70b609090..ef4c9c2b1 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -3,6 +3,9 @@ - [Introduction](./introduction.md) - [Getting Started](getting-started.md) - [Configuration](clusteropenstack/configuration.md) +- [Experimental Features](./experimental-features/experimental-features.md) + - [PriorityQueue](./experimental-features/priority-queue.md) + - [AutoScaleFromZero](./experimental-features/autoscale-from-zero.md) - [Topics](./topics/index.md) - [external cloud provider](./topics/external-cloud-provider.md) - [hosted control plane](./topics/hosted-control-plane.md) diff --git a/docs/book/src/api/v1alpha1/api.md b/docs/book/src/api/v1alpha1/api.md index 4c14706b7..bcf4ba87a 100644 --- a/docs/book/src/api/v1alpha1/api.md +++ b/docs/book/src/api/v1alpha1/api.md @@ -152,9 +152,7 @@ OpenStackServerSpec additionalBlockDevices
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AdditionalBlockDevice @@ -227,9 +225,7 @@ Kubernetes core/v1.TypedLocalObjectReference identityRef
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference @@ -240,9 +236,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReferenc image
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageParam @@ -253,9 +247,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam ports
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortOpts @@ -266,9 +258,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam rootVolume
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RootVolume @@ -291,9 +281,7 @@ string securityGroups
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam @@ -305,9 +293,7 @@ string serverGroup
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupParam @@ -319,9 +305,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam serverMetadata
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerMetadata @@ -372,9 +356,7 @@ be injected into the server instance.

schedulerHintAdditionalProperties
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalProperty @@ -553,9 +535,7 @@ If set, the pool will stop allocating floating ips when it reaches this number o identityRef
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference @@ -566,9 +546,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReferenc floatingIPNetwork
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam @@ -652,9 +630,7 @@ If set, the pool will stop allocating floating ips when it reaches this number o identityRef
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference @@ -665,9 +641,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReferenc floatingIPNetwork
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkParam - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkParam @@ -745,9 +719,7 @@ ReclaimPolicy floatingIPNetwork
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.NetworkStatus @@ -759,7 +731,9 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.NetworkStatus conditions
-sigs.k8s.io/cluster-api/api/core/v1beta1.Conditions + +[]Kubernetes meta/v1.Condition + @@ -788,9 +762,7 @@ sigs.k8s.io/cluster-api/api/core/v1beta1.Conditions additionalBlockDevices
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.AdditionalBlockDevice - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.AdditionalBlockDevice @@ -863,9 +835,7 @@ Kubernetes core/v1.TypedLocalObjectReference identityRef
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReference - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.OpenStackIdentityReference @@ -876,9 +846,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.OpenStackIdentityReferenc image
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ImageParam @@ -889,9 +857,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam ports
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortOpts - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortOpts @@ -902,9 +868,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ImageParam rootVolume
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.RootVolume - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.RootVolume @@ -927,9 +891,7 @@ string securityGroups
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SecurityGroupParam - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SecurityGroupParam @@ -941,9 +903,7 @@ string serverGroup
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerGroupParam @@ -955,9 +915,7 @@ sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerGroupParam serverMetadata
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ServerMetadata - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ServerMetadata @@ -1008,9 +966,7 @@ be injected into the server instance.

schedulerHintAdditionalProperties
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.SchedulerHintAdditionalProperty - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.SchedulerHintAdditionalProperty @@ -1066,9 +1022,7 @@ string instanceState
- -sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.InstanceState - +sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.InstanceState @@ -1121,7 +1075,9 @@ ServerResources conditions
-sigs.k8s.io/cluster-api/api/core/v1beta1.Conditions + +[]Kubernetes meta/v1.Condition + @@ -1212,9 +1168,7 @@ string ports
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.ResolvedPortSpec - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.ResolvedPortSpec @@ -1245,9 +1199,7 @@ string ports
- -[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1.PortStatus - +[]sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2.PortStatus diff --git a/docs/book/src/api/v1beta1/api.md b/docs/book/src/api/v1beta1/api.md index 0eb377d11..7d7c558c0 100644 --- a/docs/book/src/api/v1beta1/api.md +++ b/docs/book/src/api/v1beta1/api.md @@ -857,6 +857,18 @@ OpenStackMachineTemplateResource + + +status
+ + +OpenStackMachineTemplateStatus + + + + + +

APIServerLoadBalancer @@ -1565,6 +1577,38 @@ availability zone.

+

ClusterInitialization +

+

+(Appears on: +OpenStackClusterStatus) +

+

+

ClusterInitialization represents the initialization status of the cluster.

+

+ + + + + + + + + + + + + +
FieldDescription
+provisioned
+ +bool + +
+(Optional) +

Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. +The value of this field is never updated after provisioning is completed.

+

ExternalRouterIPParam

@@ -1956,6 +2000,38 @@ subnet in the list is taken into account.

+

MachineInitialization +

+

+(Appears on: +OpenStackMachineStatus) +

+

+

MachineInitialization contains information about the initialization status of the machine.

+

+ + + + + + + + + + + + + +
FieldDescription
+provisioned
+ +bool + +
+(Optional) +

Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. +The value of this field is never updated after provisioning is completed.

+

MachineResources

@@ -2289,6 +2365,38 @@ NetworkStatus

NeutronTag represents a tag on a Neutron resource. It may not be empty and may not contain commas.

+

NodeInfo +

+

+(Appears on: +OpenStackMachineTemplateStatus) +

+

+

NodeInfo contains information about the node’s architecture and operating system.

+

+ + + + + + + + + + + + + +
FieldDescription
+operatingSystem
+ +string + +
+(Optional) +

operatingSystem is a string representing the operating system of the node. +This may be a string like ‘linux’ or ‘windows’.

+

OpenStackClusterSpec

@@ -2672,6 +2780,22 @@ bool

Ready is true when the cluster infrastructure is ready.

+

Deprecated: This field is deprecated and will be removed in a future API version. +Use status.conditions to determine the ready state of the cluster.

+ + + + +initialization
+ + +ClusterInitialization + + + + +(Optional) +

Initialization contains information about the initialization status of the cluster.

@@ -2824,6 +2948,8 @@ responsible controller itself being critically misconfigured.

Any transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller’s output.

+

Deprecated: This field is deprecated and will be removed in a future API version. +Use status.conditions to report failures.

@@ -2849,6 +2975,23 @@ responsible controller itself being critically misconfigured.

Any transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller’s output.

+

Deprecated: This field is deprecated and will be removed in a future API version. +Use status.conditions to report failures.

+ + + + +conditions
+ +sigs.k8s.io/cluster-api/api/core/v1beta1.Conditions + + + +(Optional) +

Conditions defines current service state of the OpenStackCluster. +This field surfaces into Cluster’s status.conditions[InfrastructureReady] condition. +The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster +(both during initial provisioning and after the initial provisioning is completed).

@@ -3597,6 +3740,22 @@ bool (Optional)

Ready is true when the provider resource is ready.

+

Deprecated: This field is deprecated and will be removed in a future API version. +Use status.conditions to determine the ready state of the machine.

+ + + + +initialization
+ + +MachineInitialization + + + + +(Optional) +

Initialization contains information about the initialization status of the machine.

@@ -3675,6 +3834,10 @@ sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors.DeprecatedCAPIMachin +(Optional) +

FailureReason explains the reson behind a failure.

+

Deprecated: This field is deprecated and will be removed in a future API version. +Use status.conditions to report failures.

@@ -3700,6 +3863,8 @@ 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 will be removed in a future API version. +Use status.conditions to report failures.

@@ -3710,6 +3875,11 @@ sigs.k8s.io/cluster-api/api/core/v1beta1.Conditions +(Optional) +

Conditions defines current service state of the OpenStackMachine. +This field surfaces into Machine’s status.conditions[InfrastructureReady] condition. +The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine +(both during initial provisioning and after the initial provisioning is completed).

@@ -4003,6 +4173,66 @@ OpenStackMachineTemplateResource +

OpenStackMachineTemplateStatus +

+

+(Appears on: +OpenStackMachineTemplate) +

+

+

OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+capacity
+ +Kubernetes core/v1.ResourceList + +
+(Optional) +

Capacity defines the resource capacity for this machine. +This value is used for autoscaling from zero operations as defined in: +https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md

+
+nodeInfo,omitempty,omitzero
+ + +NodeInfo + + +
+(Optional) +
+conditions
+ +sigs.k8s.io/cluster-api/api/core/v1beta1.Conditions + +
+(Optional) +

Conditions defines current service state of the OpenStackMachineTemplate. +The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. +(both during initial provisioning and after the initial provisioning is completed).

+

PortOpts

diff --git a/docs/book/src/experimental-features/autoscale-from-zero.md b/docs/book/src/experimental-features/autoscale-from-zero.md new file mode 100644 index 000000000..c254af8d9 --- /dev/null +++ b/docs/book/src/experimental-features/autoscale-from-zero.md @@ -0,0 +1,37 @@ +# AutoScale From Zero + +> **Note:** AutoScaleFromZero is available in >= 0.14. + +The `AutoScaleFromZero` feature flag enables the usage of [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/bc3f44c85df17bccc940adb7c885b192cf6135d7/cluster-autoscaler/cloudprovider/clusterapi#cluster-autoscaler-on-cluster-api) to scale from/to zero without the need of annotations. More information on how to use the cluster-autoscaler can be found [here](https://github.com/kubernetes/autoscaler/tree/bc3f44c85df17bccc940adb7c885b192cf6135d7/cluster-autoscaler/cloudprovider/clusterapi#scale-from-zero-support). + +## Enabling AutoScaleFromZero + +You can enable `AutoScaleFromZero` using the following. + +- Environment variable: `EXP_CAPO_AUTOSCALE_FROM_ZERO=true` +- clusterctl.yaml variable: `EXP_CAPO_AUTOSCALE_FROM_ZERO: true` +- --feature-gates argument: `AutoScaleFromZero=true` + +## Automatically Populated Status Fields + +> **Note**: Unsupported fields may be provided via annotations or incorporated into the controller by extending its functionality. + +The controller automatically fills two sections of `OpenStackMachineTemplate.Status`: +- **capacity** (resource quantities) +- **nodeInfo** (OS metadata) + +The following mappings describe exactly where each value originates. + +### Capacity (`Status.Capacity`) +- **CPU**: From the `VCPUs` property of the resolved OpenStack flavor + +- **Memory**: From the `RAM` property of the resolved OpenStack flavor + +- **Ephemeral Storage**: From the `Ephemeral` property of the resolved OpenStack flavor + +- **Root Storage**: Determined based on the boot method: + - If **booting from volume** taken from `OpenStackMachineTemplate.Spec.Template.Spec.RootVolume.SizeGiB` + - If **booting from image** taken from the `Disk` property of the resolved OpenStack flavor + +### Node Information (`Status.NodeInfo`) +- **Operating System**: From the `os_type` property of the resolved OpenStack image. diff --git a/docs/book/src/experimental-features/experimental-features.md b/docs/book/src/experimental-features/experimental-features.md new file mode 100644 index 000000000..b9cc4fc03 --- /dev/null +++ b/docs/book/src/experimental-features/experimental-features.md @@ -0,0 +1,69 @@ +# Experimental Features + +CAPO now ships with experimental features the users can enable. + +Currently CAPO has the following experimental features: +* `PriorityQueue` (env var: `EXP_CAPO_PRIORITY_QUEUE`): [PriorityQueue](./priority-queue.md) +* `AutoScaleFromZero` (env var: `EXP_CAPO_AUTOSCALE_FROM_ZERO`): [AutoScaleFromZero](./autoscale-from-zero.md) + +## Enabling Experimental Features for Management Clusters Started with clusterctl + +Users can enable/disable features by setting OS environment variables before running `clusterctl init`, e.g.: + +```yaml +export EXP_SOME_FEATURE_NAME=true + +clusterctl init --infrastructure openstack +``` + +As an alternative to environment variables, it is also possible to set variables in the clusterctl config file located at `$XDG_CONFIG_HOME/cluster-api/clusterctl.yaml`, e.g.: +```yaml +# Values for environment variable substitution +EXP_SOME_FEATURE_NAME: "true" +``` +In case a variable is defined in both the config file and as an OS environment variable, the environment variable takes precedence. +For more information on how to set variables for clusterctl, see [clusterctl Configuration File](https://cluster-api.sigs.k8s.io/clusterctl/configuration) + + +## Enabling Experimental Features on Existing Management Clusters + +To enable/disable features on existing management clusters, users can edit the controller manager +deployments, which will then trigger a restart with the requested features. E.g: + +``` +kubectl edit -n capo-system deployment.apps/capo-controller-manager +``` +``` +// Enable/disable available features by modifying Args below. +spec: + template: + spec: + containers: + - args: + - --leader-elect + - --feature-gates=SomeFeature=true,OtherFeature=false +``` + +Similarly, to **validate** if a particular feature is enabled, see the arguments by issuing: + +```bash +kubectl describe -n capo-system deployment.apps/capo-controller-manager +``` + +## Enabling Experimental Features for e2e Tests + +Features can be enabled by setting them as environmental variables before running e2e tests. + +For `ci` this can also be done through updating `./test/e2e/data/e2e_conf.yaml`. + +## Enabling Experimental Features on Tilt + +On development environments started with `Tilt`, features can be enabled by setting the feature variables in `kustomize_substitutions`, e.g.: + +```yaml +kustomize_substitutions: + EXP_CAPO_PRIORITY_QUEUE: 'true' +``` + +For more details on setting up a development environment with `tilt`, see [Developing with Tilt](../development/development.md#developing-with-tilt) + diff --git a/docs/book/src/experimental-features/priority-queue.md b/docs/book/src/experimental-features/priority-queue.md new file mode 100644 index 000000000..1bd4945ea --- /dev/null +++ b/docs/book/src/experimental-features/priority-queue.md @@ -0,0 +1,20 @@ +# Priority Queue + +> **Note:** PriorityQueue is available in >= 0.14 + +The `PriorityQueue` feature flag enables the usage of the controller-runtime PriorityQueue. + +This feature deprioritizes reconciliation of objects that were not edge-triggered (i.e. due to an create/update etc.) and makes the controller more responsive during full resyncs and controller startups. + +More information on controller-runtime PriorityQueue: +- [release-notes](https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.20.0) +- [design docs](https://github.com/kubernetes-sigs/controller-runtime/pull/3013) +- [tracking issue](https://github.com/kubernetes-sigs/controller-runtime/issues/2374) + +## Enabling Priority Queue + +You can enable `PriorityQueue` using the following. + +- Environment variable: `EXP_CAPO_PRIORITY_QUEUE=true` +- clusterctl.yaml variable: `EXP_CAPO_PRIORITY_QUEUE: true` +- --feature-gates argument: `PriorityQueue=true` diff --git a/feature/feature.go b/feature/feature.go new file mode 100644 index 000000000..a0286cebd --- /dev/null +++ b/feature/feature.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package feature handles feature gates. +package feature + +import ( + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/component-base/featuregate" +) + +const ( + // Every capo-specific feature gate should add method here following this template: + // + // // owner: @username + // // alpha: v1.X + // MyFeature featuregate.Feature = "MyFeature". + + // PriorityQueue is a feature gate that controls if the controller uses the controller-runtime PriorityQueue + // instead of the default queue implementation. + // + // alpha: v0.14 + PriorityQueue featuregate.Feature = "PriorityQueue" + + // AutoScaleFromZero is a feature gate that enables the OpenStackMachineTemplate controller that adds + // information in OpenStackMachineTemplate.status required by the cluster-autoscaler to scale from zero + // without the addition of labels + // + // alpha: v0.14 + AutoScaleFromZero featuregate.Feature = "AutoScaleFromZero" +) + +func init() { + runtime.Must(MutableGates.Add(defaultCAPOFeatureGates)) +} + +// defaultCAPOFeatureGates consists of all known capo-specific feature keys. +// To add a new feature, define a key for it above and add it here. +var defaultCAPOFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ + // Every feature should be initiated here: + PriorityQueue: {Default: false, PreRelease: featuregate.Alpha}, + AutoScaleFromZero: {Default: false, PreRelease: featuregate.Alpha}, +} diff --git a/feature/gates.go b/feature/gates.go new file mode 100644 index 000000000..0b3c71947 --- /dev/null +++ b/feature/gates.go @@ -0,0 +1,33 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package feature + +import ( + "k8s.io/component-base/featuregate" +) + +var ( + // MutableGates is a mutable version of DefaultFeatureGate. + // Only top-level commands/options setup and the k8s.io/component-base/featuregate/testing package should make use of this. + // Tests that need to modify featuregate gates for the duration of their test should use: + // defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features., )() + MutableGates = featuregate.NewFeatureGate() + + // Gates is a shared global FeatureGate. + // Top-level commands/options setup that needs to modify this featuregate gate should use DefaultMutableFeatureGate. + Gates featuregate.FeatureGate = MutableGates +) diff --git a/go.mod b/go.mod index 61719d515..ca8114699 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/cluster-api-provider-openstack -go 1.24.0 +go 1.25.0 require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc @@ -8,63 +8,64 @@ require ( github.com/google/go-cmp v0.7.0 github.com/google/gofuzz v1.2.0 github.com/google/uuid v1.6.0 - github.com/gophercloud/gophercloud/v2 v2.8.0 + github.com/gophercloud/gophercloud/v2 v2.11.1 github.com/gophercloud/utils/v2 v2.0.0-20241220104409-2e0af06694a1 - github.com/hashicorp/go-version v1.7.0 - github.com/k-orc/openstack-resource-controller/v2 v2.2.0 - github.com/onsi/ginkgo/v2 v2.26.0 - github.com/onsi/gomega v1.38.2 + github.com/hashicorp/go-version v1.8.0 + github.com/k-orc/openstack-resource-controller/v2 v2.4.0 + github.com/onsi/ginkgo/v2 v2.28.1 + github.com/onsi/gomega v1.39.1 github.com/prometheus/client_golang v1.23.2 github.com/spf13/pflag v1.0.10 go.uber.org/mock v0.6.0 - golang.org/x/crypto v0.43.0 - golang.org/x/text v0.30.0 - gopkg.in/ini.v1 v1.67.0 - k8s.io/api v0.33.5 - k8s.io/apiextensions-apiserver v0.33.5 - k8s.io/apimachinery v0.33.5 - k8s.io/client-go v0.33.5 - k8s.io/code-generator v0.33.5 - k8s.io/component-base v0.33.5 + golang.org/x/crypto v0.49.0 + golang.org/x/text v0.35.0 + gopkg.in/ini.v1 v1.67.1 + k8s.io/api v0.35.3 + k8s.io/apiextensions-apiserver v0.35.3 + k8s.io/apimachinery v0.35.3 + k8s.io/client-go v0.35.3 + k8s.io/code-generator v0.35.3 + k8s.io/component-base v0.35.3 k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 - sigs.k8s.io/cluster-api v1.11.2 - sigs.k8s.io/cluster-api/test v1.11.0 - sigs.k8s.io/controller-runtime v0.21.0 - sigs.k8s.io/structured-merge-diff/v4 v4.7.0 + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 + sigs.k8s.io/cluster-api v1.13.0-beta.0 + sigs.k8s.io/cluster-api/test v1.13.0-beta.0 + sigs.k8s.io/controller-runtime v0.23.3 + sigs.k8s.io/structured-merge-diff/v6 v6.3.2 sigs.k8s.io/yaml v1.6.0 ) require ( al.essio.dev/pkg/shellescape v1.5.1 // indirect - cel.dev/expr v0.19.1 // indirect + cel.dev/expr v0.25.1 // indirect + dario.cat/mergo v1.0.1 // indirect github.com/BurntSushi/toml v1.4.0 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/adrg/xdg v0.5.3 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cloudflare/circl v1.6.1 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v28.3.3+incompatible // indirect - github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/docker v28.5.2+incompatible // indirect + github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect - github.com/emicklei/go-restful/v3 v3.12.2 // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.8.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect @@ -74,83 +75,89 @@ require ( github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gobuffalo/flect v1.0.3 // indirect github.com/gofrs/uuid/v5 v5.3.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/cel-go v0.23.2 // indirect - github.com/google/gnostic-models v0.6.9 // indirect - github.com/google/go-github/v53 v53.2.0 // indirect - github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect + github.com/google/cel-go v0.26.0 // indirect + github.com/google/gnostic-models v0.7.0 // indirect + github.com/google/go-github/v82 v82.0.0 // indirect + github.com/google/go-querystring v1.2.0 // indirect + github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect + github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/sys/sequential v0.6.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect + github.com/olekukonko/errors v1.1.0 // indirect + github.com/olekukonko/ll v0.1.1 // indirect + github.com/olekukonko/tablewriter v1.0.9 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.66.1 // indirect github.com/prometheus/procfs v0.16.1 // indirect - github.com/rivo/uniseg v0.4.2 // indirect - github.com/sagikazarmark/locafero v0.7.0 // indirect - github.com/sourcegraph/conc v0.3.0 // indirect - github.com/spf13/afero v1.12.0 // indirect - github.com/spf13/cast v1.7.1 // indirect - github.com/spf13/cobra v1.9.1 // indirect - github.com/spf13/viper v1.20.1 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/sagikazarmark/locafero v0.11.0 // indirect + github.com/shopspring/decimal v1.4.0 // indirect + github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect + github.com/spf13/afero v1.15.0 // indirect + github.com/spf13/cast v1.10.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/viper v1.21.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/valyala/fastjson v1.6.10 // indirect github.com/x448/float16 v0.8.4 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect - go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect - go.opentelemetry.io/otel/metric v1.34.0 // indirect - go.opentelemetry.io/otel/sdk v1.34.0 // indirect - go.opentelemetry.io/otel/trace v1.34.0 // indirect - go.opentelemetry.io/proto/otlp v1.4.0 // indirect - go.uber.org/automaxprocs v1.6.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect + go.opentelemetry.io/otel v1.40.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect + go.opentelemetry.io/otel/metric v1.40.0 // indirect + go.opentelemetry.io/otel/sdk v1.40.0 // indirect + go.opentelemetry.io/otel/trace v1.40.0 // indirect + go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect + go.uber.org/zap v1.27.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect - golang.org/x/mod v0.28.0 // indirect - golang.org/x/net v0.45.0 // indirect - golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.17.0 // indirect - golang.org/x/sys v0.37.0 // indirect - golang.org/x/term v0.36.0 // indirect + golang.org/x/mod v0.33.0 // indirect + golang.org/x/net v0.52.0 // indirect + golang.org/x/oauth2 v0.36.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/term v0.41.0 // indirect golang.org/x/time v0.9.0 // indirect - golang.org/x/tools v0.37.0 // indirect - golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect + golang.org/x/tools v0.42.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect - google.golang.org/grpc v1.71.3 // indirect - google.golang.org/protobuf v1.36.8 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect + google.golang.org/grpc v1.79.3 // indirect + google.golang.org/protobuf v1.36.11 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.33.5 // indirect - k8s.io/cluster-bootstrap v0.33.3 // indirect - k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 // indirect + k8s.io/apiserver v0.35.3 // indirect + k8s.io/cluster-bootstrap v0.35.2 // indirect + k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/kind v0.29.0 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect + sigs.k8s.io/kind v0.31.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect ) diff --git a/go.sum b/go.sum index 6b72efb5b..ed686ab60 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho= al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= -cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= -cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= @@ -20,8 +20,6 @@ github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXG github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78= github.com/adrg/xdg v0.5.3/go.mod h1:nlTsY+NNiCBGCK2tpm09vRqfVzrc2fLmXGpBLF0zlTQ= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= @@ -30,14 +28,10 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= -github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= -github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= @@ -46,8 +40,13 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coredns/caddy v1.1.1 h1:2eYKZT7i6yxIfGP3qLJoJ7HAsDJqYB+X68g4NYjSrE0= github.com/coredns/caddy v1.1.1/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.28 h1:O8YafUREqUcGbRtcJfOmWU6ifcw2HX76I1QvI5xZpsw= -github.com/coredns/corefile-migration v1.0.28/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= +github.com/coredns/corefile-migration v1.0.31 h1:f7WGhY8M2Jn8P2dVO0p7wSQ1QKsMARl6WEyUjCb/V38= +github.com/coredns/corefile-migration v1.0.31/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -56,16 +55,16 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI= -github.com/docker/docker v28.3.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= +github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= +github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 h1:7QPwrLT79GlD5sizHf27aoY2RTvw62mO6x7mxkScNk0= github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46/go.mod h1:esf2rsHFNlZlxsqsZDojNBcnNs5REqIvRrWRHqX0vEU= -github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= -github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= @@ -76,16 +75,16 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= -github.com/gkampitakis/go-snaps v0.5.14 h1:3fAqdB6BCPKHDMHAKRwtPUwYexKtGrNuw8HX/T/4neo= -github.com/gkampitakis/go-snaps v0.5.14/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= +github.com/gkampitakis/go-snaps v0.5.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01KS3zGE= +github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -117,36 +116,37 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= -github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI= -github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/go-github/v82 v82.0.0 h1:OH09ESON2QwKCUVMYmMcVu1IFKFoaZHwqYaUtr/MVfk= +github.com/google/go-github/v82 v82.0.0/go.mod h1:hQ6Xo0VKfL8RZ7z1hSfB4fvISg0QqHOqe9BP0qo+WvM= +github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= +github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gophercloud/gophercloud/v2 v2.8.0 h1:of2+8tT6+FbEYHfYC8GBu8TXJNsXYSNm9KuvpX7Neqo= -github.com/gophercloud/gophercloud/v2 v2.8.0/go.mod h1:Ki/ILhYZr/5EPebrPL9Ej+tUg4lqx71/YH2JWVeU+Qk= +github.com/gophercloud/gophercloud/v2 v2.11.1 h1:jCs4vLH8sJgRqrPzqVfWgl7uI6JnIIlsgeIRM0uHjxY= +github.com/gophercloud/gophercloud/v2 v2.11.1/go.mod h1:Rm0YvKQ4QYX2rY9XaDKnjRzSGwlG5ge4h6ABYnmkKQM= github.com/gophercloud/utils/v2 v2.0.0-20241220104409-2e0af06694a1 h1:LS70kbNdqoalMwLXEzP9Xb/cYv9UCzWioXaOynxrytc= github.com/gophercloud/utils/v2 v2.0.0-20241220104409-2e0af06694a1/go.mod h1:qDhuzCRKi90/Yyl/yEqkg8+qABEvK44LhP0D3GWKGtY= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= -github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= -github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII= +github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= +github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -157,10 +157,8 @@ github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/k-orc/openstack-resource-controller/v2 v2.2.0 h1:/1gs5b799BfYHPksxLaAY/DdWg7usn4ogFJEm01GU+Y= -github.com/k-orc/openstack-resource-controller/v2 v2.2.0/go.mod h1:lwP69Om+l0Xj8wuxVbYgOfDAJI8+8TGu4SH1RiteyCU= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/k-orc/openstack-resource-controller/v2 v2.4.0 h1:5sRLIe24eIwICl/210LuH3BgeF3LAMq+MI0qyCaZ7MI= +github.com/k-orc/openstack-resource-controller/v2 v2.4.0/go.mod h1:0ucstXuHmAJXXTYJxcqBgNQ3en7YF7Ffr7FnLuBB15w= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -176,14 +174,12 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -201,32 +197,38 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE= -github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw= -github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= -github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= +github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 h1:zrbMGy9YXpIeTnGj4EljqMiZsIcE09mmF8XsD5AYOJc= +github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6/go.mod h1:rEKTHC9roVVicUIfZK7DYrdIoM0EOr8mK1Hj5s3JjH0= +github.com/olekukonko/errors v1.1.0 h1:RNuGIh15QdDenh+hNvKrJkmxxjV4hcS50Db478Ou5sM= +github.com/olekukonko/errors v1.1.0/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y= +github.com/olekukonko/ll v0.1.1 h1:9Dfeed5/Mgaxb9lHRAftLK9pVfYETvHn+If6lywVhJc= +github.com/olekukonko/ll v0.1.1/go.mod h1:2dJo+hYZcJMLMbKwHEWvxCUbAOLc/CXWS9noET22Mdo= +github.com/olekukonko/tablewriter v1.0.9 h1:XGwRsYLC2bY7bNd93Dk51bcPZksWZmLYuaTHR0FqfL8= +github.com/olekukonko/tablewriter v1.0.9/go.mod h1:5c+EBPeSqvXnLLgkm9isDdzR3wjfBkHR9Nhfp3NWrzo= +github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI= +github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= +github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= +github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= -github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= @@ -236,31 +238,31 @@ github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+ github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= -github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo= -github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k= +github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= +github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= -github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= -github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= -github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= -github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= -github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= +github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= +github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -273,6 +275,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= @@ -285,172 +288,146 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/valyala/fastjson v1.6.10 h1:/yjJg8jaVQdYR3arGxPE2X5z89xrlhS0eGXdv+ADTh4= +github.com/valyala/fastjson v1.6.10/go.mod h1:e6FubmQouUNP73jtMLmcbxS6ydWIpOfhz34TSfO3JaE= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= -go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= -go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +go.etcd.io/etcd/api/v3 v3.6.8 h1:gqb1VN92TAI6G2FiBvWcqKtHiIjr4SU2GdXxTwyexbM= +go.etcd.io/etcd/api/v3 v3.6.8/go.mod h1:qyQj1HZPUV3B5cbAL8scG62+fyz5dSxxu0w8pn28N6Q= +go.etcd.io/etcd/client/pkg/v3 v3.6.8 h1:Qs/5C0LNFiqXxYf2GU8MVjYUEXJ6sZaYOz0zEqQgy50= +go.etcd.io/etcd/client/pkg/v3 v3.6.8/go.mod h1:GsiTRUZE2318PggZkAo6sWb6l8JLVrnckTNfbG8PWtw= +go.etcd.io/etcd/client/v3 v3.6.8 h1:B3G76t1UykqAOrbio7s/EPatixQDkQBevN8/mwiplrY= +go.etcd.io/etcd/client/v3 v3.6.8/go.mod h1:MVG4BpSIuumPi+ELF7wYtySETmoTWBHVcDoHdVupwt8= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0 h1:XmiuHzgJt067+a6kwyAzkhXooYVv3/TOw9cM2VfJgUM= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0/go.mod h1:KDgtbWKTQs4bM+VPUr6WlL9m/WXcmkCcBlIzqxPGzmI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb7sGddAr30RRS6xjKy7AZ2JtTOPA3oolgVSw8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0= +go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= +go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDOPmSWQHWywQS6lKL+pb8s3gBLOZUtw4N+mavW1I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 h1:wVZXIWjQSeSmMoxF74LzAnpVQOAFDo3pPji9Y4SOFKc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0/go.mod h1:khvBS2IggMFNwZK/6lEeHg/W57h/IX6J4URh57fuI40= +go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= +go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= +go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= +go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= +go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= +go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= +go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= +go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= -golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo= golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= -golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM= -golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= -golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= +golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= -golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q= -golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= -golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= +golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= -golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= -golang.org/x/tools/go/expect v0.1.0-deprecated h1:jY2C5HGYR5lqex3gEniOQL0r7Dq5+VGVgY1nudX5lXY= -golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24= -google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= -google.golang.org/grpc v1.71.3 h1:iEhneYTxOruJyZAxdAv8Y0iRZvsc5M6KoW7UA0/7jn0= -google.golang.org/grpc v1.71.3/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= -google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= -google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 h1:merA0rdPeUV3YIIfHHcH4qBkiQAc1nfCKSI7lB4cV2M= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409/go.mod h1:fl8J1IvUjCilwZzQowmw2b7HQB2eAuYBabMXzWurF+I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= +google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.1 h1:tVBILHy0R6e4wkYOn3XmiITt/hEVH4TFMYvAX2Ytz6k= +gopkg.in/ini.v1 v1.67.1/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -k8s.io/api v0.33.5 h1:YR+uhYj05jdRpcksv8kjSliW+v9hwXxn6Cv10aR8Juw= -k8s.io/api v0.33.5/go.mod h1:2gzShdwXKT5yPGiqrTrn/U/nLZ7ZyT4WuAj3XGDVgVs= -k8s.io/apiextensions-apiserver v0.33.5 h1:93NZh6rmrcamX/tfv/dZrTsMiQX69ufANmDcKPEgSeA= -k8s.io/apiextensions-apiserver v0.33.5/go.mod h1:JIbyQnNlu6nQa7b1vgFi51pmlXOk8mdn0WJwUJnz/7U= -k8s.io/apimachinery v0.33.5 h1:NiT64hln4TQXeYR18/ES39OrNsjGz8NguxsBgp+6QIo= -k8s.io/apimachinery v0.33.5/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/apiserver v0.33.5 h1:X1Gy33r4YkRLRqTjGjofk7X1/EjSLEVSJ/A+1qjoj60= -k8s.io/apiserver v0.33.5/go.mod h1:Q+b5Btbc8x0PqOCeh/xBTesKk+cXQRN+PF2wdrTKDeg= -k8s.io/client-go v0.33.5 h1:I8BdmQGxInpkMEnJvV6iG7dqzP3JRlpZZlib3OMFc3o= -k8s.io/client-go v0.33.5/go.mod h1:W8PQP4MxbM4ypgagVE65mUUqK1/ByQkSALF9tzuQ6u0= -k8s.io/cluster-bootstrap v0.33.3 h1:u2NTxJ5CFSBFXaDxLQoOWMly8eni31psVso+caq6uwI= -k8s.io/cluster-bootstrap v0.33.3/go.mod h1:p970f8u8jf273zyQ5raD8WUu2XyAl0SAWOY82o7i/ds= -k8s.io/code-generator v0.33.5 h1:KwkOvhwAaorjSwF2MQhhdhL3i8bBmAal/TWhX67kdHw= -k8s.io/code-generator v0.33.5/go.mod h1:Ra+sdZquRakeTGcEnQAPw6BmlZ92IvxwQQTX/XOvOIE= -k8s.io/component-base v0.33.5 h1:4D3kxjEx1pJRy3WHAZsmX3+LCpmd4ftE+2J4v6naTnQ= -k8s.io/component-base v0.33.5/go.mod h1:Zma1YjBVuuGxIbspj1vGR3/5blzo2ARf1v0QTtog1to= -k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 h1:2OX19X59HxDprNCVrWi6jb7LW1PoqTlYqEq5H2oetog= -k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/api v0.35.3 h1:pA2fiBc6+N9PDf7SAiluKGEBuScsTzd2uYBkA5RzNWQ= +k8s.io/api v0.35.3/go.mod h1:9Y9tkBcFwKNq2sxwZTQh1Njh9qHl81D0As56tu42GA4= +k8s.io/apiextensions-apiserver v0.35.3 h1:2fQUhEO7P17sijylbdwt0nBdXP0TvHrHj0KeqHD8FiU= +k8s.io/apiextensions-apiserver v0.35.3/go.mod h1:tK4Kz58ykRpwAEkXUb634HD1ZAegEElktz/B3jgETd8= +k8s.io/apimachinery v0.35.3 h1:MeaUwQCV3tjKP4bcwWGgZ/cp/vpsRnQzqO6J6tJyoF8= +k8s.io/apimachinery v0.35.3/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/apiserver v0.35.3 h1:D2eIcfJ05hEAEewoSDg+05e0aSRwx8Y4Agvd/wiomUI= +k8s.io/apiserver v0.35.3/go.mod h1:JI0n9bHYzSgIxgIrfe21dbduJ9NHzKJ6RchcsmIKWKY= +k8s.io/client-go v0.35.3 h1:s1lZbpN4uI6IxeTM2cpdtrwHcSOBML1ODNTCCfsP1pg= +k8s.io/client-go v0.35.3/go.mod h1:RzoXkc0mzpWIDvBrRnD+VlfXP+lRzqQjCmKtiwZ8Q9c= +k8s.io/cluster-bootstrap v0.35.2 h1:6qGTBbRabtK3NU42fVdeKsWQy5yT7RPyqn5RmXTlGXk= +k8s.io/cluster-bootstrap v0.35.2/go.mod h1:dWypJ4l++6TDt+zJOr3aog2cOZ4kWDAnkcDdsc1vW8Q= +k8s.io/code-generator v0.35.3 h1:NDGCLkEm6Ho65wTdSe2EgErmmtsrezOPwwOchlNc6FQ= +k8s.io/code-generator v0.35.3/go.mod h1:LAVriRGXQusHQ0Ns64SE1ublSswm1KrK7cXn0GuQETg= +k8s.io/component-base v0.35.3 h1:mbKbzoIMy7JDWS/wqZobYW1JDVRn/RKRaoMQHP9c4P0= +k8s.io/component-base v0.35.3/go.mod h1:IZ8LEG30kPN4Et5NeC7vjNv5aU73ku5MS15iZyvyMYk= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a h1:ZV3Zr+/7s7aVbjNGICQt+ppKWsF1tehxggNfbM7XnG8= -k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/cluster-api v1.11.2 h1:uAczaBavU5Y6aDgyoXWtq28k1kalpSZnVItwXHusw1c= -sigs.k8s.io/cluster-api v1.11.2/go.mod h1:C1gJVAjMXRG+M+djjGYNkoi5kBMhFnOUI9QqZDAtMms= -sigs.k8s.io/cluster-api/test v1.11.0 h1:dvwMAb5rm4Z7Kj3l9FkeYTWfSthpN0oX3gvUrd8ej24= -sigs.k8s.io/cluster-api/test v1.11.0/go.mod h1:2f489Lp5TKPGVhNL6V3huq8fp6eb23APlY2cLbhuDBU= -sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8= -sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/kind v0.29.0 h1:3TpCsyh908IkXXpcSnsMjWdwdWjIl7o9IMZImZCWFnI= -sigs.k8s.io/kind v0.29.0/go.mod h1:ldWQisw2NYyM6k64o/tkZng/1qQW7OlzcN5a8geJX3o= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/cluster-api v1.13.0-beta.0 h1:RmnhP+XWKABSQcW86WVGNIFg8bUPUKvEKfD9ucKLmNQ= +sigs.k8s.io/cluster-api v1.13.0-beta.0/go.mod h1:gNQrTS/VtkwT7ItKf5+eUj6uiTjzb5fwF8ksVKHA2Gk= +sigs.k8s.io/cluster-api/test v1.13.0-beta.0 h1:kOMfJG9NgVAS7a675NnwAsr1JxH1yGq9IB+o+AWKbF8= +sigs.k8s.io/cluster-api/test v1.13.0-beta.0/go.mod h1:ESHqwOD5qkZbwguMeGRVALCzdVVjf4dGyoJnLZQgL0s= +sigs.k8s.io/controller-runtime v0.23.3 h1:VjB/vhoPoA9l1kEKZHBMnQF33tdCLQKJtydy4iqwZ80= +sigs.k8s.io/controller-runtime v0.23.3/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/kind v0.31.0 h1:UcT4nzm+YM7YEbqiAKECk+b6dsvc/HRZZu9U0FolL1g= +sigs.k8s.io/kind v0.31.0/go.mod h1:FSqriGaoTPruiXWfRnUXNykF8r2t+fHtK0P0m1AbGF8= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.7.0 h1:qPeWmscJcXP0snki5IYF79Z8xrl8ETFxgMd7wez1XkI= -sigs.k8s.io/structured-merge-diff/v4 v4.7.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt index f80747fb0..991bc7f12 100644 --- a/hack/boilerplate.go.txt +++ b/hack/boilerplate.go.txt @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index b1d8cac6c..fb9f45e4b 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -160,7 +160,7 @@ def file_extension(filename): '.git', '.tiltbuild', 'vendor', - 'orc', + 'openshift', ] # Paths to be ignored for boilerplate detection diff --git a/hack/ci/cloud-init/controller.yaml.tpl b/hack/ci/cloud-init/controller.yaml.tpl index ace405467..e89a44857 100644 --- a/hack/ci/cloud-init/controller.yaml.tpl +++ b/hack/ci/cloud-init/controller.yaml.tpl @@ -10,7 +10,7 @@ # Enable Logging LOGFILE=/opt/stack/logs/stack.sh.log VERBOSE=True - LOG_COLOR=True + LOG_COLOR=False # Host tuning ENABLE_SYSCTL_MEM_TUNING="True" @@ -44,7 +44,7 @@ PUBLIC_BRIDGE_MTU=${MTU} ENABLE_CHASSIS_AS_GW="True" OVN_DBS_LOG_LEVEL="dbg" - Q_ML2_PLUGIN_MECHANISM_DRIVERS="ovn,logger" + Q_ML2_PLUGIN_MECHANISM_DRIVERS="ovn" OVN_L3_CREATE_PUBLIC_NETWORK="True" Q_AGENT="ovn" diff --git a/hack/ci/cloud-init/worker.yaml.tpl b/hack/ci/cloud-init/worker.yaml.tpl index 0a34b69a2..63fd48cb8 100644 --- a/hack/ci/cloud-init/worker.yaml.tpl +++ b/hack/ci/cloud-init/worker.yaml.tpl @@ -9,7 +9,7 @@ # Enable Logging LOGFILE=/opt/stack/logs/stack.sh.log VERBOSE=True - LOG_COLOR=True + LOG_COLOR=False # Host tuning ENABLE_SYSCTL_MEM_TUNING="True" @@ -41,7 +41,7 @@ PUBLIC_BRIDGE_MTU=${MTU} ENABLE_CHASSIS_AS_GW="False" OVN_DBS_LOG_LEVEL="dbg" - Q_ML2_PLUGIN_MECHANISM_DRIVERS="ovn,logger" + Q_ML2_PLUGIN_MECHANISM_DRIVERS="ovn" Q_AGENT="ovn" # WORKAROUND: diff --git a/hack/ci/create_devstack.sh b/hack/ci/create_devstack.sh index 35b66e0ba..8fc40cd96 100755 --- a/hack/ci/create_devstack.sh +++ b/hack/ci/create_devstack.sh @@ -31,7 +31,7 @@ source "${scriptdir}/${RESOURCE_TYPE}.sh" CLUSTER_NAME=${CLUSTER_NAME:-"capo-e2e"} -OPENSTACK_RELEASE=${OPENSTACK_RELEASE:-"2024.2"} +OPENSTACK_RELEASE=${OPENSTACK_RELEASE:-"2025.2"} OPENSTACK_ENABLE_HORIZON=${OPENSTACK_ENABLE_HORIZON:-"false"} # Devstack will create a provider network using this range diff --git a/hack/image-patch/kustomization.yaml b/hack/image-patch/kustomization.yaml index f9032f685..483e205a5 100644 --- a/hack/image-patch/kustomization.yaml +++ b/hack/image-patch/kustomization.yaml @@ -1,16 +1,16 @@ apiVersion: kustomize.config.k8s.io/v1beta1 images: - - name: "" - newName: "" - newTag: "" +- name: "" + newName: "" + newTag: "" kind: Kustomization patchesJson6902: - - path: pull-policy-patch.yaml - target: - group: apps - kind: Deployment - name: controller-name - namespace: namespace - version: v1 +- path: pull-policy-patch.yaml + target: + group: apps + kind: Deployment + name: controller-name + namespace: namespace + version: v1 resources: - - source-manifest.yaml +- source-manifest.yaml diff --git a/hack/tools/Makefile b/hack/tools/Makefile index f027449f9..b3bbff024 100644 --- a/hack/tools/Makefile +++ b/hack/tools/Makefile @@ -15,8 +15,6 @@ ROOT_DIR_RELATIVE := ../.. include $(ROOT_DIR_RELATIVE)/common.mk -GOLANGCI_LINT_VERSION ?= v2.5.0 - # GOTESTSUM version without the leading 'v' GOTESTSUM_VERSION ?= 1.12.0 @@ -126,9 +124,6 @@ GOJQ := $(BIN_DIR)/gojq $(GOJQ): go.mod go.sum | $(BIN_DIR) go build -tags=tools -o $@ github.com/itchyny/gojq/cmd/gojq -GOLANGCI_LINT := $(BIN_DIR)/golangci-lint -$(GOLANGCI_LINT): Makefile ensure-golangci-lint.sh | $(BIN_DIR) - ./ensure-golangci-lint.sh -b $(BIN_DIR) $(GOLANGCI_LINT_VERSION) KUSTOMIZE := $(BIN_DIR)/kustomize $(KUSTOMIZE): go.mod go.sum | $(BIN_DIR) # Build kustomize from tools folder. diff --git a/hack/tools/ensure-golangci-lint.sh b/hack/tools/ensure-golangci-lint.sh deleted file mode 100755 index cf05ba4fc..000000000 --- a/hack/tools/ensure-golangci-lint.sh +++ /dev/null @@ -1,416 +0,0 @@ -#!/bin/sh - -# Downloaded from -# https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh - -set -e - -usage() { - this=$1 - cat </dev/null -} -echoerr() { - echo "$@" 1>&2 -} -log_prefix() { - echo "$0" -} -_logp=6 -log_set_priority() { - _logp="$1" -} -log_priority() { - if test -z "$1"; then - echo "$_logp" - return - fi - [ "$1" -le "$_logp" ] -} -log_tag() { - case $1 in - 0) echo "emerg" ;; - 1) echo "alert" ;; - 2) echo "crit" ;; - 3) echo "err" ;; - 4) echo "warning" ;; - 5) echo "notice" ;; - 6) echo "info" ;; - 7) echo "debug" ;; - *) echo "$1" ;; - esac -} -log_debug() { - log_priority 7 || return 0 - echoerr "$(log_prefix)" "$(log_tag 7)" "$@" -} -log_info() { - log_priority 6 || return 0 - echoerr "$(log_prefix)" "$(log_tag 6)" "$@" -} -log_err() { - log_priority 3 || return 0 - echoerr "$(log_prefix)" "$(log_tag 3)" "$@" -} -log_crit() { - log_priority 2 || return 0 - echoerr "$(log_prefix)" "$(log_tag 2)" "$@" -} -uname_os() { - os=$(uname -s | tr '[:upper:]' '[:lower:]') - case "$os" in - msys*) os="windows" ;; - mingw*) os="windows" ;; - cygwin*) os="windows" ;; - win*) os="windows" ;; - esac - echo "$os" -} -uname_arch() { - arch=$(uname -m) - case $arch in - x86_64) arch="amd64" ;; - x86) arch="386" ;; - i686) arch="386" ;; - i386) arch="386" ;; - aarch64) arch="arm64" ;; - armv5*) arch="armv5" ;; - armv6*) arch="armv6" ;; - armv7*) arch="armv7" ;; - esac - echo ${arch} -} -uname_os_check() { - os=$(uname_os) - case "$os" in - darwin) return 0 ;; - dragonfly) return 0 ;; - freebsd) return 0 ;; - linux) return 0 ;; - android) return 0 ;; - nacl) return 0 ;; - netbsd) return 0 ;; - openbsd) return 0 ;; - plan9) return 0 ;; - solaris) return 0 ;; - windows) return 0 ;; - esac - log_crit "uname_os_check '$(uname -s)' got converted to '$os' which is not a GOOS value." - return 1 -} -uname_arch_check() { - arch=$(uname_arch) - case "$arch" in - 386) return 0 ;; - amd64) return 0 ;; - arm64) return 0 ;; - armv5) return 0 ;; - armv6) return 0 ;; - armv7) return 0 ;; - ppc64) return 0 ;; - ppc64le) return 0 ;; - mips) return 0 ;; - mipsle) return 0 ;; - mips64) return 0 ;; - mips64le) return 0 ;; - s390x) return 0 ;; - riscv64) return 0 ;; - amd64p32) return 0 ;; - esac - log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value." - return 1 -} -untar() { - tarball=$1 - case "${tarball}" in - *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" ;; - *.tar) tar --no-same-owner -xf "${tarball}" ;; - *.zip) unzip "${tarball}" ;; - *) - log_err "untar unknown archive format for ${tarball}" - return 1 - ;; - esac -} -http_download_curl() { - local_file=$1 - source_url=$2 - header=$3 - if [ -z "$header" ]; then - code=$(curl -w '%{http_code}' -sL -o "$local_file" "$source_url") - else - code=$(curl -w '%{http_code}' -sL -H "$header" -o "$local_file" "$source_url") - fi - if [ "$code" != "200" ]; then - log_debug "http_download_curl received HTTP status $code" - return 1 - fi - return 0 -} -http_download_wget() { - local_file=$1 - source_url=$2 - header=$3 - if [ -z "$header" ]; then - wget -q -O "$local_file" "$source_url" - else - wget -q --header "$header" -O "$local_file" "$source_url" - fi -} -http_download() { - log_debug "http_download $2" - if is_command curl; then - http_download_curl "$@" - return - elif is_command wget; then - http_download_wget "$@" - return - fi - log_crit "http_download unable to find wget or curl" - return 1 -} -http_copy() { - tmp=$(mktemp) - http_download "${tmp}" "$1" "$2" || return 1 - body=$(cat "$tmp") - rm -f "${tmp}" - echo "$body" -} -github_release() { - owner_repo=$1 - version=$2 - test -z "$version" && version="latest" - giturl="https://github.com/${owner_repo}/releases/${version}" - json=$(http_copy "$giturl" "Accept:application/json") - test -z "$json" && return 1 - version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//') - test -z "$version" && return 1 - echo "$version" -} -hash_sha256() { - TARGET=${1:-/dev/stdin} - if is_command gsha256sum; then - hash=$(gsha256sum "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command sha256sum; then - hash=$(sha256sum "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command shasum; then - hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command openssl; then - hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f a - else - log_crit "hash_sha256 unable to find command to compute sha-256 hash" - return 1 - fi -} -hash_sha256_verify() { - TARGET=$1 - checksums=$2 - if [ -z "$checksums" ]; then - log_err "hash_sha256_verify checksum file not specified in arg2" - return 1 - fi - BASENAME=${TARGET##*/} - want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1) - if [ -z "$want" ]; then - log_err "hash_sha256_verify unable to find checksum for '${TARGET}' in '${checksums}'" - return 1 - fi - got=$(hash_sha256 "$TARGET") - if [ "$want" != "$got" ]; then - log_err "hash_sha256_verify checksum for '$TARGET' did not verify ${want} vs $got" - return 1 - fi -} -cat /dev/null < 0 { - return true, false, nil - } + flavorID := setterFn{ + name: "Flavor", + fn: func() (bool, bool, error) { + if resolved.FlavorID != "" { + return true, false, nil + } + + flavorID, err := computeService.GetFlavorID(spec.FlavorID, spec.Flavor) + if err != nil { + return false, false, err + } + + resolved.FlavorID = flavorID + return true, true, nil + }, + } - // Network resources are required in order to get ports options. - // Notes: - // - clusterResourceName is not used in this context, so we pass an empty string. In the future, - // we may want to remove that (it's only used for the port description) or allow a user to pass - // a custom description. - // - managedSecurityGroup is not used in this context, so we pass nil. The security groups are - // passed in the spec.SecurityGroups and spec.Ports. - // - We run a safety check to ensure that the resolved.Ports has the same length as the spec.Ports. - // This is to ensure that we don't accidentally add ports to the resolved.Ports that are not in the spec. - specTrunk := ptr.Deref(spec.Trunk, false) - portsOpts, err := networkingService.ConstructPorts(spec.Ports, spec.SecurityGroups, specTrunk, clusterName, openStackServer.Name, nil, nil, spec.Tags) - if err != nil { - return false, false, err - } - if portsOpts != nil && len(portsOpts) != len(spec.Ports) { - return false, false, fmt.Errorf("resolved.Ports has a different length than spec.Ports") - } - resolved.Ports = portsOpts - return true, true, nil + ports := setterFn{ + name: "Ports", + fn: func() (bool, bool, error) { + if len(resolved.Ports) > 0 { + return true, false, nil + } + + // Network resources are required in order to get ports options. + // Notes: + // - clusterResourceName is not used in this context, so we pass an empty string. In the future, + // we may want to remove that (it's only used for the port description) or allow a user to pass + // a custom description. + // - managedSecurityGroup is not used in this context, so we pass nil. The security groups are + // passed in the spec.SecurityGroups and spec.Ports. + // - We run a safety check to ensure that the resolved.Ports has the same length as the spec.Ports. + // This is to ensure that we don't accidentally add ports to the resolved.Ports that are not in the spec. + specTrunk := ptr.Deref(spec.Trunk, false) + portsOpts, err := networkingService.ConstructPorts(spec.Ports, spec.SecurityGroups, specTrunk, clusterName, openStackServer.Name, nil, nil, spec.Tags) + if err != nil { + return false, false, err + } + if portsOpts != nil && len(portsOpts) != len(spec.Ports) { + return false, false, fmt.Errorf("resolved.Ports has a different length than spec.Ports") + } + resolved.Ports = portsOpts + return true, true, nil + }, } // Execute all setters and collate their return values var errs []error + var pendingDependencies []string changed := false done := true for _, setter := range []setterFn{serverGroup, imageID, flavorID, ports} { - thisDone, thisChanged, err := setter() + thisDone, thisChanged, err := setter.fn() changed = changed || thisChanged done = done && thisDone if err != nil { errs = append(errs, err) } + if !thisDone && err == nil { + pendingDependencies = append(pendingDependencies, setter.name) + } } - return changed, done, errors.Join(errs...) + return changed, done, pendingDependencies, errors.Join(errs...) } // InstanceTags returns the tags that should be applied to an instance. diff --git a/pkg/cloud/services/compute/referenced_resources_test.go b/pkg/cloud/services/compute/referenced_resources_test.go index 52ae552a4..7bae0a3ca 100644 --- a/pkg/cloud/services/compute/referenced_resources_test.go +++ b/pkg/cloud/services/compute/referenced_resources_test.go @@ -35,7 +35,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) @@ -186,7 +186,7 @@ func Test_ResolveServerSpec(t *testing.T) { fakeClient := fake.NewFakeClient() scope := scope.NewWithLogger(mockScopeFactory, log) - _, _, err := ResolveServerSpec(context.TODO(), scope, fakeClient, openStackServer) + _, _, _, err := ResolveServerSpec(context.TODO(), scope, fakeClient, openStackServer) if tt.wantErr { g.Expect(err).Error() return diff --git a/pkg/cloud/services/compute/servergroup.go b/pkg/cloud/services/compute/servergroup.go index c208362ab..d75ba103d 100644 --- a/pkg/cloud/services/compute/servergroup.go +++ b/pkg/cloud/services/compute/servergroup.go @@ -22,7 +22,7 @@ import ( "github.com/gophercloud/gophercloud/v2/openstack/compute/v2/servergroups" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) // GetServerGroupID looks up a server group using the passed filter and returns diff --git a/pkg/cloud/services/compute/servergroup_test.go b/pkg/cloud/services/compute/servergroup_test.go index 3f3c22531..5f2e27c80 100644 --- a/pkg/cloud/services/compute/servergroup_test.go +++ b/pkg/cloud/services/compute/servergroup_test.go @@ -25,7 +25,7 @@ import ( "go.uber.org/mock/gomock" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) diff --git a/pkg/cloud/services/loadbalancer/loadbalancer.go b/pkg/cloud/services/loadbalancer/loadbalancer.go index efcd79a16..428ce989d 100644 --- a/pkg/cloud/services/loadbalancer/loadbalancer.go +++ b/pkg/cloud/services/loadbalancer/loadbalancer.go @@ -34,7 +34,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/record" capoerrors "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/names" @@ -45,13 +45,13 @@ import ( const ( networkPrefix string = "k8s-clusterapi" kubeapiLBSuffix string = "kubeapi" - resolvedMsg string = "ControlPlaneEndpoint.Host is not an IP address, using the first resolved IP address" waitForOctaviaLBCleanup = 15 * time.Second ) const ( loadBalancerProvisioningStatusActive = "ACTIVE" loadBalancerProvisioningStatusPendingDelete = "PENDING_DELETE" + poolMemberProvisioningStatusActive = "ACTIVE" ) // Default values for Monitor, sync with `kubebuilder:default` annotations on APIServerLoadBalancerMonitor object. @@ -152,7 +152,8 @@ func (s *Service) ReconcileLoadBalancer(openStackCluster *infrav1.OpenStackClust lbStatus.AllowedCIDRs = nil } - portList := []int{apiServerPort} + portList := make([]int, 0, 1+len(lbSpec.AdditionalPorts)) + portList = append(portList, apiServerPort) portList = append(portList, lbSpec.AdditionalPorts...) for _, port := range portList { if err := s.reconcileAPILoadBalancerListener(lb, openStackCluster, clusterResourceName, port); err != nil { @@ -246,7 +247,7 @@ func getCanonicalAllowedCIDRs(openStackCluster *infrav1.OpenStackCluster) []stri } // Filter invalid CIDRs and convert any IPs into CIDRs. - validCIDRs := []string{} + validCIDRs := make([]string, 0, len(allowedCIDRs)) for _, v := range allowedCIDRs { switch { case utilsnet.IsIPv4String(v): @@ -710,11 +711,20 @@ func (s *Service) ReconcileLoadBalancerMember(openStackCluster *infrav1.OpenStac Tags: openStackCluster.Spec.Tags, } + if openStackCluster.Status.Network.ID != openStackCluster.Status.APIServerLoadBalancer.LoadBalancerNetwork.ID { + lbMemberOpts.SubnetID = openStackCluster.Status.Network.Subnets[0].ID + } + if _, err := s.waitForLoadBalancerActive(lbID); err != nil { return err } - if _, err := s.loadbalancerClient.CreatePoolMember(pool.ID, lbMemberOpts); err != nil { + member, err := s.loadbalancerClient.CreatePoolMember(pool.ID, lbMemberOpts) + if err != nil { + return err + } + + if _, err := s.waitForPoolMemberActive(pool.ID, member.ID); err != nil { return err } @@ -928,6 +938,25 @@ func (s *Service) waitForLoadBalancerActive(id string) (*loadbalancers.LoadBalan return lb, nil } +// Possible Pool Member states are documented here: https://docs.openstack.org/api-ref/load-balancer/v2/#prov-status +func (s *Service) waitForPoolMemberActive(poolID, memberID string) (*pools.Member, error) { + var member *pools.Member + + s.scope.Logger().Info("Waiting for pool member", "pool_id", poolID, "member_id", memberID, "targetStatus", "ACTIVE") + err := wait.ExponentialBackoff(backoff, func() (bool, error) { + var err error + member, err = s.loadbalancerClient.GetPoolMember(poolID, memberID) + if err != nil { + return false, err + } + return member.ProvisioningStatus == poolMemberProvisioningStatusActive, nil + }) + if err != nil { + return nil, err + } + return member, nil +} + func (s *Service) waitForListener(id, target string) error { s.scope.Logger().Info("Waiting for load balancer listener", "id", id, "targetStatus", target) return wait.ExponentialBackoff(backoff, func() (bool, error) { diff --git a/pkg/cloud/services/loadbalancer/loadbalancer_test.go b/pkg/cloud/services/loadbalancer/loadbalancer_test.go index 4c92670ba..033ef9297 100644 --- a/pkg/cloud/services/loadbalancer/loadbalancer_test.go +++ b/pkg/cloud/services/loadbalancer/loadbalancer_test.go @@ -32,10 +32,11 @@ import ( "github.com/gophercloud/gophercloud/v2/openstack/loadbalancer/v2/providers" . "github.com/onsi/gomega" //nolint:revive "go.uber.org/mock/gomock" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) @@ -70,7 +71,7 @@ func Test_ReconcileLoadBalancer(t *testing.T) { Enabled: ptr.To(true), }, DisableAPIServerFloatingIP: ptr.To(true), - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: apiHostname, Port: 6443, }, @@ -190,7 +191,7 @@ func Test_ReconcileLoadBalancer(t *testing.T) { }, }, DisableAPIServerFloatingIP: ptr.To(true), - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: apiHostname, Port: 6443, }, @@ -291,7 +292,7 @@ func Test_ReconcileLoadBalancer(t *testing.T) { }, }, DisableAPIServerFloatingIP: ptr.To(true), - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: apiHostname, Port: 6443, }, @@ -384,7 +385,7 @@ func Test_ReconcileLoadBalancer(t *testing.T) { }, }, DisableAPIServerFloatingIP: ptr.To(true), - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: apiHostname, Port: 6443, }, @@ -541,7 +542,7 @@ func Test_getAPIServerVIPAddress(t *testing.T) { openStackCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ DisableAPIServerFloatingIP: ptr.To(true), - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: apiHostname, Port: 6443, }, @@ -555,7 +556,7 @@ func Test_getAPIServerVIPAddress(t *testing.T) { openStackCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ DisableAPIServerFloatingIP: ptr.To(true), - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: "invalid-api.test-cluster.test", Port: 6443, }, @@ -629,7 +630,7 @@ func Test_getAPIServerFloatingIP(t *testing.T) { name: "API server FIP with valid control plane endpoint", openStackCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: apiHostname, Port: 6443, }, @@ -642,7 +643,7 @@ func Test_getAPIServerFloatingIP(t *testing.T) { name: "API server FIP with invalid control plane endpoint", openStackCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ - ControlPlaneEndpoint: &clusterv1beta1.APIEndpoint{ + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ Host: "invalid-api.test-cluster.test", Port: 6443, }, @@ -926,3 +927,279 @@ func Test_getOrCreateAPILoadBalancer(t *testing.T) { }) } } + +func Test_ReconcileLoadBalancerMember(t *testing.T) { + g := NewWithT(t) + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + const ( + clusterName = "AAAAA" + clusterResourceName = "k8s-clusterapi-cluster-AAAAA" + memberIP = "10.0.0.1" + wrongMemberIP = "10.0.0.20" + port = 6443 + machineName = "machine-1" + + clusterNetID = "aaaaaaaa-bbbb-cccc-dddd-111111111111" + subnetID = "aaaaaaaa-bbbb-cccc-dddd-222222222222" + lbID = "aaaaaaaa-bbbb-cccc-dddd-333333333333" + listenerID = "aaaaaaaa-bbbb-cccc-dddd-444444444444" + poolID = "aaaaaaaa-bbbb-cccc-dddd-555555555555" + memberID = "aaaaaaaa-bbbb-cccc-dddd-666666666666" + lbNetOtherID = "aaaaaaaa-bbbb-cccc-dddd-999999999999" + ) + + makeCluster := func(provider *string, lbNetworkID string) *infrav1.OpenStackCluster { + return &infrav1.OpenStackCluster{ + Spec: infrav1.OpenStackClusterSpec{ + APIServerLoadBalancer: &infrav1.APIServerLoadBalancer{ + Enabled: ptr.To(true), + Provider: provider, + Network: &infrav1.NetworkParam{ + ID: &lbNetworkID, + }, + }, + DisableAPIServerFloatingIP: ptr.To(true), + ControlPlaneEndpoint: &clusterv1.APIEndpoint{ + Host: apiHostname, + Port: port, + }, + Tags: []string{"k8s", "clusterapi"}, + }, + Status: infrav1.OpenStackClusterStatus{ + APIServerLoadBalancer: &infrav1.LoadBalancer{ + ID: lbID, + LoadBalancerNetwork: &infrav1.NetworkStatusWithSubnets{ + NetworkStatus: infrav1.NetworkStatus{ + ID: lbNetworkID, + }, + }, + }, + Network: &infrav1.NetworkStatusWithSubnets{ + NetworkStatus: infrav1.NetworkStatus{ + ID: clusterNetID, + }, + Subnets: []infrav1.Subnet{ + {ID: subnetID}, + }, + }, + }, + } + } + + openStackMachine := &infrav1.OpenStackMachine{ + ObjectMeta: metav1.ObjectMeta{Name: machineName}, + } + + lbtests := []struct { + name string + clusterSpec *infrav1.OpenStackCluster + expectNetwork func(m *mock.MockNetworkClientMockRecorder) + expectLoadBalancer func(m *mock.MockLbClientMockRecorder) + wantError error + }{ + { + name: "LB member exists, dont create", + clusterSpec: makeCluster(nil, clusterNetID), + expectNetwork: func(*mock.MockNetworkClientMockRecorder) {}, + expectLoadBalancer: func(m *mock.MockLbClientMockRecorder) { + activeLB := loadbalancers.LoadBalancer{ + ID: lbID, + Name: clusterResourceName + "-kubeapi", + ProvisioningStatus: "ACTIVE", + } + m.GetLoadBalancer(lbID).Return(&activeLB, nil).AnyTimes() + + pool := pools.Pool{ + ID: poolID, + Name: fmt.Sprintf("%s-kubeapi-%d", clusterResourceName, port), + } + m.ListPools(pools.ListOpts{Name: pool.Name}).Return([]pools.Pool{pool}, nil) + + member := pools.Member{ + Name: fmt.Sprintf("%s-kubeapi-%d-%s", clusterResourceName, port, machineName), + Address: memberIP, + } + m.ListPoolMember(poolID, pools.ListMembersOpts{Name: member.Name}).Return([]pools.Member{member}, nil) + }, + wantError: nil, + }, + { + name: "No LB member, create", + clusterSpec: makeCluster(nil, clusterNetID), + expectNetwork: func(*mock.MockNetworkClientMockRecorder) {}, + expectLoadBalancer: func(m *mock.MockLbClientMockRecorder) { + activeLB := loadbalancers.LoadBalancer{ + ID: lbID, + Name: clusterResourceName + "-kubeapi", + ProvisioningStatus: "ACTIVE", + } + m.GetLoadBalancer(lbID).Return(&activeLB, nil).AnyTimes() + + pool := pools.Pool{ + ID: poolID, + Name: fmt.Sprintf("%s-kubeapi-%d", clusterResourceName, port), + } + m.ListPools(pools.ListOpts{Name: pool.Name}).Return([]pools.Pool{pool}, nil) + + poolMemberName := fmt.Sprintf("%s-kubeapi-%d-%s", clusterResourceName, port, machineName) + m.ListPoolMember(poolID, pools.ListMembersOpts{Name: poolMemberName}).Return([]pools.Member{}, nil) + + m.CreatePoolMember( + poolID, + gomock.AssignableToTypeOf(pools.CreateMemberOpts{}), + ).DoAndReturn(func(_ string, got pools.CreateMemberOpts) (*pools.Member, error) { + // SubnetID must be empty here + g.Expect(got.SubnetID).To(Equal("")) + return &pools.Member{ID: memberID}, nil + }) + + pendingMember := pools.Member{ + ID: memberID, + Name: poolMemberName, + ProvisioningStatus: "PENDING_CREATE", + } + m.GetPoolMember(poolID, memberID).Return(&pendingMember, nil) + + activeMember := pendingMember + activeMember.ProvisioningStatus = "ACTIVE" + m.GetPoolMember(poolID, memberID).Return(&activeMember, nil) + }, + wantError: nil, + }, + { + name: "No pool found, return error", + clusterSpec: makeCluster(nil, clusterNetID), + expectNetwork: func(*mock.MockNetworkClientMockRecorder) {}, + expectLoadBalancer: func(m *mock.MockLbClientMockRecorder) { + activeLB := loadbalancers.LoadBalancer{ + ID: lbID, + Name: clusterResourceName + "-kubeapi", + ProvisioningStatus: "ACTIVE", + } + m.GetLoadBalancer(lbID).Return(&activeLB, nil).AnyTimes() + + poolName := fmt.Sprintf("%s-kubeapi-%d", clusterResourceName, port) + m.ListPools(pools.ListOpts{Name: poolName}).Return([]pools.Pool{}, nil) + }, + wantError: errors.New("load balancer pool does not exist yet"), + }, + { + name: "LB member with wrong address, re-create", + clusterSpec: makeCluster(nil, clusterNetID), + expectNetwork: func(*mock.MockNetworkClientMockRecorder) {}, + expectLoadBalancer: func(m *mock.MockLbClientMockRecorder) { + activeLB := loadbalancers.LoadBalancer{ + ID: lbID, + Name: clusterResourceName + "-kubeapi", + ProvisioningStatus: "ACTIVE", + } + m.GetLoadBalancer(lbID).Return(&activeLB, nil).AnyTimes() + + pool := pools.Pool{ + ID: poolID, + Name: fmt.Sprintf("%s-kubeapi-%d", clusterResourceName, port), + } + m.ListPools(pools.ListOpts{Name: pool.Name}).Return([]pools.Pool{pool}, nil) + + poolMemberName := fmt.Sprintf("%s-kubeapi-%d-%s", clusterResourceName, port, machineName) + + member := pools.Member{ + Name: poolMemberName, + Address: wrongMemberIP, + ID: memberID, + } + m.ListPoolMember(poolID, pools.ListMembersOpts{Name: member.Name}).Return([]pools.Member{member}, nil) + + m.DeletePoolMember(poolID, memberID).Return(nil) + + m.CreatePoolMember( + poolID, + gomock.AssignableToTypeOf(pools.CreateMemberOpts{}), + ).DoAndReturn(func(_ string, got pools.CreateMemberOpts) (*pools.Member, error) { + // SubnetID must be empty here + g.Expect(got.SubnetID).To(Equal("")) + return &pools.Member{ID: memberID}, nil + }) + + activeMember := pools.Member{ + ID: memberID, + Name: poolMemberName, + ProvisioningStatus: "ACTIVE", + } + m.GetPoolMember(poolID, memberID).Return(&activeMember, nil).AnyTimes() + }, + wantError: nil, + }, + { + name: "different LB and cluster networks, set SubnetID on member create", + clusterSpec: makeCluster(nil, lbNetOtherID), + expectNetwork: func(*mock.MockNetworkClientMockRecorder) { + // not used by this path + }, + expectLoadBalancer: func(m *mock.MockLbClientMockRecorder) { + // LB initially ACTIVE whenever we wait + activeLB := loadbalancers.LoadBalancer{ + ID: lbID, + Name: clusterResourceName + "-kubeapi", + ProvisioningStatus: "ACTIVE", + } + m.GetLoadBalancer(lbID).Return(&activeLB, nil).AnyTimes() + + pool := pools.Pool{ + ID: poolID, + Name: fmt.Sprintf("%s-kubeapi-%d", clusterResourceName, port), + } + m.ListPools(pools.ListOpts{Name: pool.Name}).Return([]pools.Pool{pool}, nil) + + poolMemberName := fmt.Sprintf("%s-kubeapi-%d-%s", clusterResourceName, port, machineName) + m.ListPoolMember(poolID, pools.ListMembersOpts{Name: poolMemberName}).Return([]pools.Member{}, nil) + + // Expect CreatePoolMember; capture opts to assert SubnetID is set + m.CreatePoolMember( + poolID, + gomock.AssignableToTypeOf(pools.CreateMemberOpts{}), + ).DoAndReturn(func(_ string, got pools.CreateMemberOpts) (*pools.Member, error) { + g.Expect(got.Address).To(Equal(memberIP)) + g.Expect(got.ProtocolPort).To(Equal(port)) + expName := fmt.Sprintf("%s-kubeapi-%d-%s", clusterResourceName, port, machineName) + g.Expect(got.Name).To(Equal(expName)) + g.Expect(got.SubnetID).To(Equal(subnetID)) + // Tags should pass through + g.Expect(got.Tags).To(ConsistOf("k8s", "clusterapi")) + return &pools.Member{ID: memberID, Address: memberIP, ProtocolPort: port}, nil + }) + + activeMember := pools.Member{ + ID: memberID, + Name: poolMemberName, + ProvisioningStatus: "ACTIVE", + } + m.GetPoolMember(poolID, memberID).Return(&activeMember, nil).AnyTimes() + }, + wantError: nil, + }, + } + + for _, tt := range lbtests { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + log := testr.New(t) + + mockScopeFactory := scope.NewMockScopeFactory(mockCtrl, "") + lbs, err := NewService(scope.NewWithLogger(mockScopeFactory, log)) + g.Expect(err).NotTo(HaveOccurred()) + + tt.expectNetwork(mockScopeFactory.NetworkClient.EXPECT()) + tt.expectLoadBalancer(mockScopeFactory.LbClient.EXPECT()) + + err = lbs.ReconcileLoadBalancerMember(tt.clusterSpec, openStackMachine, clusterName, memberIP) + if tt.wantError != nil { + g.Expect(err).To(MatchError(tt.wantError)) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + }) + } +} diff --git a/pkg/cloud/services/networking/floatingip.go b/pkg/cloud/services/networking/floatingip.go index 139674a2e..7524ef613 100644 --- a/pkg/cloud/services/networking/floatingip.go +++ b/pkg/cloud/services/networking/floatingip.go @@ -27,7 +27,7 @@ import ( "k8s.io/utils/ptr" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/metrics" "sigs.k8s.io/cluster-api-provider-openstack/pkg/record" "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/names" diff --git a/pkg/cloud/services/networking/floatingip_test.go b/pkg/cloud/services/networking/floatingip_test.go index 96a125166..8367685f8 100644 --- a/pkg/cloud/services/networking/floatingip_test.go +++ b/pkg/cloud/services/networking/floatingip_test.go @@ -25,7 +25,7 @@ import ( "go.uber.org/mock/gomock" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) diff --git a/pkg/cloud/services/networking/network.go b/pkg/cloud/services/networking/network.go index 484c6cdd1..d5f21fd2d 100644 --- a/pkg/cloud/services/networking/network.go +++ b/pkg/cloud/services/networking/network.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/api/equality" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/metrics" "sigs.k8s.io/cluster-api-provider-openstack/pkg/record" capoerrors "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" diff --git a/pkg/cloud/services/networking/network_test.go b/pkg/cloud/services/networking/network_test.go index 01f86191c..4948db5eb 100644 --- a/pkg/cloud/services/networking/network_test.go +++ b/pkg/cloud/services/networking/network_test.go @@ -29,7 +29,7 @@ import ( "go.uber.org/mock/gomock" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/names" diff --git a/pkg/cloud/services/networking/port.go b/pkg/cloud/services/networking/port.go index d284375e2..eda437e2b 100644 --- a/pkg/cloud/services/networking/port.go +++ b/pkg/cloud/services/networking/port.go @@ -33,7 +33,7 @@ import ( "k8s.io/utils/ptr" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/record" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" capoerrors "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" @@ -663,7 +663,7 @@ func uniqueSortedTags(tags []string) []string { tagsMap[t] = t } - uniqueTags := []string{} + uniqueTags := make([]string, 0, len(tagsMap)) for k := range tagsMap { uniqueTags = append(uniqueTags, k) } diff --git a/pkg/cloud/services/networking/port_test.go b/pkg/cloud/services/networking/port_test.go index a215e2efe..5da17d3ad 100644 --- a/pkg/cloud/services/networking/port_test.go +++ b/pkg/cloud/services/networking/port_test.go @@ -36,7 +36,7 @@ import ( "k8s.io/utils/ptr" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) diff --git a/pkg/cloud/services/networking/router.go b/pkg/cloud/services/networking/router.go index 30222d18c..9b1a19153 100644 --- a/pkg/cloud/services/networking/router.go +++ b/pkg/cloud/services/networking/router.go @@ -25,7 +25,7 @@ import ( "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/ports" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/subnets" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/record" capoerrors "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/filterconvert" diff --git a/pkg/cloud/services/networking/router_test.go b/pkg/cloud/services/networking/router_test.go index 63ffc98f9..8e12d5fea 100644 --- a/pkg/cloud/services/networking/router_test.go +++ b/pkg/cloud/services/networking/router_test.go @@ -26,7 +26,7 @@ import ( . "github.com/onsi/gomega" //nolint:revive "go.uber.org/mock/gomock" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) diff --git a/pkg/cloud/services/networking/securitygroups.go b/pkg/cloud/services/networking/securitygroups.go index 046fb540b..15fdee420 100644 --- a/pkg/cloud/services/networking/securitygroups.go +++ b/pkg/cloud/services/networking/securitygroups.go @@ -26,7 +26,7 @@ import ( "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/extensions/security/rules" "k8s.io/utils/net" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/record" "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/filterconvert" ) @@ -36,7 +36,6 @@ const ( controlPlaneSuffix string = "controlplane" workerSuffix string = "worker" bastionSuffix string = "bastion" - allNodesSuffix string = "allNodes" remoteGroupIDSelf string = "self" ) diff --git a/pkg/cloud/services/networking/securitygroups_rules.go b/pkg/cloud/services/networking/securitygroups_rules.go index 110a89d44..435326141 100644 --- a/pkg/cloud/services/networking/securitygroups_rules.go +++ b/pkg/cloud/services/networking/securitygroups_rules.go @@ -257,7 +257,6 @@ func getSGWorkerAllowAll(remoteGroupIDSelf, secControlPlaneGroupID string) []res // Permit ports that defined in openStackCluster.Spec.APIServerLoadBalancer.AdditionalPorts. func getSGControlPlaneAdditionalPorts(ports []int) []resolvedSecurityGroupRuleSpec { - controlPlaneRules := []resolvedSecurityGroupRuleSpec{} // Preallocate r with len(ports) r := make([]resolvedSecurityGroupRuleSpec, len(ports)) for i, p := range ports { @@ -270,18 +269,13 @@ func getSGControlPlaneAdditionalPorts(ports []int) []resolvedSecurityGroupRuleSp PortRangeMax: p, } } - controlPlaneRules = append(controlPlaneRules, r...) - return controlPlaneRules + return r } func getSGControlPlaneGeneral(remoteGroupIDSelf, secWorkerGroupID string) []resolvedSecurityGroupRuleSpec { - controlPlaneRules := []resolvedSecurityGroupRuleSpec{} - controlPlaneRules = append(controlPlaneRules, getSGControlPlaneCommon(remoteGroupIDSelf, secWorkerGroupID)...) - return controlPlaneRules + return getSGControlPlaneCommon(remoteGroupIDSelf, secWorkerGroupID) } func getSGWorkerGeneral(remoteGroupIDSelf, secControlPlaneGroupID string) []resolvedSecurityGroupRuleSpec { - workerRules := []resolvedSecurityGroupRuleSpec{} - workerRules = append(workerRules, getSGWorkerCommon(remoteGroupIDSelf, secControlPlaneGroupID)...) - return workerRules + return getSGWorkerCommon(remoteGroupIDSelf, secControlPlaneGroupID) } diff --git a/pkg/cloud/services/networking/securitygroups_test.go b/pkg/cloud/services/networking/securitygroups_test.go index 6dc01b49c..a1670faae 100644 --- a/pkg/cloud/services/networking/securitygroups_test.go +++ b/pkg/cloud/services/networking/securitygroups_test.go @@ -29,7 +29,7 @@ import ( "go.uber.org/mock/gomock" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" ) diff --git a/pkg/cloud/services/networking/trunk_test.go b/pkg/cloud/services/networking/trunk_test.go index 8989e8988..1ed130200 100644 --- a/pkg/cloud/services/networking/trunk_test.go +++ b/pkg/cloud/services/networking/trunk_test.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/gomega" //nolint:revive "go.uber.org/mock/gomock" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" ) diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentity.go b/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentity.go index 4a75dae4d..e68eba183 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentity.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentity.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,6 +29,8 @@ import ( // OpenStackClusterIdentityApplyConfiguration represents a declarative configuration of the OpenStackClusterIdentity type for use // with apply. +// +// OpenStackClusterIdentity is a cluster-scoped identity that centralizes OpenStack credentials. type OpenStackClusterIdentityApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -46,29 +48,14 @@ func OpenStackClusterIdentity(name, namespace string) *OpenStackClusterIdentityA return b } -// ExtractOpenStackClusterIdentity extracts the applied configuration owned by fieldManager from -// openStackClusterIdentity. If no managedFields are found in openStackClusterIdentity for fieldManager, a -// OpenStackClusterIdentityApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. +// ExtractOpenStackClusterIdentityFrom extracts the applied configuration owned by fieldManager from +// openStackClusterIdentity for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // openStackClusterIdentity must be a unmodified OpenStackClusterIdentity API object that was retrieved from the Kubernetes API. -// ExtractOpenStackClusterIdentity provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractOpenStackClusterIdentityFrom provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! -func ExtractOpenStackClusterIdentity(openStackClusterIdentity *apiv1alpha1.OpenStackClusterIdentity, fieldManager string) (*OpenStackClusterIdentityApplyConfiguration, error) { - return extractOpenStackClusterIdentity(openStackClusterIdentity, fieldManager, "") -} - -// ExtractOpenStackClusterIdentityStatus is the same as ExtractOpenStackClusterIdentity except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractOpenStackClusterIdentityStatus(openStackClusterIdentity *apiv1alpha1.OpenStackClusterIdentity, fieldManager string) (*OpenStackClusterIdentityApplyConfiguration, error) { - return extractOpenStackClusterIdentity(openStackClusterIdentity, fieldManager, "status") -} - -func extractOpenStackClusterIdentity(openStackClusterIdentity *apiv1alpha1.OpenStackClusterIdentity, fieldManager string, subresource string) (*OpenStackClusterIdentityApplyConfiguration, error) { +func ExtractOpenStackClusterIdentityFrom(openStackClusterIdentity *apiv1alpha1.OpenStackClusterIdentity, fieldManager string, subresource string) (*OpenStackClusterIdentityApplyConfiguration, error) { b := &OpenStackClusterIdentityApplyConfiguration{} err := managedfields.ExtractInto(openStackClusterIdentity, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1alpha1.OpenStackClusterIdentity"), fieldManager, b, subresource) if err != nil { @@ -82,6 +69,22 @@ func extractOpenStackClusterIdentity(openStackClusterIdentity *apiv1alpha1.OpenS return b, nil } +// ExtractOpenStackClusterIdentity extracts the applied configuration owned by fieldManager from +// openStackClusterIdentity. If no managedFields are found in openStackClusterIdentity for fieldManager, a +// OpenStackClusterIdentityApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// openStackClusterIdentity must be a unmodified OpenStackClusterIdentity API object that was retrieved from the Kubernetes API. +// ExtractOpenStackClusterIdentity provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackClusterIdentity(openStackClusterIdentity *apiv1alpha1.OpenStackClusterIdentity, fieldManager string) (*OpenStackClusterIdentityApplyConfiguration, error) { + return ExtractOpenStackClusterIdentityFrom(openStackClusterIdentity, fieldManager, "") +} + +func (b OpenStackClusterIdentityApplyConfiguration) IsApplyConfiguration() {} + // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. @@ -248,8 +251,24 @@ func (b *OpenStackClusterIdentityApplyConfiguration) WithSpec(value *OpenStackCl return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackClusterIdentityApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackClusterIdentityApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenStackClusterIdentityApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackClusterIdentityApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentityspec.go b/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentityspec.go index e8d4ce41d..e12a60248 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentityspec.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/openstackclusteridentityspec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,9 +24,13 @@ import ( // OpenStackClusterIdentitySpecApplyConfiguration represents a declarative configuration of the OpenStackClusterIdentitySpec type for use // with apply. +// +// OpenStackClusterIdentitySpec defines the desired state for an OpenStackClusterIdentity. type OpenStackClusterIdentitySpecApplyConfiguration struct { - SecretRef *OpenStackCredentialSecretReferenceApplyConfiguration `json:"secretRef,omitempty"` - NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + // SecretRef references the credentials Secret containing a `clouds.yaml` file. + SecretRef *OpenStackCredentialSecretReferenceApplyConfiguration `json:"secretRef,omitempty"` + // NamespaceSelector limits which namespaces may use this identity. If nil, all namespaces are allowed. + NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` } // OpenStackClusterIdentitySpecApplyConfiguration constructs a declarative configuration of the OpenStackClusterIdentitySpec type for use with diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/openstackcredentialsecretreference.go b/pkg/generated/applyconfiguration/api/v1alpha1/openstackcredentialsecretreference.go index 5ab540b70..ffeb068cb 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/openstackcredentialsecretreference.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/openstackcredentialsecretreference.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,12 @@ package v1alpha1 // OpenStackCredentialSecretReferenceApplyConfiguration represents a declarative configuration of the OpenStackCredentialSecretReference type for use // with apply. +// +// OpenStackCredentialSecretReference references a Secret containing OpenStack credentials. type OpenStackCredentialSecretReferenceApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name of the Secret which contains a `clouds.yaml` key (and optionally `cacert`). + Name *string `json:"name,omitempty"` + // Namespace where the Secret resides. Namespace *string `json:"namespace,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/openstackserver.go b/pkg/generated/applyconfiguration/api/v1alpha1/openstackserver.go index 0e034aad5..13ecae407 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/openstackserver.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/openstackserver.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,6 +29,8 @@ import ( // OpenStackServerApplyConfiguration represents a declarative configuration of the OpenStackServer type for use // with apply. +// +// OpenStackServer is the Schema for the openstackservers API. type OpenStackServerApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -47,6 +49,27 @@ func OpenStackServer(name, namespace string) *OpenStackServerApplyConfiguration return b } +// ExtractOpenStackServerFrom extracts the applied configuration owned by fieldManager from +// openStackServer for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackServer must be a unmodified OpenStackServer API object that was retrieved from the Kubernetes API. +// ExtractOpenStackServerFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackServerFrom(openStackServer *apiv1alpha1.OpenStackServer, fieldManager string, subresource string) (*OpenStackServerApplyConfiguration, error) { + b := &OpenStackServerApplyConfiguration{} + err := managedfields.ExtractInto(openStackServer, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1alpha1.OpenStackServer"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackServer.Name) + b.WithNamespace(openStackServer.Namespace) + + b.WithKind("OpenStackServer") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1alpha1") + return b, nil +} + // ExtractOpenStackServer extracts the applied configuration owned by fieldManager from // openStackServer. If no managedFields are found in openStackServer for fieldManager, a // OpenStackServerApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +80,17 @@ func OpenStackServer(name, namespace string) *OpenStackServerApplyConfiguration // ExtractOpenStackServer provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! func ExtractOpenStackServer(openStackServer *apiv1alpha1.OpenStackServer, fieldManager string) (*OpenStackServerApplyConfiguration, error) { - return extractOpenStackServer(openStackServer, fieldManager, "") + return ExtractOpenStackServerFrom(openStackServer, fieldManager, "") } -// ExtractOpenStackServerStatus is the same as ExtractOpenStackServer except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractOpenStackServerStatus extracts the applied configuration owned by fieldManager from +// openStackServer for the status subresource. func ExtractOpenStackServerStatus(openStackServer *apiv1alpha1.OpenStackServer, fieldManager string) (*OpenStackServerApplyConfiguration, error) { - return extractOpenStackServer(openStackServer, fieldManager, "status") + return ExtractOpenStackServerFrom(openStackServer, fieldManager, "status") } -func extractOpenStackServer(openStackServer *apiv1alpha1.OpenStackServer, fieldManager string, subresource string) (*OpenStackServerApplyConfiguration, error) { - b := &OpenStackServerApplyConfiguration{} - err := managedfields.ExtractInto(openStackServer, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1alpha1.OpenStackServer"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(openStackServer.Name) - b.WithNamespace(openStackServer.Namespace) - - b.WithKind("OpenStackServer") - b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1alpha1") - return b, nil -} +func (b OpenStackServerApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -257,8 +266,24 @@ func (b *OpenStackServerApplyConfiguration) WithStatus(value *OpenStackServerSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackServerApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackServerApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenStackServerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackServerApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverspec.go b/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverspec.go index 71b818c58..5c1295570 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverspec.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverspec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,30 +20,57 @@ package v1alpha1 import ( v1 "k8s.io/api/core/v1" - v1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" ) // OpenStackServerSpecApplyConfiguration represents a declarative configuration of the OpenStackServerSpec type for use // with apply. +// +// OpenStackServerSpec defines the desired state of OpenStackServer. type OpenStackServerSpecApplyConfiguration struct { - AdditionalBlockDevices []v1beta1.AdditionalBlockDeviceApplyConfiguration `json:"additionalBlockDevices,omitempty"` - AvailabilityZone *string `json:"availabilityZone,omitempty"` - ConfigDrive *bool `json:"configDrive,omitempty"` - Flavor *string `json:"flavor,omitempty"` - FlavorID *string `json:"flavorID,omitempty"` - FloatingIPPoolRef *v1.TypedLocalObjectReference `json:"floatingIPPoolRef,omitempty"` - IdentityRef *v1beta1.OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` - Image *v1beta1.ImageParamApplyConfiguration `json:"image,omitempty"` - Ports []v1beta1.PortOptsApplyConfiguration `json:"ports,omitempty"` - RootVolume *v1beta1.RootVolumeApplyConfiguration `json:"rootVolume,omitempty"` - SSHKeyName *string `json:"sshKeyName,omitempty"` - SecurityGroups []v1beta1.SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` - ServerGroup *v1beta1.ServerGroupParamApplyConfiguration `json:"serverGroup,omitempty"` - ServerMetadata []v1beta1.ServerMetadataApplyConfiguration `json:"serverMetadata,omitempty"` - Tags []string `json:"tags,omitempty"` - Trunk *bool `json:"trunk,omitempty"` - UserDataRef *v1.LocalObjectReference `json:"userDataRef,omitempty"` - SchedulerHintAdditionalProperties []v1beta1.SchedulerHintAdditionalPropertyApplyConfiguration `json:"schedulerHintAdditionalProperties,omitempty"` + // AdditionalBlockDevices is a list of specifications for additional block devices to attach to the server instance. + AdditionalBlockDevices []v1beta2.AdditionalBlockDeviceApplyConfiguration `json:"additionalBlockDevices,omitempty"` + // AvailabilityZone is the availability zone in which to create the server instance. + AvailabilityZone *string `json:"availabilityZone,omitempty"` + // ConfigDrive is a flag to enable config drive for the server instance. + ConfigDrive *bool `json:"configDrive,omitempty"` + // The flavor reference for the flavor for the server instance. + Flavor *string `json:"flavor,omitempty"` + // FlavorID allows flavors to be specified by ID. This field takes precedence + // over Flavor. + FlavorID *string `json:"flavorID,omitempty"` + // FloatingIPPoolRef is a reference to a FloatingIPPool to allocate a floating IP from. + FloatingIPPoolRef *v1.TypedLocalObjectReference `json:"floatingIPPoolRef,omitempty"` + // IdentityRef is a reference to a secret holding OpenStack credentials. + IdentityRef *v1beta2.OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` + // The image to use for the server instance. + Image *v1beta2.ImageParamApplyConfiguration `json:"image,omitempty"` + // Ports to be attached to the server instance. + Ports []v1beta2.PortOptsApplyConfiguration `json:"ports,omitempty"` + // RootVolume is the specification for the root volume of the server instance. + RootVolume *v1beta2.RootVolumeApplyConfiguration `json:"rootVolume,omitempty"` + // SSHKeyName is the name of the SSH key to inject in the instance. + SSHKeyName *string `json:"sshKeyName,omitempty"` + // SecurityGroups is a list of security groups names to assign to the instance. + SecurityGroups []v1beta2.SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` + // ServerGroup is the server group to which the server instance belongs. + ServerGroup *v1beta2.ServerGroupParamApplyConfiguration `json:"serverGroup,omitempty"` + // ServerMetadata is a map of key value pairs to add to the server instance. + ServerMetadata []v1beta2.ServerMetadataApplyConfiguration `json:"serverMetadata,omitempty"` + // Tags which will be added to the machine and all dependent resources + // which support them. These are in addition to Tags defined on the + // cluster. + // Requires Nova api 2.52 minimum! + Tags []string `json:"tags,omitempty"` + // Trunk is a flag to indicate if the server instance is created on a trunk port or not. + Trunk *bool `json:"trunk,omitempty"` + // UserDataRef is a reference to a secret containing the user data to + // be injected into the server instance. + UserDataRef *v1.LocalObjectReference `json:"userDataRef,omitempty"` + // SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + // to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + // such as specifying certain host aggregates or availability zones. + SchedulerHintAdditionalProperties []v1beta2.SchedulerHintAdditionalPropertyApplyConfiguration `json:"schedulerHintAdditionalProperties,omitempty"` } // OpenStackServerSpecApplyConfiguration constructs a declarative configuration of the OpenStackServerSpec type for use with @@ -55,7 +82,7 @@ func OpenStackServerSpec() *OpenStackServerSpecApplyConfiguration { // WithAdditionalBlockDevices adds the given value to the AdditionalBlockDevices field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AdditionalBlockDevices field. -func (b *OpenStackServerSpecApplyConfiguration) WithAdditionalBlockDevices(values ...*v1beta1.AdditionalBlockDeviceApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithAdditionalBlockDevices(values ...*v1beta2.AdditionalBlockDeviceApplyConfiguration) *OpenStackServerSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAdditionalBlockDevices") @@ -108,7 +135,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithFloatingIPPoolRef(value v1.T // WithIdentityRef sets the IdentityRef field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the IdentityRef field is set to the value of the last call. -func (b *OpenStackServerSpecApplyConfiguration) WithIdentityRef(value *v1beta1.OpenStackIdentityReferenceApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithIdentityRef(value *v1beta2.OpenStackIdentityReferenceApplyConfiguration) *OpenStackServerSpecApplyConfiguration { b.IdentityRef = value return b } @@ -116,7 +143,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithIdentityRef(value *v1beta1.O // WithImage sets the Image field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Image field is set to the value of the last call. -func (b *OpenStackServerSpecApplyConfiguration) WithImage(value *v1beta1.ImageParamApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithImage(value *v1beta2.ImageParamApplyConfiguration) *OpenStackServerSpecApplyConfiguration { b.Image = value return b } @@ -124,7 +151,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithImage(value *v1beta1.ImagePa // WithPorts adds the given value to the Ports field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Ports field. -func (b *OpenStackServerSpecApplyConfiguration) WithPorts(values ...*v1beta1.PortOptsApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithPorts(values ...*v1beta2.PortOptsApplyConfiguration) *OpenStackServerSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithPorts") @@ -137,7 +164,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithPorts(values ...*v1beta1.Por // WithRootVolume sets the RootVolume field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RootVolume field is set to the value of the last call. -func (b *OpenStackServerSpecApplyConfiguration) WithRootVolume(value *v1beta1.RootVolumeApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithRootVolume(value *v1beta2.RootVolumeApplyConfiguration) *OpenStackServerSpecApplyConfiguration { b.RootVolume = value return b } @@ -153,7 +180,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithSSHKeyName(value string) *Op // WithSecurityGroups adds the given value to the SecurityGroups field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the SecurityGroups field. -func (b *OpenStackServerSpecApplyConfiguration) WithSecurityGroups(values ...*v1beta1.SecurityGroupParamApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithSecurityGroups(values ...*v1beta2.SecurityGroupParamApplyConfiguration) *OpenStackServerSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSecurityGroups") @@ -166,7 +193,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithSecurityGroups(values ...*v1 // WithServerGroup sets the ServerGroup field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServerGroup field is set to the value of the last call. -func (b *OpenStackServerSpecApplyConfiguration) WithServerGroup(value *v1beta1.ServerGroupParamApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithServerGroup(value *v1beta2.ServerGroupParamApplyConfiguration) *OpenStackServerSpecApplyConfiguration { b.ServerGroup = value return b } @@ -174,7 +201,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithServerGroup(value *v1beta1.S // WithServerMetadata adds the given value to the ServerMetadata field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ServerMetadata field. -func (b *OpenStackServerSpecApplyConfiguration) WithServerMetadata(values ...*v1beta1.ServerMetadataApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithServerMetadata(values ...*v1beta2.ServerMetadataApplyConfiguration) *OpenStackServerSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithServerMetadata") @@ -213,7 +240,7 @@ func (b *OpenStackServerSpecApplyConfiguration) WithUserDataRef(value v1.LocalOb // WithSchedulerHintAdditionalProperties adds the given value to the SchedulerHintAdditionalProperties field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the SchedulerHintAdditionalProperties field. -func (b *OpenStackServerSpecApplyConfiguration) WithSchedulerHintAdditionalProperties(values ...*v1beta1.SchedulerHintAdditionalPropertyApplyConfiguration) *OpenStackServerSpecApplyConfiguration { +func (b *OpenStackServerSpecApplyConfiguration) WithSchedulerHintAdditionalProperties(values ...*v1beta2.SchedulerHintAdditionalPropertyApplyConfiguration) *OpenStackServerSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSchedulerHintAdditionalProperties") diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverstatus.go b/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverstatus.go index a5928779f..0c3521493 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverstatus.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/openstackserverstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,20 +20,30 @@ package v1alpha1 import ( v1 "k8s.io/api/core/v1" - v1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" - corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) // OpenStackServerStatusApplyConfiguration represents a declarative configuration of the OpenStackServerStatus type for use // with apply. +// +// OpenStackServerStatus defines the observed state of OpenStackServer. type OpenStackServerStatusApplyConfiguration struct { - Ready *bool `json:"ready,omitempty"` - InstanceID *string `json:"instanceID,omitempty"` - InstanceState *v1beta1.InstanceState `json:"instanceState,omitempty"` - Addresses []v1.NodeAddress `json:"addresses,omitempty"` - Resolved *ResolvedServerSpecApplyConfiguration `json:"resolved,omitempty"` - Resources *ServerResourcesApplyConfiguration `json:"resources,omitempty"` - Conditions *corev1beta1.Conditions `json:"conditions,omitempty"` + // Ready is true when the OpenStack server is ready. + Ready *bool `json:"ready,omitempty"` + // InstanceID is the ID of the server instance. + InstanceID *string `json:"instanceID,omitempty"` + // InstanceState is the state of the server instance. + InstanceState *v1beta2.InstanceState `json:"instanceState,omitempty"` + // Addresses is the list of addresses of the server instance. + Addresses []v1.NodeAddress `json:"addresses,omitempty"` + // Resolved contains parts of the machine spec with all external + // references fully resolved. + Resolved *ResolvedServerSpecApplyConfiguration `json:"resolved,omitempty"` + // Resources contains references to OpenStack resources created for the machine. + Resources *ServerResourcesApplyConfiguration `json:"resources,omitempty"` + // Conditions defines current service state of the OpenStackServer. + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // OpenStackServerStatusApplyConfiguration constructs a declarative configuration of the OpenStackServerStatus type for use with @@ -61,7 +71,7 @@ func (b *OpenStackServerStatusApplyConfiguration) WithInstanceID(value string) * // WithInstanceState sets the InstanceState field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the InstanceState field is set to the value of the last call. -func (b *OpenStackServerStatusApplyConfiguration) WithInstanceState(value v1beta1.InstanceState) *OpenStackServerStatusApplyConfiguration { +func (b *OpenStackServerStatusApplyConfiguration) WithInstanceState(value v1beta2.InstanceState) *OpenStackServerStatusApplyConfiguration { b.InstanceState = &value return b } @@ -92,10 +102,15 @@ func (b *OpenStackServerStatusApplyConfiguration) WithResources(value *ServerRes return b } -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *OpenStackServerStatusApplyConfiguration) WithConditions(value corev1beta1.Conditions) *OpenStackServerStatusApplyConfiguration { - b.Conditions = &value +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *OpenStackServerStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *OpenStackServerStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } return b } diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/resolvedserverspec.go b/pkg/generated/applyconfiguration/api/v1alpha1/resolvedserverspec.go index b74c7d63a..d2154d2d8 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/resolvedserverspec.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/resolvedserverspec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,16 +19,22 @@ limitations under the License. package v1alpha1 import ( - v1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" ) // ResolvedServerSpecApplyConfiguration represents a declarative configuration of the ResolvedServerSpec type for use // with apply. +// +// ResolvedServerSpec contains resolved references to resources required by the server. type ResolvedServerSpecApplyConfiguration struct { - ServerGroupID *string `json:"serverGroupID,omitempty"` - ImageID *string `json:"imageID,omitempty"` - FlavorID *string `json:"flavorID,omitempty"` - Ports []v1beta1.ResolvedPortSpecApplyConfiguration `json:"ports,omitempty"` + // ServerGroupID is the ID of the server group the server should be added to and is calculated based on ServerGroupFilter. + ServerGroupID *string `json:"serverGroupID,omitempty"` + // ImageID is the ID of the image to use for the server and is calculated based on ImageFilter. + ImageID *string `json:"imageID,omitempty"` + // FlavorID is the ID of the flavor to use. + FlavorID *string `json:"flavorID,omitempty"` + // Ports is the fully resolved list of ports to create for the server. + Ports []v1beta2.ResolvedPortSpecApplyConfiguration `json:"ports,omitempty"` } // ResolvedServerSpecApplyConfiguration constructs a declarative configuration of the ResolvedServerSpec type for use with @@ -64,7 +70,7 @@ func (b *ResolvedServerSpecApplyConfiguration) WithFlavorID(value string) *Resol // WithPorts adds the given value to the Ports field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Ports field. -func (b *ResolvedServerSpecApplyConfiguration) WithPorts(values ...*v1beta1.ResolvedPortSpecApplyConfiguration) *ResolvedServerSpecApplyConfiguration { +func (b *ResolvedServerSpecApplyConfiguration) WithPorts(values ...*v1beta2.ResolvedPortSpecApplyConfiguration) *ResolvedServerSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithPorts") diff --git a/pkg/generated/applyconfiguration/api/v1alpha1/serverresources.go b/pkg/generated/applyconfiguration/api/v1alpha1/serverresources.go index 5b168c01a..501bcfa9b 100644 --- a/pkg/generated/applyconfiguration/api/v1alpha1/serverresources.go +++ b/pkg/generated/applyconfiguration/api/v1alpha1/serverresources.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,13 +19,16 @@ limitations under the License. package v1alpha1 import ( - v1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" ) // ServerResourcesApplyConfiguration represents a declarative configuration of the ServerResources type for use // with apply. +// +// ServerResources contains references to OpenStack resources created for the server. type ServerResourcesApplyConfiguration struct { - Ports []v1beta1.PortStatusApplyConfiguration `json:"ports,omitempty"` + // Ports is the status of the ports created for the server. + Ports []v1beta2.PortStatusApplyConfiguration `json:"ports,omitempty"` } // ServerResourcesApplyConfiguration constructs a declarative configuration of the ServerResources type for use with @@ -37,7 +40,7 @@ func ServerResources() *ServerResourcesApplyConfiguration { // WithPorts adds the given value to the Ports field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Ports field. -func (b *ServerResourcesApplyConfiguration) WithPorts(values ...*v1beta1.PortStatusApplyConfiguration) *ServerResourcesApplyConfiguration { +func (b *ServerResourcesApplyConfiguration) WithPorts(values ...*v1beta2.PortStatusApplyConfiguration) *ServerResourcesApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithPorts") diff --git a/pkg/generated/applyconfiguration/api/v1beta1/additionalblockdevice.go b/pkg/generated/applyconfiguration/api/v1beta1/additionalblockdevice.go index eb4f9db91..0c1d6b839 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/additionalblockdevice.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/additionalblockdevice.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,9 +20,21 @@ package v1beta1 // AdditionalBlockDeviceApplyConfiguration represents a declarative configuration of the AdditionalBlockDevice type for use // with apply. +// +// AdditionalBlockDevice is a block device to attach to the server. type AdditionalBlockDeviceApplyConfiguration struct { - Name *string `json:"name,omitempty"` - SizeGiB *int `json:"sizeGiB,omitempty"` + // Name of the block device in the context of a machine. + // If the block device is a volume, the Cinder volume will be named + // as a combination of the machine name and this name. + // Also, this name will be used for tagging the block device. + // Information about the block device tag can be obtained from the OpenStack + // metadata API or the config drive. + // Name cannot be 'root', which is reserved for the root volume. + Name *string `json:"name,omitempty"` + // SizeGiB is the size of the block device in gibibytes (GiB). + SizeGiB *int `json:"sizeGiB,omitempty"` + // Storage specifies the storage type of the block device and + // additional storage options. Storage *BlockDeviceStorageApplyConfiguration `json:"storage,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/addresspair.go b/pkg/generated/applyconfiguration/api/v1beta1/addresspair.go index 4502684a2..18aee3c8a 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/addresspair.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/addresspair.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,7 +21,12 @@ package v1beta1 // AddressPairApplyConfiguration represents a declarative configuration of the AddressPair type for use // with apply. type AddressPairApplyConfiguration struct { - IPAddress *string `json:"ipAddress,omitempty"` + // IPAddress is the IP address of the allowed address pair. Depending on + // the configuration of Neutron, it may be supported to specify a CIDR + // instead of a specific IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // MACAddress is the MAC address of the allowed address pair. If not + // specified, the MAC address will be the MAC address of the port. MACAddress *string `json:"macAddress,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/allocationpool.go b/pkg/generated/applyconfiguration/api/v1beta1/allocationpool.go index 34ea49162..973594818 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/allocationpool.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/allocationpool.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,10 @@ package v1beta1 // AllocationPoolApplyConfiguration represents a declarative configuration of the AllocationPool type for use // with apply. type AllocationPoolApplyConfiguration struct { + // Start represents the start of the AllocationPool, that is the lowest IP of the pool. Start *string `json:"start,omitempty"` - End *string `json:"end,omitempty"` + // End represents the end of the AlloctionPool, that is the highest IP of the pool. + End *string `json:"end,omitempty"` } // AllocationPoolApplyConfiguration constructs a declarative configuration of the AllocationPool type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancer.go b/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancer.go index 4d7442ef3..92b822f23 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancer.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancer.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,15 +21,34 @@ package v1beta1 // APIServerLoadBalancerApplyConfiguration represents a declarative configuration of the APIServerLoadBalancer type for use // with apply. type APIServerLoadBalancerApplyConfiguration struct { - Enabled *bool `json:"enabled,omitempty"` - AdditionalPorts []int `json:"additionalPorts,omitempty"` - AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` - Provider *string `json:"provider,omitempty"` - Network *NetworkParamApplyConfiguration `json:"network,omitempty"` - Subnets []SubnetParamApplyConfiguration `json:"subnets,omitempty"` - AvailabilityZone *string `json:"availabilityZone,omitempty"` - Flavor *string `json:"flavor,omitempty"` - Monitor *APIServerLoadBalancerMonitorApplyConfiguration `json:"monitor,omitempty"` + // Enabled defines whether a load balancer should be created. This value + // defaults to true if an APIServerLoadBalancer is given. + // + // There is no reason to set this to false. To disable creation of the + // API server loadbalancer, omit the APIServerLoadBalancer field in the + // cluster spec instead. + Enabled *bool `json:"enabled,omitempty"` + // AdditionalPorts adds additional tcp ports to the load balancer. + AdditionalPorts []int `json:"additionalPorts,omitempty"` + // AllowedCIDRs restrict access to all API-Server listeners to the given address CIDRs. + AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` + // Provider specifies name of a specific Octavia provider to use for the + // API load balancer. The Octavia default will be used if it is not + // specified. + Provider *string `json:"provider,omitempty"` + // Network defines which network should the load balancer be allocated on. + Network *NetworkParamApplyConfiguration `json:"network,omitempty"` + // Subnets define which subnets should the load balancer be allocated on. + // It is expected that subnets are located on the network specified in this resource. + // Only the first element is taken into account. + // kubebuilder:validation:MaxLength:=2 + Subnets []SubnetParamApplyConfiguration `json:"subnets,omitempty"` + // AvailabilityZone is the failure domain that will be used to create the APIServerLoadBalancer Spec. + AvailabilityZone *string `json:"availabilityZone,omitempty"` + // Flavor is the flavor name that will be used to create the APIServerLoadBalancer Spec. + Flavor *string `json:"flavor,omitempty"` + // Monitor contains configuration for the load balancer health monitor. + Monitor *APIServerLoadBalancerMonitorApplyConfiguration `json:"monitor,omitempty"` } // APIServerLoadBalancerApplyConfiguration constructs a declarative configuration of the APIServerLoadBalancer type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancermonitor.go b/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancermonitor.go index fa8e0db7e..2d0499b0b 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancermonitor.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/apiserverloadbalancermonitor.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,10 +20,16 @@ package v1beta1 // APIServerLoadBalancerMonitorApplyConfiguration represents a declarative configuration of the APIServerLoadBalancerMonitor type for use // with apply. +// +// APIServerLoadBalancerMonitor contains configuration for the load balancer health monitor. type APIServerLoadBalancerMonitorApplyConfiguration struct { - Delay *int `json:"delay,omitempty"` - Timeout *int `json:"timeout,omitempty"` - MaxRetries *int `json:"maxRetries,omitempty"` + // Delay is the time in seconds between sending probes to members. + Delay *int `json:"delay,omitempty"` + // Timeout is the maximum time in seconds for a monitor to wait for a connection to be established before it times out. + Timeout *int `json:"timeout,omitempty"` + // MaxRetries is the number of successful checks before changing the operating status of the member to ONLINE. + MaxRetries *int `json:"maxRetries,omitempty"` + // MaxRetriesDown is the number of allowed check failures before changing the operating status of the member to ERROR. MaxRetriesDown *int `json:"maxRetriesDown,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/bastion.go b/pkg/generated/applyconfiguration/api/v1beta1/bastion.go index 48396e53c..c90a13f91 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/bastion.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/bastion.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,11 +20,25 @@ package v1beta1 // BastionApplyConfiguration represents a declarative configuration of the Bastion type for use // with apply. +// +// Bastion represents basic information about the bastion node. If you enable bastion, the spec has to be specified. type BastionApplyConfiguration struct { - Enabled *bool `json:"enabled,omitempty"` - Spec *OpenStackMachineSpecApplyConfiguration `json:"spec,omitempty"` - AvailabilityZone *string `json:"availabilityZone,omitempty"` - FloatingIP *string `json:"floatingIP,omitempty"` + // Enabled means that bastion is enabled. The bastion is enabled by + // default if this field is not specified. Set this field to false to disable the + // bastion. + // + // It is not currently possible to remove the bastion from the cluster + // spec without first disabling it by setting this field to false and + // waiting until the bastion has been deleted. + Enabled *bool `json:"enabled,omitempty"` + // Spec for the bastion itself + Spec *OpenStackMachineSpecApplyConfiguration `json:"spec,omitempty"` + // AvailabilityZone is the failure domain that will be used to create the Bastion Spec. + AvailabilityZone *string `json:"availabilityZone,omitempty"` + // FloatingIP which will be associated to the bastion machine. It's the IP address, not UUID. + // The floating IP should already exist and should not be associated with a port. If FIP of this address does not + // exist, CAPO will try to create it, but by default only OpenStack administrators have privileges to do so. + FloatingIP *string `json:"floatingIP,omitempty"` } // BastionApplyConfiguration constructs a declarative configuration of the Bastion type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/bastionstatus.go b/pkg/generated/applyconfiguration/api/v1beta1/bastionstatus.go index c569380eb..2c68c7f6c 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/bastionstatus.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/bastionstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,14 +25,17 @@ import ( // BastionStatusApplyConfiguration represents a declarative configuration of the BastionStatus type for use // with apply. type BastionStatusApplyConfiguration struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SSHKeyName *string `json:"sshKeyName,omitempty"` - State *apiv1beta1.InstanceState `json:"state,omitempty"` - IP *string `json:"ip,omitempty"` - FloatingIP *string `json:"floatingIP,omitempty"` - Resolved *ResolvedMachineSpecApplyConfiguration `json:"resolved,omitempty"` - Resources *MachineResourcesApplyConfiguration `json:"resources,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + SSHKeyName *string `json:"sshKeyName,omitempty"` + State *apiv1beta1.InstanceState `json:"state,omitempty"` + IP *string `json:"ip,omitempty"` + FloatingIP *string `json:"floatingIP,omitempty"` + // Resolved contains parts of the bastion's machine spec with all + // external references fully resolved. + Resolved *ResolvedMachineSpecApplyConfiguration `json:"resolved,omitempty"` + // Resources contains references to OpenStack resources created for the bastion. + Resources *MachineResourcesApplyConfiguration `json:"resources,omitempty"` } // BastionStatusApplyConfiguration constructs a declarative configuration of the BastionStatus type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/bindingprofile.go b/pkg/generated/applyconfiguration/api/v1beta1/bindingprofile.go index 7e3b893ae..17d468a41 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/bindingprofile.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/bindingprofile.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,12 @@ package v1beta1 // BindingProfileApplyConfiguration represents a declarative configuration of the BindingProfile type for use // with apply. type BindingProfileApplyConfiguration struct { + // OVSHWOffload enables or disables the OVS hardware offload feature. + // This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + // See: https://bugs.launchpad.net/nova/+bug/2020813 OVSHWOffload *bool `json:"ovsHWOffload,omitempty"` - TrustedVF *bool `json:"trustedVF,omitempty"` + // TrustedVF enables or disables the “trusted mode” for the VF. + TrustedVF *bool `json:"trustedVF,omitempty"` } // BindingProfileApplyConfiguration constructs a declarative configuration of the BindingProfile type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/blockdevicestorage.go b/pkg/generated/applyconfiguration/api/v1beta1/blockdevicestorage.go index 0f5854692..03a8892ad 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/blockdevicestorage.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/blockdevicestorage.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,8 +24,14 @@ import ( // BlockDeviceStorageApplyConfiguration represents a declarative configuration of the BlockDeviceStorage type for use // with apply. +// +// BlockDeviceStorage is the storage type of a block device to create and +// contains additional storage options. type BlockDeviceStorageApplyConfiguration struct { - Type *apiv1beta1.BlockDeviceType `json:"type,omitempty"` + // Type is the type of block device to create. + // This can be either "Volume" or "Local". + Type *apiv1beta1.BlockDeviceType `json:"type,omitempty"` + // Volume contains additional storage options for a volume block device. Volume *BlockDeviceVolumeApplyConfiguration `json:"volume,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/blockdevicevolume.go b/pkg/generated/applyconfiguration/api/v1beta1/blockdevicevolume.go index 146646ea2..76142fc73 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/blockdevicevolume.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/blockdevicevolume.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,16 @@ package v1beta1 // BlockDeviceVolumeApplyConfiguration represents a declarative configuration of the BlockDeviceVolume type for use // with apply. +// +// BlockDeviceVolume contains additional storage options for a volume block device. type BlockDeviceVolumeApplyConfiguration struct { - Type *string `json:"type,omitempty"` + // Type is the Cinder volume type of the volume. + // If omitted, the default Cinder volume type that is configured in the OpenStack cloud + // will be used. + Type *string `json:"type,omitempty"` + // AvailabilityZone is the volume availability zone to create the volume + // in. If not specified, the volume will be created without an explicit + // availability zone. AvailabilityZone *VolumeAvailabilityZoneApplyConfiguration `json:"availabilityZone,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/clusterinitialization.go b/pkg/generated/applyconfiguration/api/v1beta1/clusterinitialization.go new file mode 100644 index 000000000..e4ce8c8cf --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta1/clusterinitialization.go @@ -0,0 +1,43 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// ClusterInitializationApplyConfiguration represents a declarative configuration of the ClusterInitialization type for use +// with apply. +// +// ClusterInitialization represents the initialization status of the cluster. +type ClusterInitializationApplyConfiguration struct { + // Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + Provisioned *bool `json:"provisioned,omitempty"` +} + +// ClusterInitializationApplyConfiguration constructs a declarative configuration of the ClusterInitialization type for use with +// apply. +func ClusterInitialization() *ClusterInitializationApplyConfiguration { + return &ClusterInitializationApplyConfiguration{} +} + +// WithProvisioned sets the Provisioned field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provisioned field is set to the value of the last call. +func (b *ClusterInitializationApplyConfiguration) WithProvisioned(value bool) *ClusterInitializationApplyConfiguration { + b.Provisioned = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/externalrouteripparam.go b/pkg/generated/applyconfiguration/api/v1beta1/externalrouteripparam.go index 56d2c22a3..14e3d5f63 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/externalrouteripparam.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/externalrouteripparam.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,10 @@ package v1beta1 // ExternalRouterIPParamApplyConfiguration represents a declarative configuration of the ExternalRouterIPParam type for use // with apply. type ExternalRouterIPParamApplyConfiguration struct { - FixedIP *string `json:"fixedIP,omitempty"` - Subnet *SubnetParamApplyConfiguration `json:"subnet,omitempty"` + // The FixedIP in the corresponding subnet + FixedIP *string `json:"fixedIP,omitempty"` + // The subnet in which the FixedIP is used for the Gateway of this router + Subnet *SubnetParamApplyConfiguration `json:"subnet,omitempty"` } // ExternalRouterIPParamApplyConfiguration constructs a declarative configuration of the ExternalRouterIPParam type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/filterbyneutrontags.go b/pkg/generated/applyconfiguration/api/v1beta1/filterbyneutrontags.go index 45beecee1..4bce110d3 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/filterbyneutrontags.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/filterbyneutrontags.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,9 +25,18 @@ import ( // FilterByNeutronTagsApplyConfiguration represents a declarative configuration of the FilterByNeutronTags type for use // with apply. type FilterByNeutronTagsApplyConfiguration struct { - Tags []apiv1beta1.NeutronTag `json:"tags,omitempty"` - TagsAny []apiv1beta1.NeutronTag `json:"tagsAny,omitempty"` - NotTags []apiv1beta1.NeutronTag `json:"notTags,omitempty"` + // Tags is a list of tags to filter by. If specified, the resource must + // have all of the tags specified to be included in the result. + Tags []apiv1beta1.NeutronTag `json:"tags,omitempty"` + // TagsAny is a list of tags to filter by. If specified, the resource + // must have at least one of the tags specified to be included in the + // result. + TagsAny []apiv1beta1.NeutronTag `json:"tagsAny,omitempty"` + // NotTags is a list of tags to filter by. If specified, resources which + // contain all of the given tags will be excluded from the result. + NotTags []apiv1beta1.NeutronTag `json:"notTags,omitempty"` + // NotTagsAny is a list of tags to filter by. If specified, resources + // which contain any of the given tags will be excluded from the result. NotTagsAny []apiv1beta1.NeutronTag `json:"notTagsAny,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/fixedip.go b/pkg/generated/applyconfiguration/api/v1beta1/fixedip.go index 6e2372fa5..4ff81c639 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/fixedip.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/fixedip.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,14 @@ package v1beta1 // FixedIPApplyConfiguration represents a declarative configuration of the FixedIP type for use // with apply. type FixedIPApplyConfiguration struct { - Subnet *SubnetParamApplyConfiguration `json:"subnet,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` + // Subnet is an openstack subnet query that will return the id of a subnet to create + // the fixed IP of a port in. This query must not return more than one subnet. + Subnet *SubnetParamApplyConfiguration `json:"subnet,omitempty"` + // IPAddress is a specific IP address to assign to the port. If Subnet + // is also specified, IPAddress must be a valid IP address in the + // subnet. If Subnet is not specified, IPAddress must be a valid IP + // address in any subnet of the port's network. + IPAddress *string `json:"ipAddress,omitempty"` } // FixedIPApplyConfiguration constructs a declarative configuration of the FixedIP type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/imagefilter.go b/pkg/generated/applyconfiguration/api/v1beta1/imagefilter.go index cd119911b..7ebeb2033 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/imagefilter.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/imagefilter.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,12 @@ package v1beta1 // ImageFilterApplyConfiguration represents a declarative configuration of the ImageFilter type for use // with apply. +// +// ImageFilter describes a query for an image. type ImageFilterApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // The name of the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised. + Name *string `json:"name,omitempty"` + // The tags associated with the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised. Tags []string `json:"tags,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/imageparam.go b/pkg/generated/applyconfiguration/api/v1beta1/imageparam.go index 4caca334a..da1dda9a6 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/imageparam.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/imageparam.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,9 +20,18 @@ package v1beta1 // ImageParamApplyConfiguration represents a declarative configuration of the ImageParam type for use // with apply. +// +// ImageParam describes a glance image. It can be specified by ID, filter, or a +// reference to an ORC Image. type ImageParamApplyConfiguration struct { - ID *string `json:"id,omitempty"` - Filter *ImageFilterApplyConfiguration `json:"filter,omitempty"` + // ID is the uuid of the image. ID will not be validated before use. + ID *string `json:"id,omitempty"` + // Filter describes a query for an image. If specified, the combination + // of name and tags must return a single matching image or an error will + // be raised. + Filter *ImageFilterApplyConfiguration `json:"filter,omitempty"` + // ImageRef is a reference to an ORC Image in the same namespace as the + // referring object. ImageRef *ResourceReferenceApplyConfiguration `json:"imageRef,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/loadbalancer.go b/pkg/generated/applyconfiguration/api/v1beta1/loadbalancer.go index bf85d50d3..8759e974d 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/loadbalancer.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/loadbalancer.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,13 +20,19 @@ package v1beta1 // LoadBalancerApplyConfiguration represents a declarative configuration of the LoadBalancer type for use // with apply. +// +// LoadBalancer represents basic information about the associated OpenStack LoadBalancer. type LoadBalancerApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ID *string `json:"id,omitempty"` - IP *string `json:"ip,omitempty"` - InternalIP *string `json:"internalIP,omitempty"` - AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` - Tags []string `json:"tags,omitempty"` + Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + IP *string `json:"ip,omitempty"` + InternalIP *string `json:"internalIP,omitempty"` + AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` + Tags []string `json:"tags,omitempty"` + // LoadBalancerNetwork contains information about network and/or subnets which the + // loadbalancer is allocated on. + // If subnets are specified within the LoadBalancerNetwork currently only the first + // subnet in the list is taken into account. LoadBalancerNetwork *NetworkStatusWithSubnetsApplyConfiguration `json:"loadBalancerNetwork,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/machineinitialization.go b/pkg/generated/applyconfiguration/api/v1beta1/machineinitialization.go new file mode 100644 index 000000000..8917f4fef --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta1/machineinitialization.go @@ -0,0 +1,43 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// MachineInitializationApplyConfiguration represents a declarative configuration of the MachineInitialization type for use +// with apply. +// +// MachineInitialization contains information about the initialization status of the machine. +type MachineInitializationApplyConfiguration struct { + // Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + Provisioned *bool `json:"provisioned,omitempty"` +} + +// MachineInitializationApplyConfiguration constructs a declarative configuration of the MachineInitialization type for use with +// apply. +func MachineInitialization() *MachineInitializationApplyConfiguration { + return &MachineInitializationApplyConfiguration{} +} + +// WithProvisioned sets the Provisioned field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provisioned field is set to the value of the last call. +func (b *MachineInitializationApplyConfiguration) WithProvisioned(value bool) *MachineInitializationApplyConfiguration { + b.Provisioned = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/machineresources.go b/pkg/generated/applyconfiguration/api/v1beta1/machineresources.go index 5864c133a..90c999325 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/machineresources.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/machineresources.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package v1beta1 // MachineResourcesApplyConfiguration represents a declarative configuration of the MachineResources type for use // with apply. type MachineResourcesApplyConfiguration struct { + // Ports is the status of the ports created for the machine. Ports []PortStatusApplyConfiguration `json:"ports,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/managedsecuritygroups.go b/pkg/generated/applyconfiguration/api/v1beta1/managedsecuritygroups.go index adeafa217..589139ef9 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/managedsecuritygroups.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/managedsecuritygroups.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,11 +20,17 @@ package v1beta1 // ManagedSecurityGroupsApplyConfiguration represents a declarative configuration of the ManagedSecurityGroups type for use // with apply. +// +// ManagedSecurityGroups defines the desired state of security groups and rules for the cluster. type ManagedSecurityGroupsApplyConfiguration struct { - AllNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"allNodesSecurityGroupRules,omitempty"` + // allNodesSecurityGroupRules defines the rules that should be applied to all nodes. + AllNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"allNodesSecurityGroupRules,omitempty"` + // controlPlaneNodesSecurityGroupRules defines the rules that should be applied to control plane nodes. ControlPlaneNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"controlPlaneNodesSecurityGroupRules,omitempty"` - WorkerNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"workerNodesSecurityGroupRules,omitempty"` - AllowAllInClusterTraffic *bool `json:"allowAllInClusterTraffic,omitempty"` + // workerNodesSecurityGroupRules defines the rules that should be applied to worker nodes. + WorkerNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"workerNodesSecurityGroupRules,omitempty"` + // AllowAllInClusterTraffic allows all ingress and egress traffic between cluster nodes when set to true. + AllowAllInClusterTraffic *bool `json:"allowAllInClusterTraffic,omitempty"` } // ManagedSecurityGroupsApplyConfiguration constructs a declarative configuration of the ManagedSecurityGroups type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/networkfilter.go b/pkg/generated/applyconfiguration/api/v1beta1/networkfilter.go index 9cf1e672e..a54106858 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/networkfilter.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/networkfilter.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import ( // NetworkFilterApplyConfiguration represents a declarative configuration of the NetworkFilter type for use // with apply. +// +// NetworkFilter specifies a query to select an OpenStack network. At least one property must be set. type NetworkFilterApplyConfiguration struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` diff --git a/pkg/generated/applyconfiguration/api/v1beta1/networkparam.go b/pkg/generated/applyconfiguration/api/v1beta1/networkparam.go index 51d81cce5..0c7a6fed1 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/networkparam.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/networkparam.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,12 @@ package v1beta1 // NetworkParamApplyConfiguration represents a declarative configuration of the NetworkParam type for use // with apply. +// +// NetworkParam specifies an OpenStack network. It may be specified by either ID or Filter, but not both. type NetworkParamApplyConfiguration struct { - ID *string `json:"id,omitempty"` + // ID is the ID of the network to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + ID *string `json:"id,omitempty"` + // Filter specifies a filter to select an OpenStack network. If provided, cannot be empty. Filter *NetworkFilterApplyConfiguration `json:"filter,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/networkstatus.go b/pkg/generated/applyconfiguration/api/v1beta1/networkstatus.go index 6192950ff..2efafeea2 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/networkstatus.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/networkstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ package v1beta1 // NetworkStatusApplyConfiguration represents a declarative configuration of the NetworkStatus type for use // with apply. +// +// NetworkStatus contains basic information about an existing neutron network. type NetworkStatusApplyConfiguration struct { Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` diff --git a/pkg/generated/applyconfiguration/api/v1beta1/networkstatuswithsubnets.go b/pkg/generated/applyconfiguration/api/v1beta1/networkstatuswithsubnets.go index 6cd650434..73834730d 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/networkstatuswithsubnets.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/networkstatuswithsubnets.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,9 +20,12 @@ package v1beta1 // NetworkStatusWithSubnetsApplyConfiguration represents a declarative configuration of the NetworkStatusWithSubnets type for use // with apply. +// +// NetworkStatusWithSubnets represents basic information about an existing neutron network and an associated set of subnets. type NetworkStatusWithSubnetsApplyConfiguration struct { NetworkStatusApplyConfiguration `json:",inline"` - Subnets []SubnetApplyConfiguration `json:"subnets,omitempty"` + // Subnets is a list of subnets associated with the default cluster network. Machines which use the default cluster network will get an address from all of these subnets. + Subnets []SubnetApplyConfiguration `json:"subnets,omitempty"` } // NetworkStatusWithSubnetsApplyConfiguration constructs a declarative configuration of the NetworkStatusWithSubnets type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/nodeinfo.go b/pkg/generated/applyconfiguration/api/v1beta1/nodeinfo.go new file mode 100644 index 000000000..e70a721f9 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta1/nodeinfo.go @@ -0,0 +1,43 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// NodeInfoApplyConfiguration represents a declarative configuration of the NodeInfo type for use +// with apply. +// +// NodeInfo contains information about the node's architecture and operating system. +type NodeInfoApplyConfiguration struct { + // operatingSystem is a string representing the operating system of the node. + // This may be a string like 'linux' or 'windows'. + OperatingSystem *string `json:"operatingSystem,omitempty"` +} + +// NodeInfoApplyConfiguration constructs a declarative configuration of the NodeInfo type for use with +// apply. +func NodeInfo() *NodeInfoApplyConfiguration { + return &NodeInfoApplyConfiguration{} +} + +// WithOperatingSystem sets the OperatingSystem field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the OperatingSystem field is set to the value of the last call. +func (b *NodeInfoApplyConfiguration) WithOperatingSystem(value string) *NodeInfoApplyConfiguration { + b.OperatingSystem = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackcluster.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackcluster.go index 2db334896..be930efe6 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackcluster.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackcluster.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,6 +29,8 @@ import ( // OpenStackClusterApplyConfiguration represents a declarative configuration of the OpenStackCluster type for use // with apply. +// +// OpenStackCluster is the Schema for the openstackclusters API. type OpenStackClusterApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -47,6 +49,27 @@ func OpenStackCluster(name, namespace string) *OpenStackClusterApplyConfiguratio return b } +// ExtractOpenStackClusterFrom extracts the applied configuration owned by fieldManager from +// openStackCluster for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackCluster must be a unmodified OpenStackCluster API object that was retrieved from the Kubernetes API. +// ExtractOpenStackClusterFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackClusterFrom(openStackCluster *apiv1beta1.OpenStackCluster, fieldManager string, subresource string) (*OpenStackClusterApplyConfiguration, error) { + b := &OpenStackClusterApplyConfiguration{} + err := managedfields.ExtractInto(openStackCluster, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackCluster"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackCluster.Name) + b.WithNamespace(openStackCluster.Namespace) + + b.WithKind("OpenStackCluster") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") + return b, nil +} + // ExtractOpenStackCluster extracts the applied configuration owned by fieldManager from // openStackCluster. If no managedFields are found in openStackCluster for fieldManager, a // OpenStackClusterApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +80,17 @@ func OpenStackCluster(name, namespace string) *OpenStackClusterApplyConfiguratio // ExtractOpenStackCluster provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! func ExtractOpenStackCluster(openStackCluster *apiv1beta1.OpenStackCluster, fieldManager string) (*OpenStackClusterApplyConfiguration, error) { - return extractOpenStackCluster(openStackCluster, fieldManager, "") + return ExtractOpenStackClusterFrom(openStackCluster, fieldManager, "") } -// ExtractOpenStackClusterStatus is the same as ExtractOpenStackCluster except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractOpenStackClusterStatus extracts the applied configuration owned by fieldManager from +// openStackCluster for the status subresource. func ExtractOpenStackClusterStatus(openStackCluster *apiv1beta1.OpenStackCluster, fieldManager string) (*OpenStackClusterApplyConfiguration, error) { - return extractOpenStackCluster(openStackCluster, fieldManager, "status") + return ExtractOpenStackClusterFrom(openStackCluster, fieldManager, "status") } -func extractOpenStackCluster(openStackCluster *apiv1beta1.OpenStackCluster, fieldManager string, subresource string) (*OpenStackClusterApplyConfiguration, error) { - b := &OpenStackClusterApplyConfiguration{} - err := managedfields.ExtractInto(openStackCluster, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackCluster"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(openStackCluster.Name) - b.WithNamespace(openStackCluster.Namespace) - - b.WithKind("OpenStackCluster") - b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") - return b, nil -} +func (b OpenStackClusterApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -257,8 +266,24 @@ func (b *OpenStackClusterApplyConfiguration) WithStatus(value *OpenStackClusterS return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackClusterApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackClusterApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenStackClusterApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackClusterApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterspec.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterspec.go index d260af8c9..5f3750882 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterspec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterspec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,28 +24,121 @@ import ( // OpenStackClusterSpecApplyConfiguration represents a declarative configuration of the OpenStackClusterSpec type for use // with apply. +// +// OpenStackClusterSpec defines the desired state of OpenStackCluster. type OpenStackClusterSpecApplyConfiguration struct { - ManagedSubnets []SubnetSpecApplyConfiguration `json:"managedSubnets,omitempty"` - Router *RouterParamApplyConfiguration `json:"router,omitempty"` - Network *NetworkParamApplyConfiguration `json:"network,omitempty"` - Subnets []SubnetParamApplyConfiguration `json:"subnets,omitempty"` - NetworkMTU *int `json:"networkMTU,omitempty"` - ExternalRouterIPs []ExternalRouterIPParamApplyConfiguration `json:"externalRouterIPs,omitempty"` - ExternalNetwork *NetworkParamApplyConfiguration `json:"externalNetwork,omitempty"` - DisableExternalNetwork *bool `json:"disableExternalNetwork,omitempty"` - APIServerLoadBalancer *APIServerLoadBalancerApplyConfiguration `json:"apiServerLoadBalancer,omitempty"` - DisableAPIServerFloatingIP *bool `json:"disableAPIServerFloatingIP,omitempty"` - APIServerFloatingIP *string `json:"apiServerFloatingIP,omitempty"` - APIServerFixedIP *string `json:"apiServerFixedIP,omitempty"` - APIServerPort *uint16 `json:"apiServerPort,omitempty"` - ManagedSecurityGroups *ManagedSecurityGroupsApplyConfiguration `json:"managedSecurityGroups,omitempty"` - DisablePortSecurity *bool `json:"disablePortSecurity,omitempty"` - Tags []string `json:"tags,omitempty"` - ControlPlaneEndpoint *corev1beta1.APIEndpoint `json:"controlPlaneEndpoint,omitempty"` - ControlPlaneAvailabilityZones []string `json:"controlPlaneAvailabilityZones,omitempty"` - ControlPlaneOmitAvailabilityZone *bool `json:"controlPlaneOmitAvailabilityZone,omitempty"` - Bastion *BastionApplyConfiguration `json:"bastion,omitempty"` - IdentityRef *OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` + // ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network, + // subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4 + // subnet is supported. If you leave this empty, no network will be created. + ManagedSubnets []SubnetSpecApplyConfiguration `json:"managedSubnets,omitempty"` + // Router specifies an existing router to be used if ManagedSubnets are + // specified. If specified, no new router will be created. + Router *RouterParamApplyConfiguration `json:"router,omitempty"` + // Network specifies an existing network to use if no ManagedSubnets + // are specified. + Network *NetworkParamApplyConfiguration `json:"network,omitempty"` + // Subnets specifies existing subnets to use if not ManagedSubnets are + // specified. All subnets must be in the network specified by Network. + // There can be zero, one, or two subnets. If no subnets are specified, + // all subnets in Network will be used. If 2 subnets are specified, one + // must be IPv4 and the other IPv6. + Subnets []SubnetParamApplyConfiguration `json:"subnets,omitempty"` + // NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID. + // This value will be used only if the Cluster actuator creates the network. + // If left empty, the network will have the default MTU defined in Openstack network service. + // To use this field, the Openstack installation requires the net-mtu neutron API extension. + NetworkMTU *int `json:"networkMTU,omitempty"` + // ExternalRouterIPs is an array of externalIPs on the respective subnets. + // This is necessary if the router needs a fixed ip in a specific subnet. + ExternalRouterIPs []ExternalRouterIPParamApplyConfiguration `json:"externalRouterIPs,omitempty"` + // ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs. + // This option is ignored if DisableExternalNetwork is set to true. + // + // If ExternalNetwork is defined it must refer to exactly one external network. + // + // If ExternalNetwork is not defined or is empty the controller will use any + // existing external network as long as there is only one. It is an + // error if ExternalNetwork is not defined and there are multiple + // external networks unless DisableExternalNetwork is also set. + // + // If ExternalNetwork is not defined and there are no external networks + // the controller will proceed as though DisableExternalNetwork was set. + ExternalNetwork *NetworkParamApplyConfiguration `json:"externalNetwork,omitempty"` + // DisableExternalNetwork specifies whether or not to attempt to connect the cluster + // to an external network. This allows for the creation of clusters when connecting + // to an external network is not possible or desirable, e.g. if using a provider network. + DisableExternalNetwork *bool `json:"disableExternalNetwork,omitempty"` + // APIServerLoadBalancer configures the optional LoadBalancer for the APIServer. + // If not specified, no load balancer will be created for the API server. + APIServerLoadBalancer *APIServerLoadBalancerApplyConfiguration `json:"apiServerLoadBalancer,omitempty"` + // DisableAPIServerFloatingIP determines whether or not to attempt to attach a floating + // IP to the API server. This allows for the creation of clusters when attaching a floating + // IP to the API server (and hence, in many cases, exposing the API server to the internet) + // is not possible or desirable, e.g. if using a shared VLAN for communication between + // management and workload clusters or when the management cluster is inside the + // project network. + // This option requires that the API server use a VIP on the cluster network so that the + // underlying machines can change without changing ControlPlaneEndpoint.Host. + // When using a managed load balancer, this VIP will be managed automatically. + // If not using a managed load balancer, cluster configuration will fail without additional + // configuration to manage the VIP on the control plane machines, which falls outside of + // the scope of this controller. + DisableAPIServerFloatingIP *bool `json:"disableAPIServerFloatingIP,omitempty"` + // APIServerFloatingIP is the floatingIP which will be associated with the API server. + // The floatingIP will be created if it does not already exist. + // If not specified, a new floatingIP is allocated. + // This field is not used if DisableAPIServerFloatingIP is set to true. + APIServerFloatingIP *string `json:"apiServerFloatingIP,omitempty"` + // APIServerFixedIP is the fixed IP which will be associated with the API server. + // In the case where the API server has a floating IP but not a managed load balancer, + // this field is not used. + // If a managed load balancer is used and this field is not specified, a fixed IP will + // be dynamically allocated for the load balancer. + // If a managed load balancer is not used AND the API server floating IP is disabled, + // this field MUST be specified and should correspond to a pre-allocated port that + // holds the fixed IP to be used as a VIP. + APIServerFixedIP *string `json:"apiServerFixedIP,omitempty"` + // APIServerPort is the port on which the listener on the APIServer + // will be created. If specified, it must be an integer between 0 and 65535. + APIServerPort *uint16 `json:"apiServerPort,omitempty"` + // ManagedSecurityGroups determines whether OpenStack security groups for the cluster + // will be managed by the OpenStack provider or whether pre-existing security groups will + // be specified as part of the configuration. + // By default, the managed security groups have rules that allow the Kubelet, etcd, and the + // Kubernetes API server to function correctly. + // It's possible to add additional rules to the managed security groups. + // When defined to an empty struct, the managed security groups will be created with the default rules. + ManagedSecurityGroups *ManagedSecurityGroupsApplyConfiguration `json:"managedSecurityGroups,omitempty"` + // DisablePortSecurity disables the port security of the network created for the + // Kubernetes cluster, which also disables SecurityGroups + DisablePortSecurity *bool `json:"disablePortSecurity,omitempty"` + // Tags to set on all resources in cluster which support tags + Tags []string `json:"tags,omitempty"` + // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // It is normally populated automatically by the OpenStackCluster + // controller during cluster provisioning. If it is set on creation the + // control plane endpoint will use the values set here in preference to + // values set elsewhere. + // ControlPlaneEndpoint cannot be modified after ControlPlaneEndpoint.Host has been set. + ControlPlaneEndpoint *corev1beta1.APIEndpoint `json:"controlPlaneEndpoint,omitempty"` + // ControlPlaneAvailabilityZones is the set of availability zones which + // control plane machines may be deployed to. + ControlPlaneAvailabilityZones []string `json:"controlPlaneAvailabilityZones,omitempty"` + // ControlPlaneOmitAvailabilityZone causes availability zone to be + // omitted when creating control plane nodes, allowing the Nova + // scheduler to make a decision on which availability zone to use based + // on other scheduling constraints + ControlPlaneOmitAvailabilityZone *bool `json:"controlPlaneOmitAvailabilityZone,omitempty"` + // Bastion is the OpenStack instance to login the nodes + // + // As a rolling update is not ideal during a bastion host session, we + // prevent changes to a running bastion configuration. To make changes, it's required + // to first set `enabled: false` which will remove the bastion and then changes can be made. + Bastion *BastionApplyConfiguration `json:"bastion,omitempty"` + // IdentityRef is a reference to a secret holding OpenStack credentials + // to be used when reconciling this cluster. It is also to reconcile + // machines unless overridden in the machine spec. + IdentityRef *OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` } // OpenStackClusterSpecApplyConfiguration constructs a declarative configuration of the OpenStackClusterSpec type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterstatus.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterstatus.go index 898b9c3f9..f23cac902 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterstatus.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackclusterstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,19 +25,83 @@ import ( // OpenStackClusterStatusApplyConfiguration represents a declarative configuration of the OpenStackClusterStatus type for use // with apply. +// +// OpenStackClusterStatus defines the observed state of OpenStackCluster. type OpenStackClusterStatusApplyConfiguration struct { - Ready *bool `json:"ready,omitempty"` - Network *NetworkStatusWithSubnetsApplyConfiguration `json:"network,omitempty"` - ExternalNetwork *NetworkStatusApplyConfiguration `json:"externalNetwork,omitempty"` - Router *RouterApplyConfiguration `json:"router,omitempty"` - APIServerLoadBalancer *LoadBalancerApplyConfiguration `json:"apiServerLoadBalancer,omitempty"` - FailureDomains *corev1beta1.FailureDomains `json:"failureDomains,omitempty"` - ControlPlaneSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"controlPlaneSecurityGroup,omitempty"` - WorkerSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"workerSecurityGroup,omitempty"` - BastionSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"bastionSecurityGroup,omitempty"` - Bastion *BastionStatusApplyConfiguration `json:"bastion,omitempty"` - FailureReason *errors.DeprecatedCAPIClusterStatusError `json:"failureReason,omitempty"` - FailureMessage *string `json:"failureMessage,omitempty"` + // Ready is true when the cluster infrastructure is ready. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to determine the ready state of the cluster. + Ready *bool `json:"ready,omitempty"` + // Initialization contains information about the initialization status of the cluster. + Initialization *ClusterInitializationApplyConfiguration `json:"initialization,omitempty"` + // Network contains information about the created OpenStack Network. + Network *NetworkStatusWithSubnetsApplyConfiguration `json:"network,omitempty"` + // ExternalNetwork contains information about the external network used for default ingress and egress traffic. + ExternalNetwork *NetworkStatusApplyConfiguration `json:"externalNetwork,omitempty"` + // Router describes the default cluster router + Router *RouterApplyConfiguration `json:"router,omitempty"` + // APIServerLoadBalancer describes the api server load balancer if one exists + APIServerLoadBalancer *LoadBalancerApplyConfiguration `json:"apiServerLoadBalancer,omitempty"` + // FailureDomains represent OpenStack availability zones + FailureDomains *corev1beta1.FailureDomains `json:"failureDomains,omitempty"` + // ControlPlaneSecurityGroup contains the information about the + // OpenStack Security Group that needs to be applied to control plane + // nodes. + ControlPlaneSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"controlPlaneSecurityGroup,omitempty"` + // WorkerSecurityGroup contains the information about the OpenStack + // Security Group that needs to be applied to worker nodes. + WorkerSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"workerSecurityGroup,omitempty"` + // BastionSecurityGroup contains the information about the OpenStack + // Security Group that needs to be applied to worker nodes. + BastionSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"bastionSecurityGroup,omitempty"` + // Bastion contains the information about the deployed bastion host + Bastion *BastionStatusApplyConfiguration `json:"bastion,omitempty"` + // FailureReason will be set in the event that there is a terminal problem + // reconciling the OpenStackCluster 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 OpenStackCluster'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 + // OpenStackClusters can be added as events to the OpenStackCluster object + // and/or logged in the controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. + FailureReason *errors.DeprecatedCAPIClusterStatusError `json:"failureReason,omitempty"` + // FailureMessage will be set in the event that there is a terminal problem + // reconciling the OpenStackCluster 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 OpenStackCluster'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 + // OpenStackClusters can be added as events to the OpenStackCluster object + // and/or logged in the controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. + FailureMessage *string `json:"failureMessage,omitempty"` + // Conditions defines current service state of the OpenStackCluster. + // This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + // (both during initial provisioning and after the initial provisioning is completed). + Conditions *corev1beta1.Conditions `json:"conditions,omitempty"` } // OpenStackClusterStatusApplyConfiguration constructs a declarative configuration of the OpenStackClusterStatus type for use with @@ -54,6 +118,14 @@ func (b *OpenStackClusterStatusApplyConfiguration) WithReady(value bool) *OpenSt return b } +// WithInitialization sets the Initialization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Initialization field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithInitialization(value *ClusterInitializationApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.Initialization = value + return b +} + // WithNetwork sets the Network field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Network field is set to the value of the last call. @@ -141,3 +213,11 @@ func (b *OpenStackClusterStatusApplyConfiguration) WithFailureMessage(value stri b.FailureMessage = &value return b } + +// WithConditions sets the Conditions field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Conditions field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithConditions(value corev1beta1.Conditions) *OpenStackClusterStatusApplyConfiguration { + b.Conditions = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplate.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplate.go index 20390c2aa..ca6db95aa 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplate.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,6 +29,8 @@ import ( // OpenStackClusterTemplateApplyConfiguration represents a declarative configuration of the OpenStackClusterTemplate type for use // with apply. +// +// OpenStackClusterTemplate is the Schema for the openstackclustertemplates API. type OpenStackClusterTemplateApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -46,29 +48,14 @@ func OpenStackClusterTemplate(name, namespace string) *OpenStackClusterTemplateA return b } -// ExtractOpenStackClusterTemplate extracts the applied configuration owned by fieldManager from -// openStackClusterTemplate. If no managedFields are found in openStackClusterTemplate for fieldManager, a -// OpenStackClusterTemplateApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. +// ExtractOpenStackClusterTemplateFrom extracts the applied configuration owned by fieldManager from +// openStackClusterTemplate for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. // openStackClusterTemplate must be a unmodified OpenStackClusterTemplate API object that was retrieved from the Kubernetes API. -// ExtractOpenStackClusterTemplate provides a way to perform a extract/modify-in-place/apply workflow. +// ExtractOpenStackClusterTemplateFrom provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! -func ExtractOpenStackClusterTemplate(openStackClusterTemplate *apiv1beta1.OpenStackClusterTemplate, fieldManager string) (*OpenStackClusterTemplateApplyConfiguration, error) { - return extractOpenStackClusterTemplate(openStackClusterTemplate, fieldManager, "") -} - -// ExtractOpenStackClusterTemplateStatus is the same as ExtractOpenStackClusterTemplate except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractOpenStackClusterTemplateStatus(openStackClusterTemplate *apiv1beta1.OpenStackClusterTemplate, fieldManager string) (*OpenStackClusterTemplateApplyConfiguration, error) { - return extractOpenStackClusterTemplate(openStackClusterTemplate, fieldManager, "status") -} - -func extractOpenStackClusterTemplate(openStackClusterTemplate *apiv1beta1.OpenStackClusterTemplate, fieldManager string, subresource string) (*OpenStackClusterTemplateApplyConfiguration, error) { +func ExtractOpenStackClusterTemplateFrom(openStackClusterTemplate *apiv1beta1.OpenStackClusterTemplate, fieldManager string, subresource string) (*OpenStackClusterTemplateApplyConfiguration, error) { b := &OpenStackClusterTemplateApplyConfiguration{} err := managedfields.ExtractInto(openStackClusterTemplate, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackClusterTemplate"), fieldManager, b, subresource) if err != nil { @@ -82,6 +69,22 @@ func extractOpenStackClusterTemplate(openStackClusterTemplate *apiv1beta1.OpenSt return b, nil } +// ExtractOpenStackClusterTemplate extracts the applied configuration owned by fieldManager from +// openStackClusterTemplate. If no managedFields are found in openStackClusterTemplate for fieldManager, a +// OpenStackClusterTemplateApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// openStackClusterTemplate must be a unmodified OpenStackClusterTemplate API object that was retrieved from the Kubernetes API. +// ExtractOpenStackClusterTemplate provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackClusterTemplate(openStackClusterTemplate *apiv1beta1.OpenStackClusterTemplate, fieldManager string) (*OpenStackClusterTemplateApplyConfiguration, error) { + return ExtractOpenStackClusterTemplateFrom(openStackClusterTemplate, fieldManager, "") +} + +func (b OpenStackClusterTemplateApplyConfiguration) IsApplyConfiguration() {} + // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. @@ -248,8 +251,24 @@ func (b *OpenStackClusterTemplateApplyConfiguration) WithSpec(value *OpenStackCl return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackClusterTemplateApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackClusterTemplateApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenStackClusterTemplateApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackClusterTemplateApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplateresource.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplateresource.go index 6bf4a6b1d..fd13862c3 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplateresource.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplateresource.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ package v1beta1 // OpenStackClusterTemplateResourceApplyConfiguration represents a declarative configuration of the OpenStackClusterTemplateResource type for use // with apply. +// +// OpenStackClusterTemplateResource describes the data needed to create a OpenStackCluster from a template. type OpenStackClusterTemplateResourceApplyConfiguration struct { Spec *OpenStackClusterSpecApplyConfiguration `json:"spec,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplatespec.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplatespec.go index eba57e32a..a800babca 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplatespec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackclustertemplatespec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ package v1beta1 // OpenStackClusterTemplateSpecApplyConfiguration represents a declarative configuration of the OpenStackClusterTemplateSpec type for use // with apply. +// +// OpenStackClusterTemplateSpec defines the desired state of OpenStackClusterTemplate. type OpenStackClusterTemplateSpecApplyConfiguration struct { Template *OpenStackClusterTemplateResourceApplyConfiguration `json:"template,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackidentityreference.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackidentityreference.go index acb31b6ee..b112df925 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackidentityreference.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackidentityreference.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,11 +20,23 @@ package v1beta1 // OpenStackIdentityReferenceApplyConfiguration represents a declarative configuration of the OpenStackIdentityReference type for use // with apply. +// +// OpenStackIdentityReference is a reference to an infrastructure +// provider identity to be used to provision cluster resources. type OpenStackIdentityReferenceApplyConfiguration struct { - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` + // Type specifies the identity reference type. Defaults to Secret for backward compatibility. + Type *string `json:"type,omitempty"` + // Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + // or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + // The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + // The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name *string `json:"name,omitempty"` + // CloudName specifies the name of the entry in the clouds.yaml file to use. CloudName *string `json:"cloudName,omitempty"` - Region *string `json:"region,omitempty"` + // Region specifies an OpenStack region to use. If specified, it overrides + // any value in clouds.yaml. If specified for an OpenStackMachine, its + // value will be included in providerID. + Region *string `json:"region,omitempty"` } // OpenStackIdentityReferenceApplyConfiguration constructs a declarative configuration of the OpenStackIdentityReference type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachine.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachine.go index 9cd746673..9a288918d 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachine.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachine.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,6 +29,8 @@ import ( // OpenStackMachineApplyConfiguration represents a declarative configuration of the OpenStackMachine type for use // with apply. +// +// OpenStackMachine is the Schema for the openstackmachines API. type OpenStackMachineApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -47,6 +49,27 @@ func OpenStackMachine(name, namespace string) *OpenStackMachineApplyConfiguratio return b } +// ExtractOpenStackMachineFrom extracts the applied configuration owned by fieldManager from +// openStackMachine for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackMachine must be a unmodified OpenStackMachine API object that was retrieved from the Kubernetes API. +// ExtractOpenStackMachineFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackMachineFrom(openStackMachine *apiv1beta1.OpenStackMachine, fieldManager string, subresource string) (*OpenStackMachineApplyConfiguration, error) { + b := &OpenStackMachineApplyConfiguration{} + err := managedfields.ExtractInto(openStackMachine, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachine"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackMachine.Name) + b.WithNamespace(openStackMachine.Namespace) + + b.WithKind("OpenStackMachine") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") + return b, nil +} + // ExtractOpenStackMachine extracts the applied configuration owned by fieldManager from // openStackMachine. If no managedFields are found in openStackMachine for fieldManager, a // OpenStackMachineApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -57,31 +80,17 @@ func OpenStackMachine(name, namespace string) *OpenStackMachineApplyConfiguratio // ExtractOpenStackMachine provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! func ExtractOpenStackMachine(openStackMachine *apiv1beta1.OpenStackMachine, fieldManager string) (*OpenStackMachineApplyConfiguration, error) { - return extractOpenStackMachine(openStackMachine, fieldManager, "") + return ExtractOpenStackMachineFrom(openStackMachine, fieldManager, "") } -// ExtractOpenStackMachineStatus is the same as ExtractOpenStackMachine except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractOpenStackMachineStatus extracts the applied configuration owned by fieldManager from +// openStackMachine for the status subresource. func ExtractOpenStackMachineStatus(openStackMachine *apiv1beta1.OpenStackMachine, fieldManager string) (*OpenStackMachineApplyConfiguration, error) { - return extractOpenStackMachine(openStackMachine, fieldManager, "status") + return ExtractOpenStackMachineFrom(openStackMachine, fieldManager, "status") } -func extractOpenStackMachine(openStackMachine *apiv1beta1.OpenStackMachine, fieldManager string, subresource string) (*OpenStackMachineApplyConfiguration, error) { - b := &OpenStackMachineApplyConfiguration{} - err := managedfields.ExtractInto(openStackMachine, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachine"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(openStackMachine.Name) - b.WithNamespace(openStackMachine.Namespace) - - b.WithKind("OpenStackMachine") - b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") - return b, nil -} +func (b OpenStackMachineApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -257,8 +266,24 @@ func (b *OpenStackMachineApplyConfiguration) WithStatus(value *OpenStackMachineS return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackMachineApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackMachineApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenStackMachineApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackMachineApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinespec.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinespec.go index 5a5bb1cc8..5e99d5148 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinespec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinespec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,23 +24,54 @@ import ( // OpenStackMachineSpecApplyConfiguration represents a declarative configuration of the OpenStackMachineSpec type for use // with apply. +// +// OpenStackMachineSpec defines the desired state of OpenStackMachine. type OpenStackMachineSpecApplyConfiguration struct { - ProviderID *string `json:"providerID,omitempty"` - Flavor *string `json:"flavor,omitempty"` - FlavorID *string `json:"flavorID,omitempty"` - Image *ImageParamApplyConfiguration `json:"image,omitempty"` - SSHKeyName *string `json:"sshKeyName,omitempty"` - Ports []PortOptsApplyConfiguration `json:"ports,omitempty"` - SecurityGroups []SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` - Trunk *bool `json:"trunk,omitempty"` - Tags []string `json:"tags,omitempty"` - ServerMetadata []ServerMetadataApplyConfiguration `json:"serverMetadata,omitempty"` - ConfigDrive *bool `json:"configDrive,omitempty"` - RootVolume *RootVolumeApplyConfiguration `json:"rootVolume,omitempty"` - AdditionalBlockDevices []AdditionalBlockDeviceApplyConfiguration `json:"additionalBlockDevices,omitempty"` - ServerGroup *ServerGroupParamApplyConfiguration `json:"serverGroup,omitempty"` - IdentityRef *OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` - FloatingIPPoolRef *v1.TypedLocalObjectReference `json:"floatingIPPoolRef,omitempty"` + // ProviderID is the unique identifier as specified by the cloud provider. + ProviderID *string `json:"providerID,omitempty"` + // The flavor reference for the flavor for your server instance. + Flavor *string `json:"flavor,omitempty"` + // FlavorID allows flavors to be specified by ID. This field takes precedence + // over Flavor. + FlavorID *string `json:"flavorID,omitempty"` + // The image to use for your server instance. + // If the rootVolume is specified, this will be used when creating the root volume. + Image *ImageParamApplyConfiguration `json:"image,omitempty"` + // The ssh key to inject in the instance + SSHKeyName *string `json:"sshKeyName,omitempty"` + // Ports to be attached to the server instance. They are created if a port with the given name does not already exist. + // If not specified a default port will be added for the default cluster network. + Ports []PortOptsApplyConfiguration `json:"ports,omitempty"` + // The names of the security groups to assign to the instance + SecurityGroups []SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` + // Whether the server instance is created on a trunk port or not. + Trunk *bool `json:"trunk,omitempty"` + // Tags which will be added to the machine and all dependent resources + // which support them. These are in addition to Tags defined on the + // cluster. + // Requires Nova api 2.52 minimum! + Tags []string `json:"tags,omitempty"` + // Metadata mapping. Allows you to create a map of key value pairs to add to the server instance. + ServerMetadata []ServerMetadataApplyConfiguration `json:"serverMetadata,omitempty"` + // Config Drive support + ConfigDrive *bool `json:"configDrive,omitempty"` + // The volume metadata to boot from + RootVolume *RootVolumeApplyConfiguration `json:"rootVolume,omitempty"` + // AdditionalBlockDevices is a list of specifications for additional block devices to attach to the server instance + AdditionalBlockDevices []AdditionalBlockDeviceApplyConfiguration `json:"additionalBlockDevices,omitempty"` + // The server group to assign the machine to. + ServerGroup *ServerGroupParamApplyConfiguration `json:"serverGroup,omitempty"` + // IdentityRef is a reference to a secret holding OpenStack credentials + // to be used when reconciling this machine. If not specified, the + // credentials specified in the cluster will be used. + IdentityRef *OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` + // floatingIPPoolRef is a reference to a IPPool that will be assigned + // to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP + // will be assigned to the OpenStackMachine. + FloatingIPPoolRef *v1.TypedLocalObjectReference `json:"floatingIPPoolRef,omitempty"` + // SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + // to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + // such as specifying certain host aggregates or availability zones. SchedulerHintAdditionalProperties []SchedulerHintAdditionalPropertyApplyConfiguration `json:"schedulerHintAdditionalProperties,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinestatus.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinestatus.go index 03db4df1c..08e82904b 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinestatus.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinestatus.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,16 +27,59 @@ import ( // OpenStackMachineStatusApplyConfiguration represents a declarative configuration of the OpenStackMachineStatus type for use // with apply. +// +// OpenStackMachineStatus defines the observed state of OpenStackMachine. type OpenStackMachineStatusApplyConfiguration struct { - Ready *bool `json:"ready,omitempty"` - InstanceID *string `json:"instanceID,omitempty"` - Addresses []v1.NodeAddress `json:"addresses,omitempty"` - InstanceState *apiv1beta1.InstanceState `json:"instanceState,omitempty"` - Resolved *ResolvedMachineSpecApplyConfiguration `json:"resolved,omitempty"` - Resources *MachineResourcesApplyConfiguration `json:"resources,omitempty"` - FailureReason *errors.DeprecatedCAPIMachineStatusError `json:"failureReason,omitempty"` - FailureMessage *string `json:"failureMessage,omitempty"` - Conditions *corev1beta1.Conditions `json:"conditions,omitempty"` + // Ready is true when the provider resource is ready. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to determine the ready state of the machine. + Ready *bool `json:"ready,omitempty"` + // Initialization contains information about the initialization status of the machine. + Initialization *MachineInitializationApplyConfiguration `json:"initialization,omitempty"` + // InstanceID is the OpenStack instance ID for this machine. + InstanceID *string `json:"instanceID,omitempty"` + // Addresses contains the OpenStack instance associated addresses. + Addresses []v1.NodeAddress `json:"addresses,omitempty"` + // InstanceState is the state of the OpenStack instance for this machine. + // This field is not set anymore by the OpenStackMachine controller. + // Instead, it's set by the OpenStackServer controller. + InstanceState *apiv1beta1.InstanceState `json:"instanceState,omitempty"` + // Resolved contains parts of the machine spec with all external + // references fully resolved. + Resolved *ResolvedMachineSpecApplyConfiguration `json:"resolved,omitempty"` + // Resources contains references to OpenStack resources created for the machine. + Resources *MachineResourcesApplyConfiguration `json:"resources,omitempty"` + // FailureReason explains the reson behind a failure. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. + FailureReason *errors.DeprecatedCAPIMachineStatusError `json:"failureReason,omitempty"` + // 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 will be removed in a future API version. + // Use status.conditions to report failures. + FailureMessage *string `json:"failureMessage,omitempty"` + // Conditions defines current service state of the OpenStackMachine. + // This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + // (both during initial provisioning and after the initial provisioning is completed). + Conditions *corev1beta1.Conditions `json:"conditions,omitempty"` } // OpenStackMachineStatusApplyConfiguration constructs a declarative configuration of the OpenStackMachineStatus type for use with @@ -53,6 +96,14 @@ func (b *OpenStackMachineStatusApplyConfiguration) WithReady(value bool) *OpenSt return b } +// WithInitialization sets the Initialization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Initialization field is set to the value of the last call. +func (b *OpenStackMachineStatusApplyConfiguration) WithInitialization(value *MachineInitializationApplyConfiguration) *OpenStackMachineStatusApplyConfiguration { + b.Initialization = value + return b +} + // WithInstanceID sets the InstanceID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the InstanceID field is set to the value of the last call. diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplate.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplate.go index 2f705cd4f..f954b2b07 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplate.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,10 +29,13 @@ import ( // OpenStackMachineTemplateApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplate type for use // with apply. +// +// OpenStackMachineTemplate is the Schema for the openstackmachinetemplates API. type OpenStackMachineTemplateApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OpenStackMachineTemplateSpecApplyConfiguration `json:"spec,omitempty"` + Spec *OpenStackMachineTemplateSpecApplyConfiguration `json:"spec,omitempty"` + Status *OpenStackMachineTemplateStatusApplyConfiguration `json:"status,omitempty"` } // OpenStackMachineTemplate constructs a declarative configuration of the OpenStackMachineTemplate type for use with @@ -46,6 +49,27 @@ func OpenStackMachineTemplate(name, namespace string) *OpenStackMachineTemplateA return b } +// ExtractOpenStackMachineTemplateFrom extracts the applied configuration owned by fieldManager from +// openStackMachineTemplate for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackMachineTemplate must be a unmodified OpenStackMachineTemplate API object that was retrieved from the Kubernetes API. +// ExtractOpenStackMachineTemplateFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackMachineTemplateFrom(openStackMachineTemplate *apiv1beta1.OpenStackMachineTemplate, fieldManager string, subresource string) (*OpenStackMachineTemplateApplyConfiguration, error) { + b := &OpenStackMachineTemplateApplyConfiguration{} + err := managedfields.ExtractInto(openStackMachineTemplate, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachineTemplate"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackMachineTemplate.Name) + b.WithNamespace(openStackMachineTemplate.Namespace) + + b.WithKind("OpenStackMachineTemplate") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") + return b, nil +} + // ExtractOpenStackMachineTemplate extracts the applied configuration owned by fieldManager from // openStackMachineTemplate. If no managedFields are found in openStackMachineTemplate for fieldManager, a // OpenStackMachineTemplateApplyConfiguration is returned with only the Name, Namespace (if applicable), @@ -56,31 +80,17 @@ func OpenStackMachineTemplate(name, namespace string) *OpenStackMachineTemplateA // ExtractOpenStackMachineTemplate provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! func ExtractOpenStackMachineTemplate(openStackMachineTemplate *apiv1beta1.OpenStackMachineTemplate, fieldManager string) (*OpenStackMachineTemplateApplyConfiguration, error) { - return extractOpenStackMachineTemplate(openStackMachineTemplate, fieldManager, "") + return ExtractOpenStackMachineTemplateFrom(openStackMachineTemplate, fieldManager, "") } -// ExtractOpenStackMachineTemplateStatus is the same as ExtractOpenStackMachineTemplate except -// that it extracts the status subresource applied configuration. -// Experimental! +// ExtractOpenStackMachineTemplateStatus extracts the applied configuration owned by fieldManager from +// openStackMachineTemplate for the status subresource. func ExtractOpenStackMachineTemplateStatus(openStackMachineTemplate *apiv1beta1.OpenStackMachineTemplate, fieldManager string) (*OpenStackMachineTemplateApplyConfiguration, error) { - return extractOpenStackMachineTemplate(openStackMachineTemplate, fieldManager, "status") + return ExtractOpenStackMachineTemplateFrom(openStackMachineTemplate, fieldManager, "status") } -func extractOpenStackMachineTemplate(openStackMachineTemplate *apiv1beta1.OpenStackMachineTemplate, fieldManager string, subresource string) (*OpenStackMachineTemplateApplyConfiguration, error) { - b := &OpenStackMachineTemplateApplyConfiguration{} - err := managedfields.ExtractInto(openStackMachineTemplate, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachineTemplate"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(openStackMachineTemplate.Name) - b.WithNamespace(openStackMachineTemplate.Namespace) - - b.WithKind("OpenStackMachineTemplate") - b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") - return b, nil -} +func (b OpenStackMachineTemplateApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -248,8 +258,32 @@ func (b *OpenStackMachineTemplateApplyConfiguration) WithSpec(value *OpenStackMa return b } +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithStatus(value *OpenStackMachineTemplateStatusApplyConfiguration) *OpenStackMachineTemplateApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackMachineTemplateApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackMachineTemplateApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenStackMachineTemplateApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackMachineTemplateApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplateresource.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplateresource.go index d6ac2bb78..70658976a 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplateresource.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplateresource.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,7 +20,10 @@ package v1beta1 // OpenStackMachineTemplateResourceApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplateResource type for use // with apply. +// +// OpenStackMachineTemplateResource describes the data needed to create a OpenStackMachine from a template. type OpenStackMachineTemplateResourceApplyConfiguration struct { + // Spec is the specification of the desired behavior of the machine. Spec *OpenStackMachineSpecApplyConfiguration `json:"spec,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplatespec.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplatespec.go index 366809e1e..8e4168566 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplatespec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplatespec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ package v1beta1 // OpenStackMachineTemplateSpecApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplateSpec type for use // with apply. +// +// OpenStackMachineTemplateSpec defines the desired state of OpenStackMachineTemplate. type OpenStackMachineTemplateSpecApplyConfiguration struct { Template *OpenStackMachineTemplateResourceApplyConfiguration `json:"template,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplatestatus.go b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplatestatus.go new file mode 100644 index 000000000..e35b51c0a --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta1/openstackmachinetemplatestatus.go @@ -0,0 +1,70 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1 "k8s.io/api/core/v1" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" +) + +// OpenStackMachineTemplateStatusApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplateStatus type for use +// with apply. +// +// OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate. +type OpenStackMachineTemplateStatusApplyConfiguration struct { + // Capacity defines the resource capacity for this machine. + // This value is used for autoscaling from zero operations as defined in: + // https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + Capacity *v1.ResourceList `json:"capacity,omitempty"` + NodeInfo *NodeInfoApplyConfiguration `json:"nodeInfo,omitempty"` + // Conditions defines current service state of the OpenStackMachineTemplate. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. + // (both during initial provisioning and after the initial provisioning is completed). + Conditions *corev1beta1.Conditions `json:"conditions,omitempty"` +} + +// OpenStackMachineTemplateStatusApplyConfiguration constructs a declarative configuration of the OpenStackMachineTemplateStatus type for use with +// apply. +func OpenStackMachineTemplateStatus() *OpenStackMachineTemplateStatusApplyConfiguration { + return &OpenStackMachineTemplateStatusApplyConfiguration{} +} + +// WithCapacity sets the Capacity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Capacity field is set to the value of the last call. +func (b *OpenStackMachineTemplateStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *OpenStackMachineTemplateStatusApplyConfiguration { + b.Capacity = &value + return b +} + +// WithNodeInfo sets the NodeInfo field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeInfo field is set to the value of the last call. +func (b *OpenStackMachineTemplateStatusApplyConfiguration) WithNodeInfo(value *NodeInfoApplyConfiguration) *OpenStackMachineTemplateStatusApplyConfiguration { + b.NodeInfo = value + return b +} + +// WithConditions sets the Conditions field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Conditions field is set to the value of the last call. +func (b *OpenStackMachineTemplateStatusApplyConfiguration) WithConditions(value corev1beta1.Conditions) *OpenStackMachineTemplateStatusApplyConfiguration { + b.Conditions = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta1/portopts.go b/pkg/generated/applyconfiguration/api/v1beta1/portopts.go index a3f365daf..5cce29283 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/portopts.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/portopts.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,13 +21,24 @@ package v1beta1 // PortOptsApplyConfiguration represents a declarative configuration of the PortOpts type for use // with apply. type PortOptsApplyConfiguration struct { - Network *NetworkParamApplyConfiguration `json:"network,omitempty"` - Description *string `json:"description,omitempty"` - NameSuffix *string `json:"nameSuffix,omitempty"` - FixedIPs []FixedIPApplyConfiguration `json:"fixedIPs,omitempty"` - SecurityGroups []SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` - Tags []string `json:"tags,omitempty"` - Trunk *bool `json:"trunk,omitempty"` + // Network is a query for an openstack network that the port will be created or discovered on. + // This will fail if the query returns more than one network. + Network *NetworkParamApplyConfiguration `json:"network,omitempty"` + // Description is a human-readable description for the port. + Description *string `json:"description,omitempty"` + // NameSuffix will be appended to the name of the port if specified. If unspecified, instead the 0-based index of the port in the list is used. + NameSuffix *string `json:"nameSuffix,omitempty"` + // FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network. + FixedIPs []FixedIPApplyConfiguration `json:"fixedIPs,omitempty"` + // SecurityGroups is a list of the names, uuids, filters or any combination these of the security groups to assign to the instance. + SecurityGroups []SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` + // Tags applied to the port (and corresponding trunk, if a trunk is configured.) + // These tags are applied in addition to the instance's tags, which will also be applied to the port. + Tags []string `json:"tags,omitempty"` + // Trunk specifies whether trunking is enabled at the port level. If not + // provided the value is inherited from the machine, or false for a + // bastion host. + Trunk *bool `json:"trunk,omitempty"` ResolvedPortSpecFieldsApplyConfiguration `json:",inline"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/portstatus.go b/pkg/generated/applyconfiguration/api/v1beta1/portstatus.go index 847b2a26a..3f2a2101b 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/portstatus.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/portstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package v1beta1 // PortStatusApplyConfiguration represents a declarative configuration of the PortStatus type for use // with apply. type PortStatusApplyConfiguration struct { + // ID is the unique identifier of the port. ID *string `json:"id,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/resolvedfixedip.go b/pkg/generated/applyconfiguration/api/v1beta1/resolvedfixedip.go index eaaec0e64..42279decb 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/resolvedfixedip.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/resolvedfixedip.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,15 @@ package v1beta1 // ResolvedFixedIPApplyConfiguration represents a declarative configuration of the ResolvedFixedIP type for use // with apply. +// +// ResolvedFixedIP is a FixedIP with the Subnet resolved to an ID. type ResolvedFixedIPApplyConfiguration struct { - SubnetID *string `json:"subnet,omitempty"` + // SubnetID is the id of a subnet to create the fixed IP of a port in. + SubnetID *string `json:"subnet,omitempty"` + // IPAddress is a specific IP address to assign to the port. If SubnetID + // is also specified, IPAddress must be a valid IP address in the + // subnet. If Subnet is not specified, IPAddress must be a valid IP + // address in any subnet of the port's network. IPAddress *string `json:"ipAddress,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/resolvedmachinespec.go b/pkg/generated/applyconfiguration/api/v1beta1/resolvedmachinespec.go index 497f1ea96..2e087c9a1 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/resolvedmachinespec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/resolvedmachinespec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,11 +20,17 @@ package v1beta1 // ResolvedMachineSpecApplyConfiguration represents a declarative configuration of the ResolvedMachineSpec type for use // with apply. +// +// ResolvedMachineSpec contains resolved references to resources required by the machine. type ResolvedMachineSpecApplyConfiguration struct { - ServerGroupID *string `json:"serverGroupID,omitempty"` - ImageID *string `json:"imageID,omitempty"` - FlavorID *string `json:"flavorID,omitempty"` - Ports []ResolvedPortSpecApplyConfiguration `json:"ports,omitempty"` + // ServerGroupID is the ID of the server group the machine should be added to and is calculated based on ServerGroupFilter. + ServerGroupID *string `json:"serverGroupID,omitempty"` + // ImageID is the ID of the image to use for the machine and is calculated based on ImageFilter. + ImageID *string `json:"imageID,omitempty"` + // FlavorID is the ID of the flavor to use. + FlavorID *string `json:"flavorID,omitempty"` + // Ports is the fully resolved list of ports to create for the machine. + Ports []ResolvedPortSpecApplyConfiguration `json:"ports,omitempty"` } // ResolvedMachineSpecApplyConfiguration constructs a declarative configuration of the ResolvedMachineSpec type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspec.go b/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspec.go index 975f056e9..c4f688607 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,14 +20,23 @@ package v1beta1 // ResolvedPortSpecApplyConfiguration represents a declarative configuration of the ResolvedPortSpec type for use // with apply. +// +// ResolvedPortSpec is a PortOpts with all contained references fully resolved. type ResolvedPortSpecApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - NetworkID *string `json:"networkID,omitempty"` - Tags []string `json:"tags,omitempty"` - Trunk *bool `json:"trunk,omitempty"` - FixedIPs []ResolvedFixedIPApplyConfiguration `json:"fixedIPs,omitempty"` - SecurityGroups []string `json:"securityGroups,omitempty"` + // Name is the name of the port. + Name *string `json:"name,omitempty"` + // Description is a human-readable description for the port. + Description *string `json:"description,omitempty"` + // NetworkID is the ID of the network the port will be created in. + NetworkID *string `json:"networkID,omitempty"` + // Tags applied to the port (and corresponding trunk, if a trunk is configured.) + Tags []string `json:"tags,omitempty"` + // Trunk specifies whether trunking is enabled at the port level. + Trunk *bool `json:"trunk,omitempty"` + // FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network. + FixedIPs []ResolvedFixedIPApplyConfiguration `json:"fixedIPs,omitempty"` + // SecurityGroups is a list of security group IDs to assign to the port. + SecurityGroups []string `json:"securityGroups,omitempty"` ResolvedPortSpecFieldsApplyConfiguration `json:",inline"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspecfields.go b/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspecfields.go index 205920116..706e5caa0 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspecfields.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/resolvedportspecfields.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,16 +20,49 @@ package v1beta1 // ResolvedPortSpecFieldsApplyConfiguration represents a declarative configuration of the ResolvedPortSpecFields type for use // with apply. +// +// ResolvePortSpecFields is a convenience struct containing all fields of a +// PortOpts which don't contain references which need to be resolved, and can +// therefore be shared with ResolvedPortSpec. type ResolvedPortSpecFieldsApplyConfiguration struct { - AdminStateUp *bool `json:"adminStateUp,omitempty"` - MACAddress *string `json:"macAddress,omitempty"` - AllowedAddressPairs []AddressPairApplyConfiguration `json:"allowedAddressPairs,omitempty"` - HostID *string `json:"hostID,omitempty"` - VNICType *string `json:"vnicType,omitempty"` - Profile *BindingProfileApplyConfiguration `json:"profile,omitempty"` - DisablePortSecurity *bool `json:"disablePortSecurity,omitempty"` - PropagateUplinkStatus *bool `json:"propagateUplinkStatus,omitempty"` - ValueSpecs []ValueSpecApplyConfiguration `json:"valueSpecs,omitempty"` + // AdminStateUp specifies whether the port should be created in the up (true) or down (false) state. The default is up. + AdminStateUp *bool `json:"adminStateUp,omitempty"` + // MACAddress specifies the MAC address of the port. If not specified, the MAC address will be generated. + MACAddress *string `json:"macAddress,omitempty"` + // AllowedAddressPairs is a list of address pairs which Neutron will + // allow the port to send traffic from in addition to the port's + // addresses. If not specified, the MAC Address will be the MAC Address + // of the port. Depending on the configuration of Neutron, it may be + // supported to specify a CIDR instead of a specific IP address. + AllowedAddressPairs []AddressPairApplyConfiguration `json:"allowedAddressPairs,omitempty"` + // HostID specifies the ID of the host where the port resides. + HostID *string `json:"hostID,omitempty"` + // VNICType specifies the type of vNIC which this port should be + // attached to. This is used to determine which mechanism driver(s) to + // be used to bind the port. The valid values are normal, macvtap, + // direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + // remote-managed, although these values will not be validated in this + // API to ensure compatibility with future neutron changes or custom + // implementations. What type of vNIC is actually available depends on + // deployments. If not specified, the Neutron default value is used. + VNICType *string `json:"vnicType,omitempty"` + // Profile is a set of key-value pairs that are used for binding + // details. We intentionally don't expose this as a map[string]string + // because we only want to enable the users to set the values of the + // keys that are known to work in OpenStack Networking API. See + // https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + // To set profiles, your tenant needs permissions rule:create_port, and + // rule:create_port:binding:profile + Profile *BindingProfileApplyConfiguration `json:"profile,omitempty"` + // DisablePortSecurity enables or disables the port security when set. + // When not set, it takes the value of the corresponding field at the network level. + DisablePortSecurity *bool `json:"disablePortSecurity,omitempty"` + // PropageteUplinkStatus enables or disables the propagate uplink status on the port. + PropagateUplinkStatus *bool `json:"propagateUplinkStatus,omitempty"` + // Value specs are extra parameters to include in the API request with OpenStack. + // This is an extension point for the API, so what they do and if they are supported, + // depends on the specific OpenStack implementation. + ValueSpecs []ValueSpecApplyConfiguration `json:"valueSpecs,omitempty"` } // ResolvedPortSpecFieldsApplyConfiguration constructs a declarative configuration of the ResolvedPortSpecFields type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/resourcereference.go b/pkg/generated/applyconfiguration/api/v1beta1/resourcereference.go index 8be5d0451..5d7e3c99d 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/resourcereference.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/resourcereference.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package v1beta1 // ResourceReferenceApplyConfiguration represents a declarative configuration of the ResourceReference type for use // with apply. type ResourceReferenceApplyConfiguration struct { + // Name is the name of the referenced resource Name *string `json:"name,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/rootvolume.go b/pkg/generated/applyconfiguration/api/v1beta1/rootvolume.go index f4cd3de91..2c9902719 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/rootvolume.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/rootvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package v1beta1 // RootVolumeApplyConfiguration represents a declarative configuration of the RootVolume type for use // with apply. type RootVolumeApplyConfiguration struct { + // SizeGiB is the size of the block device in gibibytes (GiB). SizeGiB *int `json:"sizeGiB,omitempty"` BlockDeviceVolumeApplyConfiguration `json:",inline"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/router.go b/pkg/generated/applyconfiguration/api/v1beta1/router.go index 7dd1aeb91..49df0d459 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/router.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/router.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ package v1beta1 // RouterApplyConfiguration represents a declarative configuration of the Router type for use // with apply. +// +// Router represents basic information about the associated OpenStack Neutron Router. type RouterApplyConfiguration struct { Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` diff --git a/pkg/generated/applyconfiguration/api/v1beta1/routerfilter.go b/pkg/generated/applyconfiguration/api/v1beta1/routerfilter.go index dad551b75..594e04c42 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/routerfilter.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/routerfilter.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import ( // RouterFilterApplyConfiguration represents a declarative configuration of the RouterFilter type for use // with apply. +// +// RouterFilter specifies a query to select an OpenStack router. At least one property must be set. type RouterFilterApplyConfiguration struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` diff --git a/pkg/generated/applyconfiguration/api/v1beta1/routerparam.go b/pkg/generated/applyconfiguration/api/v1beta1/routerparam.go index 763f4ad68..21d8b349d 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/routerparam.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/routerparam.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,12 @@ package v1beta1 // RouterParamApplyConfiguration represents a declarative configuration of the RouterParam type for use // with apply. +// +// RouterParam specifies an OpenStack router to use. It may be specified by either ID or filter, but not both. type RouterParamApplyConfiguration struct { - ID *string `json:"id,omitempty"` + // ID is the ID of the router to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + ID *string `json:"id,omitempty"` + // Filter specifies a filter to select an OpenStack router. If provided, cannot be empty. Filter *RouterFilterApplyConfiguration `json:"filter,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalproperty.go b/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalproperty.go index 8096541f4..56cdf1698 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalproperty.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalproperty.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,15 @@ package v1beta1 // SchedulerHintAdditionalPropertyApplyConfiguration represents a declarative configuration of the SchedulerHintAdditionalProperty type for use // with apply. +// +// SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. +// It includes a Name to identify the property and a Value that can be of various types. type SchedulerHintAdditionalPropertyApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name is the name of the scheduler hint property. + // It is a unique identifier for the property. + Name *string `json:"name,omitempty"` + // Value is the value of the scheduler hint property, which can be of various types + // (e.g., bool, string, int). The type is indicated by the Value.Type field. Value *SchedulerHintAdditionalValueApplyConfiguration `json:"value,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalvalue.go b/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalvalue.go index 69d5da6f2..fa2e90e02 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalvalue.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/schedulerhintadditionalvalue.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,11 +24,23 @@ import ( // SchedulerHintAdditionalValueApplyConfiguration represents a declarative configuration of the SchedulerHintAdditionalValue type for use // with apply. +// +// SchedulerHintAdditionalValue represents the value of a scheduler hint property. +// The value can be of various types: Bool, String, or Number. +// The Type field indicates the type of the value being used. type SchedulerHintAdditionalValueApplyConfiguration struct { - Type *apiv1beta1.SchedulerHintValueType `json:"type,omitempty"` - Bool *bool `json:"bool,omitempty"` - Number *int `json:"number,omitempty"` - String *string `json:"string,omitempty"` + // Type represents the type of the value. + // Valid values are Bool, String, and Number. + Type *apiv1beta1.SchedulerHintValueType `json:"type,omitempty"` + // Bool is the boolean value of the scheduler hint, used when Type is "Bool". + // This field is required if type is 'Bool', and must not be set otherwise. + Bool *bool `json:"bool,omitempty"` + // Number is the integer value of the scheduler hint, used when Type is "Number". + // This field is required if type is 'Number', and must not be set otherwise. + Number *int `json:"number,omitempty"` + // String is the string value of the scheduler hint, used when Type is "String". + // This field is required if type is 'String', and must not be set otherwise. + String *string `json:"string,omitempty"` } // SchedulerHintAdditionalValueApplyConfiguration constructs a declarative configuration of the SchedulerHintAdditionalValue type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/securitygroupfilter.go b/pkg/generated/applyconfiguration/api/v1beta1/securitygroupfilter.go index bc0602c25..daeba75fc 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/securitygroupfilter.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/securitygroupfilter.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import ( // SecurityGroupFilterApplyConfiguration represents a declarative configuration of the SecurityGroupFilter type for use // with apply. +// +// SecurityGroupFilter specifies a query to select an OpenStack security group. At least one property must be set. type SecurityGroupFilterApplyConfiguration struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` diff --git a/pkg/generated/applyconfiguration/api/v1beta1/securitygroupparam.go b/pkg/generated/applyconfiguration/api/v1beta1/securitygroupparam.go index 641baeafc..a0a42ca2d 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/securitygroupparam.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/securitygroupparam.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,12 @@ package v1beta1 // SecurityGroupParamApplyConfiguration represents a declarative configuration of the SecurityGroupParam type for use // with apply. +// +// SecurityGroupParam specifies an OpenStack security group. It may be specified by ID or filter, but not both. type SecurityGroupParamApplyConfiguration struct { - ID *string `json:"id,omitempty"` + // ID is the ID of the security group to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + ID *string `json:"id,omitempty"` + // Filter specifies a query to select an OpenStack security group. If provided, cannot be empty. Filter *SecurityGroupFilterApplyConfiguration `json:"filter,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/securitygrouprulespec.go b/pkg/generated/applyconfiguration/api/v1beta1/securitygrouprulespec.go index d37c28894..24ccc1c8c 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/securitygrouprulespec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/securitygrouprulespec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,16 +24,43 @@ import ( // SecurityGroupRuleSpecApplyConfiguration represents a declarative configuration of the SecurityGroupRuleSpec type for use // with apply. +// +// SecurityGroupRuleSpec represent the basic information of the associated OpenStack +// Security Group Role. +// For now this is only used for the allNodesSecurityGroupRules but when we add +// other security groups, we'll need to add a validation because +// Remote* fields are mutually exclusive. type SecurityGroupRuleSpecApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Direction *string `json:"direction,omitempty"` - EtherType *string `json:"etherType,omitempty"` - PortRangeMin *int `json:"portRangeMin,omitempty"` - PortRangeMax *int `json:"portRangeMax,omitempty"` - Protocol *string `json:"protocol,omitempty"` - RemoteGroupID *string `json:"remoteGroupID,omitempty"` - RemoteIPPrefix *string `json:"remoteIPPrefix,omitempty"` + // name of the security group rule. + // It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + Name *string `json:"name,omitempty"` + // description of the security group rule. + Description *string `json:"description,omitempty"` + // direction in which the security group rule is applied. The only values + // allowed are "ingress" or "egress". For a compute instance, an ingress + // security group rule is applied to incoming (ingress) traffic for that + // instance. An egress rule is applied to traffic leaving the instance. + Direction *string `json:"direction,omitempty"` + // etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + // ingress or egress rules. + EtherType *string `json:"etherType,omitempty"` + // portRangeMin is a number in the range that is matched by the security group + // rule. If the protocol is TCP or UDP, this value must be less than or equal + // to the value of the portRangeMax attribute. + PortRangeMin *int `json:"portRangeMin,omitempty"` + // portRangeMax is a number in the range that is matched by the security group + // rule. The portRangeMin attribute constrains the portRangeMax attribute. + PortRangeMax *int `json:"portRangeMax,omitempty"` + // protocol is the protocol that is matched by the security group rule. + Protocol *string `json:"protocol,omitempty"` + // remoteGroupID is the remote group ID to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + RemoteGroupID *string `json:"remoteGroupID,omitempty"` + // remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + RemoteIPPrefix *string `json:"remoteIPPrefix,omitempty"` + // remoteManagedGroups is the remote managed groups to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. RemoteManagedGroups []apiv1beta1.ManagedSecurityGroupName `json:"remoteManagedGroups,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/securitygroupstatus.go b/pkg/generated/applyconfiguration/api/v1beta1/securitygroupstatus.go index 7eb45a136..7456838e5 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/securitygroupstatus.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/securitygroupstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,9 +20,14 @@ package v1beta1 // SecurityGroupStatusApplyConfiguration represents a declarative configuration of the SecurityGroupStatus type for use // with apply. +// +// SecurityGroupStatus represents the basic information of the associated +// OpenStack Neutron Security Group. type SecurityGroupStatusApplyConfiguration struct { + // name of the security group Name *string `json:"name,omitempty"` - ID *string `json:"id,omitempty"` + // id of the security group + ID *string `json:"id,omitempty"` } // SecurityGroupStatusApplyConfiguration constructs a declarative configuration of the SecurityGroupStatus type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta1/servergroupfilter.go b/pkg/generated/applyconfiguration/api/v1beta1/servergroupfilter.go index 4fa1885c2..baacd4d3a 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/servergroupfilter.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/servergroupfilter.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,7 +20,10 @@ package v1beta1 // ServerGroupFilterApplyConfiguration represents a declarative configuration of the ServerGroupFilter type for use // with apply. +// +// ServerGroupFilter specifies a query to select an OpenStack server group. At least one property must be set. type ServerGroupFilterApplyConfiguration struct { + // Name is the name of a server group to look for. Name *string `json:"name,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/servergroupparam.go b/pkg/generated/applyconfiguration/api/v1beta1/servergroupparam.go index 730a742d6..b0b7e9b3b 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/servergroupparam.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/servergroupparam.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,12 @@ package v1beta1 // ServerGroupParamApplyConfiguration represents a declarative configuration of the ServerGroupParam type for use // with apply. +// +// ServerGroupParam specifies an OpenStack server group. It may be specified by ID or filter, but not both. type ServerGroupParamApplyConfiguration struct { - ID *string `json:"id,omitempty"` + // ID is the ID of the server group to use. + ID *string `json:"id,omitempty"` + // Filter specifies a query to select an OpenStack server group. If provided, it cannot be empty. Filter *ServerGroupFilterApplyConfiguration `json:"filter,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/servermetadata.go b/pkg/generated/applyconfiguration/api/v1beta1/servermetadata.go index 6d4e18582..646fbfd89 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/servermetadata.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/servermetadata.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,7 +21,9 @@ package v1beta1 // ServerMetadataApplyConfiguration represents a declarative configuration of the ServerMetadata type for use // with apply. type ServerMetadataApplyConfiguration struct { - Key *string `json:"key,omitempty"` + // Key is the server metadata key + Key *string `json:"key,omitempty"` + // Value is the server metadata value Value *string `json:"value,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/subnet.go b/pkg/generated/applyconfiguration/api/v1beta1/subnet.go index 4999e217c..1c5c40ece 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/subnet.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/subnet.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ package v1beta1 // SubnetApplyConfiguration represents a declarative configuration of the Subnet type for use // with apply. +// +// Subnet represents basic information about the associated OpenStack Neutron Subnet. type SubnetApplyConfiguration struct { Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` diff --git a/pkg/generated/applyconfiguration/api/v1beta1/subnetfilter.go b/pkg/generated/applyconfiguration/api/v1beta1/subnetfilter.go index 5ff011e84..f49dfbeaa 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/subnetfilter.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/subnetfilter.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import ( // SubnetFilterApplyConfiguration represents a declarative configuration of the SubnetFilter type for use // with apply. +// +// SubnetFilter specifies a filter to select a subnet. At least one parameter must be specified. type SubnetFilterApplyConfiguration struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` diff --git a/pkg/generated/applyconfiguration/api/v1beta1/subnetparam.go b/pkg/generated/applyconfiguration/api/v1beta1/subnetparam.go index 529d41bd4..52c1e3076 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/subnetparam.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/subnetparam.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,12 @@ package v1beta1 // SubnetParamApplyConfiguration represents a declarative configuration of the SubnetParam type for use // with apply. +// +// SubnetParam specifies an OpenStack subnet to use. It may be specified by either ID or filter, but not both. type SubnetParamApplyConfiguration struct { - ID *string `json:"id,omitempty"` + // ID is the uuid of the subnet. It will not be validated. + ID *string `json:"id,omitempty"` + // Filter specifies a filter to select the subnet. It must match exactly one subnet. Filter *SubnetFilterApplyConfiguration `json:"filter,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/subnetspec.go b/pkg/generated/applyconfiguration/api/v1beta1/subnetspec.go index bfb85ef3d..43c566eb7 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/subnetspec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/subnetspec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,15 @@ package v1beta1 // SubnetSpecApplyConfiguration represents a declarative configuration of the SubnetSpec type for use // with apply. type SubnetSpecApplyConfiguration struct { - CIDR *string `json:"cidr,omitempty"` - DNSNameservers []string `json:"dnsNameservers,omitempty"` + // CIDR is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. + // This field is required when defining a subnet. + CIDR *string `json:"cidr,omitempty"` + // DNSNameservers holds a list of DNS server addresses that will be provided when creating + // the subnet. These addresses need to have the same IP version as CIDR. + DNSNameservers []string `json:"dnsNameservers,omitempty"` + // AllocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. + // If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from + // outside of these ranges manually. AllocationPools []AllocationPoolApplyConfiguration `json:"allocationPools,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/valuespec.go b/pkg/generated/applyconfiguration/api/v1beta1/valuespec.go index 70cb02d25..c0ff5176c 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/valuespec.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/valuespec.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,9 +20,15 @@ package v1beta1 // ValueSpecApplyConfiguration represents a declarative configuration of the ValueSpec type for use // with apply. +// +// ValueSpec represents a single value_spec key-value pair. type ValueSpecApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Key *string `json:"key,omitempty"` + // Name is the name of the key-value pair. + // This is just for identifying the pair and will not be sent to the OpenStack API. + Name *string `json:"name,omitempty"` + // Key is the key in the key-value pair. + Key *string `json:"key,omitempty"` + // Value is the value in the key-value pair. Value *string `json:"value,omitempty"` } diff --git a/pkg/generated/applyconfiguration/api/v1beta1/volumeavailabilityzone.go b/pkg/generated/applyconfiguration/api/v1beta1/volumeavailabilityzone.go index c21d41414..5b66d80fd 100644 --- a/pkg/generated/applyconfiguration/api/v1beta1/volumeavailabilityzone.go +++ b/pkg/generated/applyconfiguration/api/v1beta1/volumeavailabilityzone.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,9 +24,19 @@ import ( // VolumeAvailabilityZoneApplyConfiguration represents a declarative configuration of the VolumeAvailabilityZone type for use // with apply. +// +// VolumeAvailabilityZone specifies the availability zone for a volume. type VolumeAvailabilityZoneApplyConfiguration struct { + // From specifies where we will obtain the availability zone for the + // volume. The options are "Name" and "Machine". If "Name" is specified + // then the Name field must also be specified. If "Machine" is specified + // the volume will use the value of FailureDomain, if any, from the + // associated Machine. From *apiv1beta1.VolumeAZSource `json:"from,omitempty"` - Name *apiv1beta1.VolumeAZName `json:"name,omitempty"` + // Name is the name of a volume availability zone to use. It is required + // if From is "Name". The volume availability zone name may not contain + // spaces. + Name *apiv1beta1.VolumeAZName `json:"name,omitempty"` } // VolumeAvailabilityZoneApplyConfiguration constructs a declarative configuration of the VolumeAvailabilityZone type for use with diff --git a/pkg/generated/applyconfiguration/api/v1beta2/additionalblockdevice.go b/pkg/generated/applyconfiguration/api/v1beta2/additionalblockdevice.go new file mode 100644 index 000000000..29f2527ad --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/additionalblockdevice.go @@ -0,0 +1,69 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// AdditionalBlockDeviceApplyConfiguration represents a declarative configuration of the AdditionalBlockDevice type for use +// with apply. +// +// AdditionalBlockDevice is a block device to attach to the server. +type AdditionalBlockDeviceApplyConfiguration struct { + // Name of the block device in the context of a machine. + // If the block device is a volume, the Cinder volume will be named + // as a combination of the machine name and this name. + // Also, this name will be used for tagging the block device. + // Information about the block device tag can be obtained from the OpenStack + // metadata API or the config drive. + // Name cannot be 'root', which is reserved for the root volume. + Name *string `json:"name,omitempty"` + // SizeGiB is the size of the block device in gibibytes (GiB). + SizeGiB *int `json:"sizeGiB,omitempty"` + // Storage specifies the storage type of the block device and + // additional storage options. + Storage *BlockDeviceStorageApplyConfiguration `json:"storage,omitempty"` +} + +// AdditionalBlockDeviceApplyConfiguration constructs a declarative configuration of the AdditionalBlockDevice type for use with +// apply. +func AdditionalBlockDevice() *AdditionalBlockDeviceApplyConfiguration { + return &AdditionalBlockDeviceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *AdditionalBlockDeviceApplyConfiguration) WithName(value string) *AdditionalBlockDeviceApplyConfiguration { + b.Name = &value + return b +} + +// WithSizeGiB sets the SizeGiB field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SizeGiB field is set to the value of the last call. +func (b *AdditionalBlockDeviceApplyConfiguration) WithSizeGiB(value int) *AdditionalBlockDeviceApplyConfiguration { + b.SizeGiB = &value + return b +} + +// WithStorage sets the Storage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Storage field is set to the value of the last call. +func (b *AdditionalBlockDeviceApplyConfiguration) WithStorage(value *BlockDeviceStorageApplyConfiguration) *AdditionalBlockDeviceApplyConfiguration { + b.Storage = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/addresspair.go b/pkg/generated/applyconfiguration/api/v1beta2/addresspair.go new file mode 100644 index 000000000..0113a78f2 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/addresspair.go @@ -0,0 +1,53 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// AddressPairApplyConfiguration represents a declarative configuration of the AddressPair type for use +// with apply. +type AddressPairApplyConfiguration struct { + // IPAddress is the IP address of the allowed address pair. Depending on + // the configuration of Neutron, it may be supported to specify a CIDR + // instead of a specific IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // MACAddress is the MAC address of the allowed address pair. If not + // specified, the MAC address will be the MAC address of the port. + MACAddress *string `json:"macAddress,omitempty"` +} + +// AddressPairApplyConfiguration constructs a declarative configuration of the AddressPair type for use with +// apply. +func AddressPair() *AddressPairApplyConfiguration { + return &AddressPairApplyConfiguration{} +} + +// WithIPAddress sets the IPAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPAddress field is set to the value of the last call. +func (b *AddressPairApplyConfiguration) WithIPAddress(value string) *AddressPairApplyConfiguration { + b.IPAddress = &value + return b +} + +// WithMACAddress sets the MACAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MACAddress field is set to the value of the last call. +func (b *AddressPairApplyConfiguration) WithMACAddress(value string) *AddressPairApplyConfiguration { + b.MACAddress = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/allocationpool.go b/pkg/generated/applyconfiguration/api/v1beta2/allocationpool.go new file mode 100644 index 000000000..83423cc18 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/allocationpool.go @@ -0,0 +1,50 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// AllocationPoolApplyConfiguration represents a declarative configuration of the AllocationPool type for use +// with apply. +type AllocationPoolApplyConfiguration struct { + // Start represents the start of the AllocationPool, that is the lowest IP of the pool. + Start *string `json:"start,omitempty"` + // End represents the end of the AlloctionPool, that is the highest IP of the pool. + End *string `json:"end,omitempty"` +} + +// AllocationPoolApplyConfiguration constructs a declarative configuration of the AllocationPool type for use with +// apply. +func AllocationPool() *AllocationPoolApplyConfiguration { + return &AllocationPoolApplyConfiguration{} +} + +// WithStart sets the Start field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Start field is set to the value of the last call. +func (b *AllocationPoolApplyConfiguration) WithStart(value string) *AllocationPoolApplyConfiguration { + b.Start = &value + return b +} + +// WithEnd sets the End field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the End field is set to the value of the last call. +func (b *AllocationPoolApplyConfiguration) WithEnd(value string) *AllocationPoolApplyConfiguration { + b.End = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/apiserverloadbalancer.go b/pkg/generated/applyconfiguration/api/v1beta2/apiserverloadbalancer.go new file mode 100644 index 000000000..f6cf66d0a --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/apiserverloadbalancer.go @@ -0,0 +1,139 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// APIServerLoadBalancerApplyConfiguration represents a declarative configuration of the APIServerLoadBalancer type for use +// with apply. +type APIServerLoadBalancerApplyConfiguration struct { + // Enabled defines whether a load balancer should be created. This value + // defaults to true if an APIServerLoadBalancer is given. + // + // There is no reason to set this to false. To disable creation of the + // API server loadbalancer, omit the APIServerLoadBalancer field in the + // cluster spec instead. + Enabled *bool `json:"enabled,omitempty"` + // AdditionalPorts adds additional tcp ports to the load balancer. + AdditionalPorts []int `json:"additionalPorts,omitempty"` + // AllowedCIDRs restrict access to all API-Server listeners to the given address CIDRs. + AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` + // Provider specifies name of a specific Octavia provider to use for the + // API load balancer. The Octavia default will be used if it is not + // specified. + Provider *string `json:"provider,omitempty"` + // Network defines which network should the load balancer be allocated on. + Network *NetworkParamApplyConfiguration `json:"network,omitempty"` + // Subnets define which subnets should the load balancer be allocated on. + // It is expected that subnets are located on the network specified in this resource. + // Only the first element is taken into account. + // kubebuilder:validation:MaxLength:=2 + Subnets []SubnetParamApplyConfiguration `json:"subnets,omitempty"` + // AvailabilityZone is the failure domain that will be used to create the APIServerLoadBalancer Spec. + AvailabilityZone *string `json:"availabilityZone,omitempty"` + // Flavor is the flavor name that will be used to create the APIServerLoadBalancer Spec. + Flavor *string `json:"flavor,omitempty"` + // Monitor contains configuration for the load balancer health monitor. + Monitor *APIServerLoadBalancerMonitorApplyConfiguration `json:"monitor,omitempty"` +} + +// APIServerLoadBalancerApplyConfiguration constructs a declarative configuration of the APIServerLoadBalancer type for use with +// apply. +func APIServerLoadBalancer() *APIServerLoadBalancerApplyConfiguration { + return &APIServerLoadBalancerApplyConfiguration{} +} + +// WithEnabled sets the Enabled field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Enabled field is set to the value of the last call. +func (b *APIServerLoadBalancerApplyConfiguration) WithEnabled(value bool) *APIServerLoadBalancerApplyConfiguration { + b.Enabled = &value + return b +} + +// WithAdditionalPorts adds the given value to the AdditionalPorts field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AdditionalPorts field. +func (b *APIServerLoadBalancerApplyConfiguration) WithAdditionalPorts(values ...int) *APIServerLoadBalancerApplyConfiguration { + for i := range values { + b.AdditionalPorts = append(b.AdditionalPorts, values[i]) + } + return b +} + +// WithAllowedCIDRs adds the given value to the AllowedCIDRs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AllowedCIDRs field. +func (b *APIServerLoadBalancerApplyConfiguration) WithAllowedCIDRs(values ...string) *APIServerLoadBalancerApplyConfiguration { + for i := range values { + b.AllowedCIDRs = append(b.AllowedCIDRs, values[i]) + } + return b +} + +// WithProvider sets the Provider field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provider field is set to the value of the last call. +func (b *APIServerLoadBalancerApplyConfiguration) WithProvider(value string) *APIServerLoadBalancerApplyConfiguration { + b.Provider = &value + return b +} + +// WithNetwork sets the Network field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Network field is set to the value of the last call. +func (b *APIServerLoadBalancerApplyConfiguration) WithNetwork(value *NetworkParamApplyConfiguration) *APIServerLoadBalancerApplyConfiguration { + b.Network = value + return b +} + +// WithSubnets adds the given value to the Subnets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Subnets field. +func (b *APIServerLoadBalancerApplyConfiguration) WithSubnets(values ...*SubnetParamApplyConfiguration) *APIServerLoadBalancerApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSubnets") + } + b.Subnets = append(b.Subnets, *values[i]) + } + return b +} + +// WithAvailabilityZone sets the AvailabilityZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AvailabilityZone field is set to the value of the last call. +func (b *APIServerLoadBalancerApplyConfiguration) WithAvailabilityZone(value string) *APIServerLoadBalancerApplyConfiguration { + b.AvailabilityZone = &value + return b +} + +// WithFlavor sets the Flavor field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Flavor field is set to the value of the last call. +func (b *APIServerLoadBalancerApplyConfiguration) WithFlavor(value string) *APIServerLoadBalancerApplyConfiguration { + b.Flavor = &value + return b +} + +// WithMonitor sets the Monitor field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Monitor field is set to the value of the last call. +func (b *APIServerLoadBalancerApplyConfiguration) WithMonitor(value *APIServerLoadBalancerMonitorApplyConfiguration) *APIServerLoadBalancerApplyConfiguration { + b.Monitor = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/apiserverloadbalancermonitor.go b/pkg/generated/applyconfiguration/api/v1beta2/apiserverloadbalancermonitor.go new file mode 100644 index 000000000..5af19bbb2 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/apiserverloadbalancermonitor.go @@ -0,0 +1,72 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// APIServerLoadBalancerMonitorApplyConfiguration represents a declarative configuration of the APIServerLoadBalancerMonitor type for use +// with apply. +// +// APIServerLoadBalancerMonitor contains configuration for the load balancer health monitor. +type APIServerLoadBalancerMonitorApplyConfiguration struct { + // Delay is the time in seconds between sending probes to members. + Delay *int `json:"delay,omitempty"` + // Timeout is the maximum time in seconds for a monitor to wait for a connection to be established before it times out. + Timeout *int `json:"timeout,omitempty"` + // MaxRetries is the number of successful checks before changing the operating status of the member to ONLINE. + MaxRetries *int `json:"maxRetries,omitempty"` + // MaxRetriesDown is the number of allowed check failures before changing the operating status of the member to ERROR. + MaxRetriesDown *int `json:"maxRetriesDown,omitempty"` +} + +// APIServerLoadBalancerMonitorApplyConfiguration constructs a declarative configuration of the APIServerLoadBalancerMonitor type for use with +// apply. +func APIServerLoadBalancerMonitor() *APIServerLoadBalancerMonitorApplyConfiguration { + return &APIServerLoadBalancerMonitorApplyConfiguration{} +} + +// WithDelay sets the Delay field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Delay field is set to the value of the last call. +func (b *APIServerLoadBalancerMonitorApplyConfiguration) WithDelay(value int) *APIServerLoadBalancerMonitorApplyConfiguration { + b.Delay = &value + return b +} + +// WithTimeout sets the Timeout field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Timeout field is set to the value of the last call. +func (b *APIServerLoadBalancerMonitorApplyConfiguration) WithTimeout(value int) *APIServerLoadBalancerMonitorApplyConfiguration { + b.Timeout = &value + return b +} + +// WithMaxRetries sets the MaxRetries field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MaxRetries field is set to the value of the last call. +func (b *APIServerLoadBalancerMonitorApplyConfiguration) WithMaxRetries(value int) *APIServerLoadBalancerMonitorApplyConfiguration { + b.MaxRetries = &value + return b +} + +// WithMaxRetriesDown sets the MaxRetriesDown field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MaxRetriesDown field is set to the value of the last call. +func (b *APIServerLoadBalancerMonitorApplyConfiguration) WithMaxRetriesDown(value int) *APIServerLoadBalancerMonitorApplyConfiguration { + b.MaxRetriesDown = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/bastion.go b/pkg/generated/applyconfiguration/api/v1beta2/bastion.go new file mode 100644 index 000000000..a2884da60 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/bastion.go @@ -0,0 +1,80 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// BastionApplyConfiguration represents a declarative configuration of the Bastion type for use +// with apply. +// +// Bastion represents basic information about the bastion node. If you enable bastion, the spec has to be specified. +type BastionApplyConfiguration struct { + // Enabled means that bastion is enabled. The bastion is enabled by + // default if this field is not specified. Set this field to false to disable the + // bastion. + // + // It is not currently possible to remove the bastion from the cluster + // spec without first disabling it by setting this field to false and + // waiting until the bastion has been deleted. + Enabled *bool `json:"enabled,omitempty"` + // Spec for the bastion itself + Spec *OpenStackMachineSpecApplyConfiguration `json:"spec,omitempty"` + // AvailabilityZone is the failure domain that will be used to create the Bastion Spec. + AvailabilityZone *string `json:"availabilityZone,omitempty"` + // FloatingIP which will be associated to the bastion machine. It's the IP address, not UUID. + // The floating IP should already exist and should not be associated with a port. If FIP of this address does not + // exist, CAPO will try to create it, but by default only OpenStack administrators have privileges to do so. + FloatingIP *string `json:"floatingIP,omitempty"` +} + +// BastionApplyConfiguration constructs a declarative configuration of the Bastion type for use with +// apply. +func Bastion() *BastionApplyConfiguration { + return &BastionApplyConfiguration{} +} + +// WithEnabled sets the Enabled field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Enabled field is set to the value of the last call. +func (b *BastionApplyConfiguration) WithEnabled(value bool) *BastionApplyConfiguration { + b.Enabled = &value + return b +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *BastionApplyConfiguration) WithSpec(value *OpenStackMachineSpecApplyConfiguration) *BastionApplyConfiguration { + b.Spec = value + return b +} + +// WithAvailabilityZone sets the AvailabilityZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AvailabilityZone field is set to the value of the last call. +func (b *BastionApplyConfiguration) WithAvailabilityZone(value string) *BastionApplyConfiguration { + b.AvailabilityZone = &value + return b +} + +// WithFloatingIP sets the FloatingIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FloatingIP field is set to the value of the last call. +func (b *BastionApplyConfiguration) WithFloatingIP(value string) *BastionApplyConfiguration { + b.FloatingIP = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/bastionstatus.go b/pkg/generated/applyconfiguration/api/v1beta2/bastionstatus.go new file mode 100644 index 000000000..88982358e --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/bastionstatus.go @@ -0,0 +1,109 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// BastionStatusApplyConfiguration represents a declarative configuration of the BastionStatus type for use +// with apply. +type BastionStatusApplyConfiguration struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + SSHKeyName *string `json:"sshKeyName,omitempty"` + State *apiv1beta2.InstanceState `json:"state,omitempty"` + IP *string `json:"ip,omitempty"` + FloatingIP *string `json:"floatingIP,omitempty"` + // Resolved contains parts of the bastion's machine spec with all + // external references fully resolved. + Resolved *ResolvedMachineSpecApplyConfiguration `json:"resolved,omitempty"` + // Resources contains references to OpenStack resources created for the bastion. + Resources *MachineResourcesApplyConfiguration `json:"resources,omitempty"` +} + +// BastionStatusApplyConfiguration constructs a declarative configuration of the BastionStatus type for use with +// apply. +func BastionStatus() *BastionStatusApplyConfiguration { + return &BastionStatusApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithID(value string) *BastionStatusApplyConfiguration { + b.ID = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithName(value string) *BastionStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithSSHKeyName sets the SSHKeyName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SSHKeyName field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithSSHKeyName(value string) *BastionStatusApplyConfiguration { + b.SSHKeyName = &value + return b +} + +// WithState sets the State field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the State field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithState(value apiv1beta2.InstanceState) *BastionStatusApplyConfiguration { + b.State = &value + return b +} + +// WithIP sets the IP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IP field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithIP(value string) *BastionStatusApplyConfiguration { + b.IP = &value + return b +} + +// WithFloatingIP sets the FloatingIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FloatingIP field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithFloatingIP(value string) *BastionStatusApplyConfiguration { + b.FloatingIP = &value + return b +} + +// WithResolved sets the Resolved field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resolved field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithResolved(value *ResolvedMachineSpecApplyConfiguration) *BastionStatusApplyConfiguration { + b.Resolved = value + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *BastionStatusApplyConfiguration) WithResources(value *MachineResourcesApplyConfiguration) *BastionStatusApplyConfiguration { + b.Resources = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/bindingprofile.go b/pkg/generated/applyconfiguration/api/v1beta2/bindingprofile.go new file mode 100644 index 000000000..41a0bdf2e --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/bindingprofile.go @@ -0,0 +1,52 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// BindingProfileApplyConfiguration represents a declarative configuration of the BindingProfile type for use +// with apply. +type BindingProfileApplyConfiguration struct { + // OVSHWOffload enables or disables the OVS hardware offload feature. + // This flag is not required on OpenStack clouds since Yoga as Nova will set it automatically when the port is attached. + // See: https://bugs.launchpad.net/nova/+bug/2020813 + OVSHWOffload *bool `json:"ovsHWOffload,omitempty"` + // TrustedVF enables or disables the “trusted mode” for the VF. + TrustedVF *bool `json:"trustedVF,omitempty"` +} + +// BindingProfileApplyConfiguration constructs a declarative configuration of the BindingProfile type for use with +// apply. +func BindingProfile() *BindingProfileApplyConfiguration { + return &BindingProfileApplyConfiguration{} +} + +// WithOVSHWOffload sets the OVSHWOffload field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the OVSHWOffload field is set to the value of the last call. +func (b *BindingProfileApplyConfiguration) WithOVSHWOffload(value bool) *BindingProfileApplyConfiguration { + b.OVSHWOffload = &value + return b +} + +// WithTrustedVF sets the TrustedVF field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TrustedVF field is set to the value of the last call. +func (b *BindingProfileApplyConfiguration) WithTrustedVF(value bool) *BindingProfileApplyConfiguration { + b.TrustedVF = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/blockdevicestorage.go b/pkg/generated/applyconfiguration/api/v1beta2/blockdevicestorage.go new file mode 100644 index 000000000..378d54c11 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/blockdevicestorage.go @@ -0,0 +1,58 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// BlockDeviceStorageApplyConfiguration represents a declarative configuration of the BlockDeviceStorage type for use +// with apply. +// +// BlockDeviceStorage is the storage type of a block device to create and +// contains additional storage options. +type BlockDeviceStorageApplyConfiguration struct { + // Type is the type of block device to create. + // This can be either "Volume" or "Local". + Type *apiv1beta2.BlockDeviceType `json:"type,omitempty"` + // Volume contains additional storage options for a volume block device. + Volume *BlockDeviceVolumeApplyConfiguration `json:"volume,omitempty"` +} + +// BlockDeviceStorageApplyConfiguration constructs a declarative configuration of the BlockDeviceStorage type for use with +// apply. +func BlockDeviceStorage() *BlockDeviceStorageApplyConfiguration { + return &BlockDeviceStorageApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *BlockDeviceStorageApplyConfiguration) WithType(value apiv1beta2.BlockDeviceType) *BlockDeviceStorageApplyConfiguration { + b.Type = &value + return b +} + +// WithVolume sets the Volume field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Volume field is set to the value of the last call. +func (b *BlockDeviceStorageApplyConfiguration) WithVolume(value *BlockDeviceVolumeApplyConfiguration) *BlockDeviceStorageApplyConfiguration { + b.Volume = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/blockdevicevolume.go b/pkg/generated/applyconfiguration/api/v1beta2/blockdevicevolume.go new file mode 100644 index 000000000..0d1ce9762 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/blockdevicevolume.go @@ -0,0 +1,56 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// BlockDeviceVolumeApplyConfiguration represents a declarative configuration of the BlockDeviceVolume type for use +// with apply. +// +// BlockDeviceVolume contains additional storage options for a volume block device. +type BlockDeviceVolumeApplyConfiguration struct { + // Type is the Cinder volume type of the volume. + // If omitted, the default Cinder volume type that is configured in the OpenStack cloud + // will be used. + Type *string `json:"type,omitempty"` + // AvailabilityZone is the volume availability zone to create the volume + // in. If not specified, the volume will be created without an explicit + // availability zone. + AvailabilityZone *VolumeAvailabilityZoneApplyConfiguration `json:"availabilityZone,omitempty"` +} + +// BlockDeviceVolumeApplyConfiguration constructs a declarative configuration of the BlockDeviceVolume type for use with +// apply. +func BlockDeviceVolume() *BlockDeviceVolumeApplyConfiguration { + return &BlockDeviceVolumeApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *BlockDeviceVolumeApplyConfiguration) WithType(value string) *BlockDeviceVolumeApplyConfiguration { + b.Type = &value + return b +} + +// WithAvailabilityZone sets the AvailabilityZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AvailabilityZone field is set to the value of the last call. +func (b *BlockDeviceVolumeApplyConfiguration) WithAvailabilityZone(value *VolumeAvailabilityZoneApplyConfiguration) *BlockDeviceVolumeApplyConfiguration { + b.AvailabilityZone = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/clusterinitialization.go b/pkg/generated/applyconfiguration/api/v1beta2/clusterinitialization.go new file mode 100644 index 000000000..ab74294d6 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/clusterinitialization.go @@ -0,0 +1,43 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ClusterInitializationApplyConfiguration represents a declarative configuration of the ClusterInitialization type for use +// with apply. +// +// ClusterInitialization represents the initialization status of the cluster. +type ClusterInitializationApplyConfiguration struct { + // Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + Provisioned *bool `json:"provisioned,omitempty"` +} + +// ClusterInitializationApplyConfiguration constructs a declarative configuration of the ClusterInitialization type for use with +// apply. +func ClusterInitialization() *ClusterInitializationApplyConfiguration { + return &ClusterInitializationApplyConfiguration{} +} + +// WithProvisioned sets the Provisioned field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provisioned field is set to the value of the last call. +func (b *ClusterInitializationApplyConfiguration) WithProvisioned(value bool) *ClusterInitializationApplyConfiguration { + b.Provisioned = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/externalrouteripparam.go b/pkg/generated/applyconfiguration/api/v1beta2/externalrouteripparam.go new file mode 100644 index 000000000..995d51165 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/externalrouteripparam.go @@ -0,0 +1,50 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ExternalRouterIPParamApplyConfiguration represents a declarative configuration of the ExternalRouterIPParam type for use +// with apply. +type ExternalRouterIPParamApplyConfiguration struct { + // The FixedIP in the corresponding subnet + FixedIP *string `json:"fixedIP,omitempty"` + // The subnet in which the FixedIP is used for the Gateway of this router + Subnet *SubnetParamApplyConfiguration `json:"subnet,omitempty"` +} + +// ExternalRouterIPParamApplyConfiguration constructs a declarative configuration of the ExternalRouterIPParam type for use with +// apply. +func ExternalRouterIPParam() *ExternalRouterIPParamApplyConfiguration { + return &ExternalRouterIPParamApplyConfiguration{} +} + +// WithFixedIP sets the FixedIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FixedIP field is set to the value of the last call. +func (b *ExternalRouterIPParamApplyConfiguration) WithFixedIP(value string) *ExternalRouterIPParamApplyConfiguration { + b.FixedIP = &value + return b +} + +// WithSubnet sets the Subnet field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Subnet field is set to the value of the last call. +func (b *ExternalRouterIPParamApplyConfiguration) WithSubnet(value *SubnetParamApplyConfiguration) *ExternalRouterIPParamApplyConfiguration { + b.Subnet = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/filterbyneutrontags.go b/pkg/generated/applyconfiguration/api/v1beta2/filterbyneutrontags.go new file mode 100644 index 000000000..adbc69787 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/filterbyneutrontags.go @@ -0,0 +1,87 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// FilterByNeutronTagsApplyConfiguration represents a declarative configuration of the FilterByNeutronTags type for use +// with apply. +type FilterByNeutronTagsApplyConfiguration struct { + // Tags is a list of tags to filter by. If specified, the resource must + // have all of the tags specified to be included in the result. + Tags []apiv1beta2.NeutronTag `json:"tags,omitempty"` + // TagsAny is a list of tags to filter by. If specified, the resource + // must have at least one of the tags specified to be included in the + // result. + TagsAny []apiv1beta2.NeutronTag `json:"tagsAny,omitempty"` + // NotTags is a list of tags to filter by. If specified, resources which + // contain all of the given tags will be excluded from the result. + NotTags []apiv1beta2.NeutronTag `json:"notTags,omitempty"` + // NotTagsAny is a list of tags to filter by. If specified, resources + // which contain any of the given tags will be excluded from the result. + NotTagsAny []apiv1beta2.NeutronTag `json:"notTagsAny,omitempty"` +} + +// FilterByNeutronTagsApplyConfiguration constructs a declarative configuration of the FilterByNeutronTags type for use with +// apply. +func FilterByNeutronTags() *FilterByNeutronTagsApplyConfiguration { + return &FilterByNeutronTagsApplyConfiguration{} +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *FilterByNeutronTagsApplyConfiguration) WithTags(values ...apiv1beta2.NeutronTag) *FilterByNeutronTagsApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithTagsAny adds the given value to the TagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TagsAny field. +func (b *FilterByNeutronTagsApplyConfiguration) WithTagsAny(values ...apiv1beta2.NeutronTag) *FilterByNeutronTagsApplyConfiguration { + for i := range values { + b.TagsAny = append(b.TagsAny, values[i]) + } + return b +} + +// WithNotTags adds the given value to the NotTags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTags field. +func (b *FilterByNeutronTagsApplyConfiguration) WithNotTags(values ...apiv1beta2.NeutronTag) *FilterByNeutronTagsApplyConfiguration { + for i := range values { + b.NotTags = append(b.NotTags, values[i]) + } + return b +} + +// WithNotTagsAny adds the given value to the NotTagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTagsAny field. +func (b *FilterByNeutronTagsApplyConfiguration) WithNotTagsAny(values ...apiv1beta2.NeutronTag) *FilterByNeutronTagsApplyConfiguration { + for i := range values { + b.NotTagsAny = append(b.NotTagsAny, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/fixedip.go b/pkg/generated/applyconfiguration/api/v1beta2/fixedip.go new file mode 100644 index 000000000..f3664c126 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/fixedip.go @@ -0,0 +1,54 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// FixedIPApplyConfiguration represents a declarative configuration of the FixedIP type for use +// with apply. +type FixedIPApplyConfiguration struct { + // Subnet is an openstack subnet query that will return the id of a subnet to create + // the fixed IP of a port in. This query must not return more than one subnet. + Subnet *SubnetParamApplyConfiguration `json:"subnet,omitempty"` + // IPAddress is a specific IP address to assign to the port. If Subnet + // is also specified, IPAddress must be a valid IP address in the + // subnet. If Subnet is not specified, IPAddress must be a valid IP + // address in any subnet of the port's network. + IPAddress *string `json:"ipAddress,omitempty"` +} + +// FixedIPApplyConfiguration constructs a declarative configuration of the FixedIP type for use with +// apply. +func FixedIP() *FixedIPApplyConfiguration { + return &FixedIPApplyConfiguration{} +} + +// WithSubnet sets the Subnet field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Subnet field is set to the value of the last call. +func (b *FixedIPApplyConfiguration) WithSubnet(value *SubnetParamApplyConfiguration) *FixedIPApplyConfiguration { + b.Subnet = value + return b +} + +// WithIPAddress sets the IPAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPAddress field is set to the value of the last call. +func (b *FixedIPApplyConfiguration) WithIPAddress(value string) *FixedIPApplyConfiguration { + b.IPAddress = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/imagefilter.go b/pkg/generated/applyconfiguration/api/v1beta2/imagefilter.go new file mode 100644 index 000000000..77bc78199 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/imagefilter.go @@ -0,0 +1,54 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ImageFilterApplyConfiguration represents a declarative configuration of the ImageFilter type for use +// with apply. +// +// ImageFilter describes a query for an image. +type ImageFilterApplyConfiguration struct { + // The name of the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised. + Name *string `json:"name,omitempty"` + // The tags associated with the desired image. If specified, the combination of name and tags must return a single matching image or an error will be raised. + Tags []string `json:"tags,omitempty"` +} + +// ImageFilterApplyConfiguration constructs a declarative configuration of the ImageFilter type for use with +// apply. +func ImageFilter() *ImageFilterApplyConfiguration { + return &ImageFilterApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ImageFilterApplyConfiguration) WithName(value string) *ImageFilterApplyConfiguration { + b.Name = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *ImageFilterApplyConfiguration) WithTags(values ...string) *ImageFilterApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/imageparam.go b/pkg/generated/applyconfiguration/api/v1beta2/imageparam.go new file mode 100644 index 000000000..01d39e802 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/imageparam.go @@ -0,0 +1,66 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ImageParamApplyConfiguration represents a declarative configuration of the ImageParam type for use +// with apply. +// +// ImageParam describes a glance image. It can be specified by ID, filter, or a +// reference to an ORC Image. +type ImageParamApplyConfiguration struct { + // ID is the uuid of the image. ID will not be validated before use. + ID *string `json:"id,omitempty"` + // Filter describes a query for an image. If specified, the combination + // of name and tags must return a single matching image or an error will + // be raised. + Filter *ImageFilterApplyConfiguration `json:"filter,omitempty"` + // ImageRef is a reference to an ORC Image in the same namespace as the + // referring object. + ImageRef *ResourceReferenceApplyConfiguration `json:"imageRef,omitempty"` +} + +// ImageParamApplyConfiguration constructs a declarative configuration of the ImageParam type for use with +// apply. +func ImageParam() *ImageParamApplyConfiguration { + return &ImageParamApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *ImageParamApplyConfiguration) WithID(value string) *ImageParamApplyConfiguration { + b.ID = &value + return b +} + +// WithFilter sets the Filter field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Filter field is set to the value of the last call. +func (b *ImageParamApplyConfiguration) WithFilter(value *ImageFilterApplyConfiguration) *ImageParamApplyConfiguration { + b.Filter = value + return b +} + +// WithImageRef sets the ImageRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImageRef field is set to the value of the last call. +func (b *ImageParamApplyConfiguration) WithImageRef(value *ResourceReferenceApplyConfiguration) *ImageParamApplyConfiguration { + b.ImageRef = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/loadbalancer.go b/pkg/generated/applyconfiguration/api/v1beta2/loadbalancer.go new file mode 100644 index 000000000..d6fefa03d --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/loadbalancer.go @@ -0,0 +1,103 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// LoadBalancerApplyConfiguration represents a declarative configuration of the LoadBalancer type for use +// with apply. +// +// LoadBalancer represents basic information about the associated OpenStack LoadBalancer. +type LoadBalancerApplyConfiguration struct { + Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + IP *string `json:"ip,omitempty"` + InternalIP *string `json:"internalIP,omitempty"` + AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` + Tags []string `json:"tags,omitempty"` + // LoadBalancerNetwork contains information about network and/or subnets which the + // loadbalancer is allocated on. + // If subnets are specified within the LoadBalancerNetwork currently only the first + // subnet in the list is taken into account. + LoadBalancerNetwork *NetworkStatusWithSubnetsApplyConfiguration `json:"loadBalancerNetwork,omitempty"` +} + +// LoadBalancerApplyConfiguration constructs a declarative configuration of the LoadBalancer type for use with +// apply. +func LoadBalancer() *LoadBalancerApplyConfiguration { + return &LoadBalancerApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *LoadBalancerApplyConfiguration) WithName(value string) *LoadBalancerApplyConfiguration { + b.Name = &value + return b +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *LoadBalancerApplyConfiguration) WithID(value string) *LoadBalancerApplyConfiguration { + b.ID = &value + return b +} + +// WithIP sets the IP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IP field is set to the value of the last call. +func (b *LoadBalancerApplyConfiguration) WithIP(value string) *LoadBalancerApplyConfiguration { + b.IP = &value + return b +} + +// WithInternalIP sets the InternalIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the InternalIP field is set to the value of the last call. +func (b *LoadBalancerApplyConfiguration) WithInternalIP(value string) *LoadBalancerApplyConfiguration { + b.InternalIP = &value + return b +} + +// WithAllowedCIDRs adds the given value to the AllowedCIDRs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AllowedCIDRs field. +func (b *LoadBalancerApplyConfiguration) WithAllowedCIDRs(values ...string) *LoadBalancerApplyConfiguration { + for i := range values { + b.AllowedCIDRs = append(b.AllowedCIDRs, values[i]) + } + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *LoadBalancerApplyConfiguration) WithTags(values ...string) *LoadBalancerApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithLoadBalancerNetwork sets the LoadBalancerNetwork field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LoadBalancerNetwork field is set to the value of the last call. +func (b *LoadBalancerApplyConfiguration) WithLoadBalancerNetwork(value *NetworkStatusWithSubnetsApplyConfiguration) *LoadBalancerApplyConfiguration { + b.LoadBalancerNetwork = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/machineinitialization.go b/pkg/generated/applyconfiguration/api/v1beta2/machineinitialization.go new file mode 100644 index 000000000..04501fe14 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/machineinitialization.go @@ -0,0 +1,43 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// MachineInitializationApplyConfiguration represents a declarative configuration of the MachineInitialization type for use +// with apply. +// +// MachineInitialization contains information about the initialization status of the machine. +type MachineInitializationApplyConfiguration struct { + // Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + Provisioned *bool `json:"provisioned,omitempty"` +} + +// MachineInitializationApplyConfiguration constructs a declarative configuration of the MachineInitialization type for use with +// apply. +func MachineInitialization() *MachineInitializationApplyConfiguration { + return &MachineInitializationApplyConfiguration{} +} + +// WithProvisioned sets the Provisioned field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provisioned field is set to the value of the last call. +func (b *MachineInitializationApplyConfiguration) WithProvisioned(value bool) *MachineInitializationApplyConfiguration { + b.Provisioned = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/machineresources.go b/pkg/generated/applyconfiguration/api/v1beta2/machineresources.go new file mode 100644 index 000000000..9b8b9d608 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/machineresources.go @@ -0,0 +1,45 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// MachineResourcesApplyConfiguration represents a declarative configuration of the MachineResources type for use +// with apply. +type MachineResourcesApplyConfiguration struct { + // Ports is the status of the ports created for the machine. + Ports []PortStatusApplyConfiguration `json:"ports,omitempty"` +} + +// MachineResourcesApplyConfiguration constructs a declarative configuration of the MachineResources type for use with +// apply. +func MachineResources() *MachineResourcesApplyConfiguration { + return &MachineResourcesApplyConfiguration{} +} + +// WithPorts adds the given value to the Ports field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Ports field. +func (b *MachineResourcesApplyConfiguration) WithPorts(values ...*PortStatusApplyConfiguration) *MachineResourcesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPorts") + } + b.Ports = append(b.Ports, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/managedsecuritygroups.go b/pkg/generated/applyconfiguration/api/v1beta2/managedsecuritygroups.go new file mode 100644 index 000000000..441362e13 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/managedsecuritygroups.go @@ -0,0 +1,87 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ManagedSecurityGroupsApplyConfiguration represents a declarative configuration of the ManagedSecurityGroups type for use +// with apply. +// +// ManagedSecurityGroups defines the desired state of security groups and rules for the cluster. +type ManagedSecurityGroupsApplyConfiguration struct { + // allNodesSecurityGroupRules defines the rules that should be applied to all nodes. + AllNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"allNodesSecurityGroupRules,omitempty"` + // controlPlaneNodesSecurityGroupRules defines the rules that should be applied to control plane nodes. + ControlPlaneNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"controlPlaneNodesSecurityGroupRules,omitempty"` + // workerNodesSecurityGroupRules defines the rules that should be applied to worker nodes. + WorkerNodesSecurityGroupRules []SecurityGroupRuleSpecApplyConfiguration `json:"workerNodesSecurityGroupRules,omitempty"` + // AllowAllInClusterTraffic allows all ingress and egress traffic between cluster nodes when set to true. + AllowAllInClusterTraffic *bool `json:"allowAllInClusterTraffic,omitempty"` +} + +// ManagedSecurityGroupsApplyConfiguration constructs a declarative configuration of the ManagedSecurityGroups type for use with +// apply. +func ManagedSecurityGroups() *ManagedSecurityGroupsApplyConfiguration { + return &ManagedSecurityGroupsApplyConfiguration{} +} + +// WithAllNodesSecurityGroupRules adds the given value to the AllNodesSecurityGroupRules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AllNodesSecurityGroupRules field. +func (b *ManagedSecurityGroupsApplyConfiguration) WithAllNodesSecurityGroupRules(values ...*SecurityGroupRuleSpecApplyConfiguration) *ManagedSecurityGroupsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAllNodesSecurityGroupRules") + } + b.AllNodesSecurityGroupRules = append(b.AllNodesSecurityGroupRules, *values[i]) + } + return b +} + +// WithControlPlaneNodesSecurityGroupRules adds the given value to the ControlPlaneNodesSecurityGroupRules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ControlPlaneNodesSecurityGroupRules field. +func (b *ManagedSecurityGroupsApplyConfiguration) WithControlPlaneNodesSecurityGroupRules(values ...*SecurityGroupRuleSpecApplyConfiguration) *ManagedSecurityGroupsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithControlPlaneNodesSecurityGroupRules") + } + b.ControlPlaneNodesSecurityGroupRules = append(b.ControlPlaneNodesSecurityGroupRules, *values[i]) + } + return b +} + +// WithWorkerNodesSecurityGroupRules adds the given value to the WorkerNodesSecurityGroupRules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the WorkerNodesSecurityGroupRules field. +func (b *ManagedSecurityGroupsApplyConfiguration) WithWorkerNodesSecurityGroupRules(values ...*SecurityGroupRuleSpecApplyConfiguration) *ManagedSecurityGroupsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithWorkerNodesSecurityGroupRules") + } + b.WorkerNodesSecurityGroupRules = append(b.WorkerNodesSecurityGroupRules, *values[i]) + } + return b +} + +// WithAllowAllInClusterTraffic sets the AllowAllInClusterTraffic field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AllowAllInClusterTraffic field is set to the value of the last call. +func (b *ManagedSecurityGroupsApplyConfiguration) WithAllowAllInClusterTraffic(value bool) *ManagedSecurityGroupsApplyConfiguration { + b.AllowAllInClusterTraffic = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/networkfilter.go b/pkg/generated/applyconfiguration/api/v1beta2/networkfilter.go new file mode 100644 index 000000000..9384ebde7 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/networkfilter.go @@ -0,0 +1,104 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// NetworkFilterApplyConfiguration represents a declarative configuration of the NetworkFilter type for use +// with apply. +// +// NetworkFilter specifies a query to select an OpenStack network. At least one property must be set. +type NetworkFilterApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ProjectID *string `json:"projectID,omitempty"` + FilterByNeutronTagsApplyConfiguration `json:",inline"` +} + +// NetworkFilterApplyConfiguration constructs a declarative configuration of the NetworkFilter type for use with +// apply. +func NetworkFilter() *NetworkFilterApplyConfiguration { + return &NetworkFilterApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NetworkFilterApplyConfiguration) WithName(value string) *NetworkFilterApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *NetworkFilterApplyConfiguration) WithDescription(value string) *NetworkFilterApplyConfiguration { + b.Description = &value + return b +} + +// WithProjectID sets the ProjectID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ProjectID field is set to the value of the last call. +func (b *NetworkFilterApplyConfiguration) WithProjectID(value string) *NetworkFilterApplyConfiguration { + b.ProjectID = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *NetworkFilterApplyConfiguration) WithTags(values ...apiv1beta2.NeutronTag) *NetworkFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.Tags = append(b.FilterByNeutronTagsApplyConfiguration.Tags, values[i]) + } + return b +} + +// WithTagsAny adds the given value to the TagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TagsAny field. +func (b *NetworkFilterApplyConfiguration) WithTagsAny(values ...apiv1beta2.NeutronTag) *NetworkFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.TagsAny = append(b.FilterByNeutronTagsApplyConfiguration.TagsAny, values[i]) + } + return b +} + +// WithNotTags adds the given value to the NotTags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTags field. +func (b *NetworkFilterApplyConfiguration) WithNotTags(values ...apiv1beta2.NeutronTag) *NetworkFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTags = append(b.FilterByNeutronTagsApplyConfiguration.NotTags, values[i]) + } + return b +} + +// WithNotTagsAny adds the given value to the NotTagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTagsAny field. +func (b *NetworkFilterApplyConfiguration) WithNotTagsAny(values ...apiv1beta2.NeutronTag) *NetworkFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTagsAny = append(b.FilterByNeutronTagsApplyConfiguration.NotTagsAny, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/networkparam.go b/pkg/generated/applyconfiguration/api/v1beta2/networkparam.go new file mode 100644 index 000000000..7a2adfe34 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/networkparam.go @@ -0,0 +1,52 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// NetworkParamApplyConfiguration represents a declarative configuration of the NetworkParam type for use +// with apply. +// +// NetworkParam specifies an OpenStack network. It may be specified by either ID or Filter, but not both. +type NetworkParamApplyConfiguration struct { + // ID is the ID of the network to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + ID *string `json:"id,omitempty"` + // Filter specifies a filter to select an OpenStack network. If provided, cannot be empty. + Filter *NetworkFilterApplyConfiguration `json:"filter,omitempty"` +} + +// NetworkParamApplyConfiguration constructs a declarative configuration of the NetworkParam type for use with +// apply. +func NetworkParam() *NetworkParamApplyConfiguration { + return &NetworkParamApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *NetworkParamApplyConfiguration) WithID(value string) *NetworkParamApplyConfiguration { + b.ID = &value + return b +} + +// WithFilter sets the Filter field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Filter field is set to the value of the last call. +func (b *NetworkParamApplyConfiguration) WithFilter(value *NetworkFilterApplyConfiguration) *NetworkParamApplyConfiguration { + b.Filter = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/networkstatus.go b/pkg/generated/applyconfiguration/api/v1beta2/networkstatus.go new file mode 100644 index 000000000..78fbef8f3 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/networkstatus.go @@ -0,0 +1,61 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// NetworkStatusApplyConfiguration represents a declarative configuration of the NetworkStatus type for use +// with apply. +// +// NetworkStatus contains basic information about an existing neutron network. +type NetworkStatusApplyConfiguration struct { + Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + Tags []string `json:"tags,omitempty"` +} + +// NetworkStatusApplyConfiguration constructs a declarative configuration of the NetworkStatus type for use with +// apply. +func NetworkStatus() *NetworkStatusApplyConfiguration { + return &NetworkStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NetworkStatusApplyConfiguration) WithName(value string) *NetworkStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *NetworkStatusApplyConfiguration) WithID(value string) *NetworkStatusApplyConfiguration { + b.ID = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *NetworkStatusApplyConfiguration) WithTags(values ...string) *NetworkStatusApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/networkstatuswithsubnets.go b/pkg/generated/applyconfiguration/api/v1beta2/networkstatuswithsubnets.go new file mode 100644 index 000000000..ac8026eb7 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/networkstatuswithsubnets.go @@ -0,0 +1,74 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// NetworkStatusWithSubnetsApplyConfiguration represents a declarative configuration of the NetworkStatusWithSubnets type for use +// with apply. +// +// NetworkStatusWithSubnets represents basic information about an existing neutron network and an associated set of subnets. +type NetworkStatusWithSubnetsApplyConfiguration struct { + NetworkStatusApplyConfiguration `json:",inline"` + // Subnets is a list of subnets associated with the default cluster network. Machines which use the default cluster network will get an address from all of these subnets. + Subnets []SubnetApplyConfiguration `json:"subnets,omitempty"` +} + +// NetworkStatusWithSubnetsApplyConfiguration constructs a declarative configuration of the NetworkStatusWithSubnets type for use with +// apply. +func NetworkStatusWithSubnets() *NetworkStatusWithSubnetsApplyConfiguration { + return &NetworkStatusWithSubnetsApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NetworkStatusWithSubnetsApplyConfiguration) WithName(value string) *NetworkStatusWithSubnetsApplyConfiguration { + b.NetworkStatusApplyConfiguration.Name = &value + return b +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *NetworkStatusWithSubnetsApplyConfiguration) WithID(value string) *NetworkStatusWithSubnetsApplyConfiguration { + b.NetworkStatusApplyConfiguration.ID = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *NetworkStatusWithSubnetsApplyConfiguration) WithTags(values ...string) *NetworkStatusWithSubnetsApplyConfiguration { + for i := range values { + b.NetworkStatusApplyConfiguration.Tags = append(b.NetworkStatusApplyConfiguration.Tags, values[i]) + } + return b +} + +// WithSubnets adds the given value to the Subnets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Subnets field. +func (b *NetworkStatusWithSubnetsApplyConfiguration) WithSubnets(values ...*SubnetApplyConfiguration) *NetworkStatusWithSubnetsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSubnets") + } + b.Subnets = append(b.Subnets, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/nodeinfo.go b/pkg/generated/applyconfiguration/api/v1beta2/nodeinfo.go new file mode 100644 index 000000000..8338dcf8a --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/nodeinfo.go @@ -0,0 +1,43 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// NodeInfoApplyConfiguration represents a declarative configuration of the NodeInfo type for use +// with apply. +// +// NodeInfo contains information about the node's architecture and operating system. +type NodeInfoApplyConfiguration struct { + // operatingSystem is a string representing the operating system of the node. + // This may be a string like 'linux' or 'windows'. + OperatingSystem *string `json:"operatingSystem,omitempty"` +} + +// NodeInfoApplyConfiguration constructs a declarative configuration of the NodeInfo type for use with +// apply. +func NodeInfo() *NodeInfoApplyConfiguration { + return &NodeInfoApplyConfiguration{} +} + +// WithOperatingSystem sets the OperatingSystem field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the OperatingSystem field is set to the value of the last call. +func (b *NodeInfoApplyConfiguration) WithOperatingSystem(value string) *NodeInfoApplyConfiguration { + b.OperatingSystem = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackcluster.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackcluster.go new file mode 100644 index 000000000..5fe85e73d --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackcluster.go @@ -0,0 +1,289 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + internal "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/internal" +) + +// OpenStackClusterApplyConfiguration represents a declarative configuration of the OpenStackCluster type for use +// with apply. +// +// OpenStackCluster is the Schema for the openstackclusters API. +type OpenStackClusterApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OpenStackClusterSpecApplyConfiguration `json:"spec,omitempty"` + Status *OpenStackClusterStatusApplyConfiguration `json:"status,omitempty"` +} + +// OpenStackCluster constructs a declarative configuration of the OpenStackCluster type for use with +// apply. +func OpenStackCluster(name, namespace string) *OpenStackClusterApplyConfiguration { + b := &OpenStackClusterApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("OpenStackCluster") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b +} + +// ExtractOpenStackClusterFrom extracts the applied configuration owned by fieldManager from +// openStackCluster for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackCluster must be a unmodified OpenStackCluster API object that was retrieved from the Kubernetes API. +// ExtractOpenStackClusterFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackClusterFrom(openStackCluster *apiv1beta2.OpenStackCluster, fieldManager string, subresource string) (*OpenStackClusterApplyConfiguration, error) { + b := &OpenStackClusterApplyConfiguration{} + err := managedfields.ExtractInto(openStackCluster, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackCluster"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackCluster.Name) + b.WithNamespace(openStackCluster.Namespace) + + b.WithKind("OpenStackCluster") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b, nil +} + +// ExtractOpenStackCluster extracts the applied configuration owned by fieldManager from +// openStackCluster. If no managedFields are found in openStackCluster for fieldManager, a +// OpenStackClusterApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// openStackCluster must be a unmodified OpenStackCluster API object that was retrieved from the Kubernetes API. +// ExtractOpenStackCluster provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackCluster(openStackCluster *apiv1beta2.OpenStackCluster, fieldManager string) (*OpenStackClusterApplyConfiguration, error) { + return ExtractOpenStackClusterFrom(openStackCluster, fieldManager, "") +} + +// ExtractOpenStackClusterStatus extracts the applied configuration owned by fieldManager from +// openStackCluster for the status subresource. +func ExtractOpenStackClusterStatus(openStackCluster *apiv1beta2.OpenStackCluster, fieldManager string) (*OpenStackClusterApplyConfiguration, error) { + return ExtractOpenStackClusterFrom(openStackCluster, fieldManager, "status") +} + +func (b OpenStackClusterApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithKind(value string) *OpenStackClusterApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithAPIVersion(value string) *OpenStackClusterApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithName(value string) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithGenerateName(value string) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithNamespace(value string) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithUID(value types.UID) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithResourceVersion(value string) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithGeneration(value int64) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *OpenStackClusterApplyConfiguration) WithLabels(entries map[string]string) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *OpenStackClusterApplyConfiguration) WithAnnotations(entries map[string]string) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *OpenStackClusterApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *OpenStackClusterApplyConfiguration) WithFinalizers(values ...string) *OpenStackClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *OpenStackClusterApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithSpec(value *OpenStackClusterSpecApplyConfiguration) *OpenStackClusterApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *OpenStackClusterApplyConfiguration) WithStatus(value *OpenStackClusterStatusApplyConfiguration) *OpenStackClusterApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackClusterApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackClusterApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *OpenStackClusterApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackClusterApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackclusterspec.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackclusterspec.go new file mode 100644 index 000000000..9de2109c0 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackclusterspec.go @@ -0,0 +1,335 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" +) + +// OpenStackClusterSpecApplyConfiguration represents a declarative configuration of the OpenStackClusterSpec type for use +// with apply. +// +// OpenStackClusterSpec defines the desired state of OpenStackCluster. +type OpenStackClusterSpecApplyConfiguration struct { + // ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network, + // subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4 + // subnet is supported. If you leave this empty, no network will be created. + ManagedSubnets []SubnetSpecApplyConfiguration `json:"managedSubnets,omitempty"` + // Router specifies an existing router to be used if ManagedSubnets are + // specified. If specified, no new router will be created. + Router *RouterParamApplyConfiguration `json:"router,omitempty"` + // Network specifies an existing network to use if no ManagedSubnets + // are specified. + Network *NetworkParamApplyConfiguration `json:"network,omitempty"` + // Subnets specifies existing subnets to use if not ManagedSubnets are + // specified. All subnets must be in the network specified by Network. + // There can be zero, one, or two subnets. If no subnets are specified, + // all subnets in Network will be used. If 2 subnets are specified, one + // must be IPv4 and the other IPv6. + Subnets []SubnetParamApplyConfiguration `json:"subnets,omitempty"` + // NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID. + // This value will be used only if the Cluster actuator creates the network. + // If left empty, the network will have the default MTU defined in Openstack network service. + // To use this field, the Openstack installation requires the net-mtu neutron API extension. + NetworkMTU *int `json:"networkMTU,omitempty"` + // ExternalRouterIPs is an array of externalIPs on the respective subnets. + // This is necessary if the router needs a fixed ip in a specific subnet. + ExternalRouterIPs []ExternalRouterIPParamApplyConfiguration `json:"externalRouterIPs,omitempty"` + // ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs. + // This option is ignored if DisableExternalNetwork is set to true. + // + // If ExternalNetwork is defined it must refer to exactly one external network. + // + // If ExternalNetwork is not defined or is empty the controller will use any + // existing external network as long as there is only one. It is an + // error if ExternalNetwork is not defined and there are multiple + // external networks unless DisableExternalNetwork is also set. + // + // If ExternalNetwork is not defined and there are no external networks + // the controller will proceed as though DisableExternalNetwork was set. + ExternalNetwork *NetworkParamApplyConfiguration `json:"externalNetwork,omitempty"` + // DisableExternalNetwork specifies whether or not to attempt to connect the cluster + // to an external network. This allows for the creation of clusters when connecting + // to an external network is not possible or desirable, e.g. if using a provider network. + DisableExternalNetwork *bool `json:"disableExternalNetwork,omitempty"` + // APIServerLoadBalancer configures the optional LoadBalancer for the APIServer. + // If not specified, no load balancer will be created for the API server. + APIServerLoadBalancer *APIServerLoadBalancerApplyConfiguration `json:"apiServerLoadBalancer,omitempty"` + // DisableAPIServerFloatingIP determines whether or not to attempt to attach a floating + // IP to the API server. This allows for the creation of clusters when attaching a floating + // IP to the API server (and hence, in many cases, exposing the API server to the internet) + // is not possible or desirable, e.g. if using a shared VLAN for communication between + // management and workload clusters or when the management cluster is inside the + // project network. + // This option requires that the API server use a VIP on the cluster network so that the + // underlying machines can change without changing ControlPlaneEndpoint.Host. + // When using a managed load balancer, this VIP will be managed automatically. + // If not using a managed load balancer, cluster configuration will fail without additional + // configuration to manage the VIP on the control plane machines, which falls outside of + // the scope of this controller. + DisableAPIServerFloatingIP *bool `json:"disableAPIServerFloatingIP,omitempty"` + // APIServerFloatingIP is the floatingIP which will be associated with the API server. + // The floatingIP will be created if it does not already exist. + // If not specified, a new floatingIP is allocated. + // This field is not used if DisableAPIServerFloatingIP is set to true. + APIServerFloatingIP *string `json:"apiServerFloatingIP,omitempty"` + // APIServerFixedIP is the fixed IP which will be associated with the API server. + // In the case where the API server has a floating IP but not a managed load balancer, + // this field is not used. + // If a managed load balancer is used and this field is not specified, a fixed IP will + // be dynamically allocated for the load balancer. + // If a managed load balancer is not used AND the API server floating IP is disabled, + // this field MUST be specified and should correspond to a pre-allocated port that + // holds the fixed IP to be used as a VIP. + APIServerFixedIP *string `json:"apiServerFixedIP,omitempty"` + // APIServerPort is the port on which the listener on the APIServer + // will be created. If specified, it must be an integer between 0 and 65535. + APIServerPort *uint16 `json:"apiServerPort,omitempty"` + // ManagedSecurityGroups determines whether OpenStack security groups for the cluster + // will be managed by the OpenStack provider or whether pre-existing security groups will + // be specified as part of the configuration. + // By default, the managed security groups have rules that allow the Kubelet, etcd, and the + // Kubernetes API server to function correctly. + // It's possible to add additional rules to the managed security groups. + // When defined to an empty struct, the managed security groups will be created with the default rules. + ManagedSecurityGroups *ManagedSecurityGroupsApplyConfiguration `json:"managedSecurityGroups,omitempty"` + // DisablePortSecurity disables the port security of the network created for the + // Kubernetes cluster, which also disables SecurityGroups + DisablePortSecurity *bool `json:"disablePortSecurity,omitempty"` + // Tags to set on all resources in cluster which support tags + Tags []string `json:"tags,omitempty"` + // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // It is normally populated automatically by the OpenStackCluster + // controller during cluster provisioning. If it is set on creation the + // control plane endpoint will use the values set here in preference to + // values set elsewhere. + // ControlPlaneEndpoint cannot be modified after ControlPlaneEndpoint.Host has been set. + ControlPlaneEndpoint *corev1beta2.APIEndpoint `json:"controlPlaneEndpoint,omitempty"` + // ControlPlaneAvailabilityZones is the set of availability zones which + // control plane machines may be deployed to. + ControlPlaneAvailabilityZones []string `json:"controlPlaneAvailabilityZones,omitempty"` + // ControlPlaneOmitAvailabilityZone causes availability zone to be + // omitted when creating control plane nodes, allowing the Nova + // scheduler to make a decision on which availability zone to use based + // on other scheduling constraints + ControlPlaneOmitAvailabilityZone *bool `json:"controlPlaneOmitAvailabilityZone,omitempty"` + // Bastion is the OpenStack instance to login the nodes + // + // As a rolling update is not ideal during a bastion host session, we + // prevent changes to a running bastion configuration. To make changes, it's required + // to first set `enabled: false` which will remove the bastion and then changes can be made. + Bastion *BastionApplyConfiguration `json:"bastion,omitempty"` + // IdentityRef is a reference to a secret holding OpenStack credentials + // to be used when reconciling this cluster. It is also to reconcile + // machines unless overridden in the machine spec. + IdentityRef *OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` +} + +// OpenStackClusterSpecApplyConfiguration constructs a declarative configuration of the OpenStackClusterSpec type for use with +// apply. +func OpenStackClusterSpec() *OpenStackClusterSpecApplyConfiguration { + return &OpenStackClusterSpecApplyConfiguration{} +} + +// WithManagedSubnets adds the given value to the ManagedSubnets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ManagedSubnets field. +func (b *OpenStackClusterSpecApplyConfiguration) WithManagedSubnets(values ...*SubnetSpecApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithManagedSubnets") + } + b.ManagedSubnets = append(b.ManagedSubnets, *values[i]) + } + return b +} + +// WithRouter sets the Router field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Router field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithRouter(value *RouterParamApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + b.Router = value + return b +} + +// WithNetwork sets the Network field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Network field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithNetwork(value *NetworkParamApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + b.Network = value + return b +} + +// WithSubnets adds the given value to the Subnets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Subnets field. +func (b *OpenStackClusterSpecApplyConfiguration) WithSubnets(values ...*SubnetParamApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSubnets") + } + b.Subnets = append(b.Subnets, *values[i]) + } + return b +} + +// WithNetworkMTU sets the NetworkMTU field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NetworkMTU field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithNetworkMTU(value int) *OpenStackClusterSpecApplyConfiguration { + b.NetworkMTU = &value + return b +} + +// WithExternalRouterIPs adds the given value to the ExternalRouterIPs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExternalRouterIPs field. +func (b *OpenStackClusterSpecApplyConfiguration) WithExternalRouterIPs(values ...*ExternalRouterIPParamApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExternalRouterIPs") + } + b.ExternalRouterIPs = append(b.ExternalRouterIPs, *values[i]) + } + return b +} + +// WithExternalNetwork sets the ExternalNetwork field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ExternalNetwork field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithExternalNetwork(value *NetworkParamApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + b.ExternalNetwork = value + return b +} + +// WithDisableExternalNetwork sets the DisableExternalNetwork field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisableExternalNetwork field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithDisableExternalNetwork(value bool) *OpenStackClusterSpecApplyConfiguration { + b.DisableExternalNetwork = &value + return b +} + +// WithAPIServerLoadBalancer sets the APIServerLoadBalancer field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIServerLoadBalancer field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithAPIServerLoadBalancer(value *APIServerLoadBalancerApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + b.APIServerLoadBalancer = value + return b +} + +// WithDisableAPIServerFloatingIP sets the DisableAPIServerFloatingIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisableAPIServerFloatingIP field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithDisableAPIServerFloatingIP(value bool) *OpenStackClusterSpecApplyConfiguration { + b.DisableAPIServerFloatingIP = &value + return b +} + +// WithAPIServerFloatingIP sets the APIServerFloatingIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIServerFloatingIP field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithAPIServerFloatingIP(value string) *OpenStackClusterSpecApplyConfiguration { + b.APIServerFloatingIP = &value + return b +} + +// WithAPIServerFixedIP sets the APIServerFixedIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIServerFixedIP field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithAPIServerFixedIP(value string) *OpenStackClusterSpecApplyConfiguration { + b.APIServerFixedIP = &value + return b +} + +// WithAPIServerPort sets the APIServerPort field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIServerPort field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithAPIServerPort(value uint16) *OpenStackClusterSpecApplyConfiguration { + b.APIServerPort = &value + return b +} + +// WithManagedSecurityGroups sets the ManagedSecurityGroups field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ManagedSecurityGroups field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithManagedSecurityGroups(value *ManagedSecurityGroupsApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + b.ManagedSecurityGroups = value + return b +} + +// WithDisablePortSecurity sets the DisablePortSecurity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisablePortSecurity field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithDisablePortSecurity(value bool) *OpenStackClusterSpecApplyConfiguration { + b.DisablePortSecurity = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *OpenStackClusterSpecApplyConfiguration) WithTags(values ...string) *OpenStackClusterSpecApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithControlPlaneEndpoint sets the ControlPlaneEndpoint field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ControlPlaneEndpoint field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithControlPlaneEndpoint(value corev1beta2.APIEndpoint) *OpenStackClusterSpecApplyConfiguration { + b.ControlPlaneEndpoint = &value + return b +} + +// WithControlPlaneAvailabilityZones adds the given value to the ControlPlaneAvailabilityZones field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ControlPlaneAvailabilityZones field. +func (b *OpenStackClusterSpecApplyConfiguration) WithControlPlaneAvailabilityZones(values ...string) *OpenStackClusterSpecApplyConfiguration { + for i := range values { + b.ControlPlaneAvailabilityZones = append(b.ControlPlaneAvailabilityZones, values[i]) + } + return b +} + +// WithControlPlaneOmitAvailabilityZone sets the ControlPlaneOmitAvailabilityZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ControlPlaneOmitAvailabilityZone field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithControlPlaneOmitAvailabilityZone(value bool) *OpenStackClusterSpecApplyConfiguration { + b.ControlPlaneOmitAvailabilityZone = &value + return b +} + +// WithBastion sets the Bastion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Bastion field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithBastion(value *BastionApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + b.Bastion = value + return b +} + +// WithIdentityRef sets the IdentityRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IdentityRef field is set to the value of the last call. +func (b *OpenStackClusterSpecApplyConfiguration) WithIdentityRef(value *OpenStackIdentityReferenceApplyConfiguration) *OpenStackClusterSpecApplyConfiguration { + b.IdentityRef = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackclusterstatus.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackclusterstatus.go new file mode 100644 index 000000000..9e853a610 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackclusterstatus.go @@ -0,0 +1,161 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" +) + +// OpenStackClusterStatusApplyConfiguration represents a declarative configuration of the OpenStackClusterStatus type for use +// with apply. +// +// OpenStackClusterStatus defines the observed state of OpenStackCluster. +type OpenStackClusterStatusApplyConfiguration struct { + // Initialization contains information about the initialization status of the cluster. + Initialization *ClusterInitializationApplyConfiguration `json:"initialization,omitempty"` + // Network contains information about the created OpenStack Network. + Network *NetworkStatusWithSubnetsApplyConfiguration `json:"network,omitempty"` + // ExternalNetwork contains information about the external network used for default ingress and egress traffic. + ExternalNetwork *NetworkStatusApplyConfiguration `json:"externalNetwork,omitempty"` + // Router describes the default cluster router + Router *RouterApplyConfiguration `json:"router,omitempty"` + // APIServerLoadBalancer describes the api server load balancer if one exists + APIServerLoadBalancer *LoadBalancerApplyConfiguration `json:"apiServerLoadBalancer,omitempty"` + // FailureDomains represent OpenStack availability zones + FailureDomains []corev1beta2.FailureDomain `json:"failureDomains,omitempty"` + // ControlPlaneSecurityGroup contains the information about the + // OpenStack Security Group that needs to be applied to control plane + // nodes. + ControlPlaneSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"controlPlaneSecurityGroup,omitempty"` + // WorkerSecurityGroup contains the information about the OpenStack + // Security Group that needs to be applied to worker nodes. + WorkerSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"workerSecurityGroup,omitempty"` + // BastionSecurityGroup contains the information about the OpenStack + // Security Group that needs to be applied to worker nodes. + BastionSecurityGroup *SecurityGroupStatusApplyConfiguration `json:"bastionSecurityGroup,omitempty"` + // Bastion contains the information about the deployed bastion host + Bastion *BastionStatusApplyConfiguration `json:"bastion,omitempty"` + // Conditions defines current service state of the OpenStackCluster. + // This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + // (both during initial provisioning and after the initial provisioning is completed). + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// OpenStackClusterStatusApplyConfiguration constructs a declarative configuration of the OpenStackClusterStatus type for use with +// apply. +func OpenStackClusterStatus() *OpenStackClusterStatusApplyConfiguration { + return &OpenStackClusterStatusApplyConfiguration{} +} + +// WithInitialization sets the Initialization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Initialization field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithInitialization(value *ClusterInitializationApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.Initialization = value + return b +} + +// WithNetwork sets the Network field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Network field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithNetwork(value *NetworkStatusWithSubnetsApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.Network = value + return b +} + +// WithExternalNetwork sets the ExternalNetwork field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ExternalNetwork field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithExternalNetwork(value *NetworkStatusApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.ExternalNetwork = value + return b +} + +// WithRouter sets the Router field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Router field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithRouter(value *RouterApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.Router = value + return b +} + +// WithAPIServerLoadBalancer sets the APIServerLoadBalancer field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIServerLoadBalancer field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithAPIServerLoadBalancer(value *LoadBalancerApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.APIServerLoadBalancer = value + return b +} + +// WithFailureDomains adds the given value to the FailureDomains field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the FailureDomains field. +func (b *OpenStackClusterStatusApplyConfiguration) WithFailureDomains(values ...corev1beta2.FailureDomain) *OpenStackClusterStatusApplyConfiguration { + for i := range values { + b.FailureDomains = append(b.FailureDomains, values[i]) + } + return b +} + +// WithControlPlaneSecurityGroup sets the ControlPlaneSecurityGroup field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ControlPlaneSecurityGroup field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithControlPlaneSecurityGroup(value *SecurityGroupStatusApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.ControlPlaneSecurityGroup = value + return b +} + +// WithWorkerSecurityGroup sets the WorkerSecurityGroup field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the WorkerSecurityGroup field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithWorkerSecurityGroup(value *SecurityGroupStatusApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.WorkerSecurityGroup = value + return b +} + +// WithBastionSecurityGroup sets the BastionSecurityGroup field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BastionSecurityGroup field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithBastionSecurityGroup(value *SecurityGroupStatusApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.BastionSecurityGroup = value + return b +} + +// WithBastion sets the Bastion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Bastion field is set to the value of the last call. +func (b *OpenStackClusterStatusApplyConfiguration) WithBastion(value *BastionStatusApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + b.Bastion = value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *OpenStackClusterStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *OpenStackClusterStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplate.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplate.go new file mode 100644 index 000000000..27da7c85c --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplate.go @@ -0,0 +1,274 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + internal "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/internal" +) + +// OpenStackClusterTemplateApplyConfiguration represents a declarative configuration of the OpenStackClusterTemplate type for use +// with apply. +// +// OpenStackClusterTemplate is the Schema for the openstackclustertemplates API. +type OpenStackClusterTemplateApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OpenStackClusterTemplateSpecApplyConfiguration `json:"spec,omitempty"` +} + +// OpenStackClusterTemplate constructs a declarative configuration of the OpenStackClusterTemplate type for use with +// apply. +func OpenStackClusterTemplate(name, namespace string) *OpenStackClusterTemplateApplyConfiguration { + b := &OpenStackClusterTemplateApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("OpenStackClusterTemplate") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b +} + +// ExtractOpenStackClusterTemplateFrom extracts the applied configuration owned by fieldManager from +// openStackClusterTemplate for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackClusterTemplate must be a unmodified OpenStackClusterTemplate API object that was retrieved from the Kubernetes API. +// ExtractOpenStackClusterTemplateFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackClusterTemplateFrom(openStackClusterTemplate *apiv1beta2.OpenStackClusterTemplate, fieldManager string, subresource string) (*OpenStackClusterTemplateApplyConfiguration, error) { + b := &OpenStackClusterTemplateApplyConfiguration{} + err := managedfields.ExtractInto(openStackClusterTemplate, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterTemplate"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackClusterTemplate.Name) + b.WithNamespace(openStackClusterTemplate.Namespace) + + b.WithKind("OpenStackClusterTemplate") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b, nil +} + +// ExtractOpenStackClusterTemplate extracts the applied configuration owned by fieldManager from +// openStackClusterTemplate. If no managedFields are found in openStackClusterTemplate for fieldManager, a +// OpenStackClusterTemplateApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// openStackClusterTemplate must be a unmodified OpenStackClusterTemplate API object that was retrieved from the Kubernetes API. +// ExtractOpenStackClusterTemplate provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackClusterTemplate(openStackClusterTemplate *apiv1beta2.OpenStackClusterTemplate, fieldManager string) (*OpenStackClusterTemplateApplyConfiguration, error) { + return ExtractOpenStackClusterTemplateFrom(openStackClusterTemplate, fieldManager, "") +} + +func (b OpenStackClusterTemplateApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithKind(value string) *OpenStackClusterTemplateApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithAPIVersion(value string) *OpenStackClusterTemplateApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithName(value string) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithGenerateName(value string) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithNamespace(value string) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithUID(value types.UID) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithResourceVersion(value string) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithGeneration(value int64) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *OpenStackClusterTemplateApplyConfiguration) WithLabels(entries map[string]string) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *OpenStackClusterTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *OpenStackClusterTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *OpenStackClusterTemplateApplyConfiguration) WithFinalizers(values ...string) *OpenStackClusterTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *OpenStackClusterTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *OpenStackClusterTemplateApplyConfiguration) WithSpec(value *OpenStackClusterTemplateSpecApplyConfiguration) *OpenStackClusterTemplateApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackClusterTemplateApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackClusterTemplateApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *OpenStackClusterTemplateApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackClusterTemplateApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplateresource.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplateresource.go new file mode 100644 index 000000000..1c8f74ae6 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplateresource.go @@ -0,0 +1,41 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// OpenStackClusterTemplateResourceApplyConfiguration represents a declarative configuration of the OpenStackClusterTemplateResource type for use +// with apply. +// +// OpenStackClusterTemplateResource describes the data needed to create a OpenStackCluster from a template. +type OpenStackClusterTemplateResourceApplyConfiguration struct { + Spec *OpenStackClusterSpecApplyConfiguration `json:"spec,omitempty"` +} + +// OpenStackClusterTemplateResourceApplyConfiguration constructs a declarative configuration of the OpenStackClusterTemplateResource type for use with +// apply. +func OpenStackClusterTemplateResource() *OpenStackClusterTemplateResourceApplyConfiguration { + return &OpenStackClusterTemplateResourceApplyConfiguration{} +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *OpenStackClusterTemplateResourceApplyConfiguration) WithSpec(value *OpenStackClusterSpecApplyConfiguration) *OpenStackClusterTemplateResourceApplyConfiguration { + b.Spec = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplatespec.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplatespec.go new file mode 100644 index 000000000..f59e04223 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackclustertemplatespec.go @@ -0,0 +1,41 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// OpenStackClusterTemplateSpecApplyConfiguration represents a declarative configuration of the OpenStackClusterTemplateSpec type for use +// with apply. +// +// OpenStackClusterTemplateSpec defines the desired state of OpenStackClusterTemplate. +type OpenStackClusterTemplateSpecApplyConfiguration struct { + Template *OpenStackClusterTemplateResourceApplyConfiguration `json:"template,omitempty"` +} + +// OpenStackClusterTemplateSpecApplyConfiguration constructs a declarative configuration of the OpenStackClusterTemplateSpec type for use with +// apply. +func OpenStackClusterTemplateSpec() *OpenStackClusterTemplateSpecApplyConfiguration { + return &OpenStackClusterTemplateSpecApplyConfiguration{} +} + +// WithTemplate sets the Template field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Template field is set to the value of the last call. +func (b *OpenStackClusterTemplateSpecApplyConfiguration) WithTemplate(value *OpenStackClusterTemplateResourceApplyConfiguration) *OpenStackClusterTemplateSpecApplyConfiguration { + b.Template = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackidentityreference.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackidentityreference.go new file mode 100644 index 000000000..3896eaace --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackidentityreference.go @@ -0,0 +1,78 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// OpenStackIdentityReferenceApplyConfiguration represents a declarative configuration of the OpenStackIdentityReference type for use +// with apply. +// +// OpenStackIdentityReference is a reference to an infrastructure +// provider identity to be used to provision cluster resources. +type OpenStackIdentityReferenceApplyConfiguration struct { + // Type specifies the identity reference type. Defaults to Secret for backward compatibility. + Type *string `json:"type,omitempty"` + // Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + // or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + // The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + // The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name *string `json:"name,omitempty"` + // CloudName specifies the name of the entry in the clouds.yaml file to use. + CloudName *string `json:"cloudName,omitempty"` + // Region specifies an OpenStack region to use. If specified, it overrides + // any value in clouds.yaml. If specified for an OpenStackMachine, its + // value will be included in providerID. + Region *string `json:"region,omitempty"` +} + +// OpenStackIdentityReferenceApplyConfiguration constructs a declarative configuration of the OpenStackIdentityReference type for use with +// apply. +func OpenStackIdentityReference() *OpenStackIdentityReferenceApplyConfiguration { + return &OpenStackIdentityReferenceApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *OpenStackIdentityReferenceApplyConfiguration) WithType(value string) *OpenStackIdentityReferenceApplyConfiguration { + b.Type = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *OpenStackIdentityReferenceApplyConfiguration) WithName(value string) *OpenStackIdentityReferenceApplyConfiguration { + b.Name = &value + return b +} + +// WithCloudName sets the CloudName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CloudName field is set to the value of the last call. +func (b *OpenStackIdentityReferenceApplyConfiguration) WithCloudName(value string) *OpenStackIdentityReferenceApplyConfiguration { + b.CloudName = &value + return b +} + +// WithRegion sets the Region field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Region field is set to the value of the last call. +func (b *OpenStackIdentityReferenceApplyConfiguration) WithRegion(value string) *OpenStackIdentityReferenceApplyConfiguration { + b.Region = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackmachine.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachine.go new file mode 100644 index 000000000..f135c7be0 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachine.go @@ -0,0 +1,289 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + internal "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/internal" +) + +// OpenStackMachineApplyConfiguration represents a declarative configuration of the OpenStackMachine type for use +// with apply. +// +// OpenStackMachine is the Schema for the openstackmachines API. +type OpenStackMachineApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OpenStackMachineSpecApplyConfiguration `json:"spec,omitempty"` + Status *OpenStackMachineStatusApplyConfiguration `json:"status,omitempty"` +} + +// OpenStackMachine constructs a declarative configuration of the OpenStackMachine type for use with +// apply. +func OpenStackMachine(name, namespace string) *OpenStackMachineApplyConfiguration { + b := &OpenStackMachineApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("OpenStackMachine") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b +} + +// ExtractOpenStackMachineFrom extracts the applied configuration owned by fieldManager from +// openStackMachine for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackMachine must be a unmodified OpenStackMachine API object that was retrieved from the Kubernetes API. +// ExtractOpenStackMachineFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackMachineFrom(openStackMachine *apiv1beta2.OpenStackMachine, fieldManager string, subresource string) (*OpenStackMachineApplyConfiguration, error) { + b := &OpenStackMachineApplyConfiguration{} + err := managedfields.ExtractInto(openStackMachine, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachine"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackMachine.Name) + b.WithNamespace(openStackMachine.Namespace) + + b.WithKind("OpenStackMachine") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b, nil +} + +// ExtractOpenStackMachine extracts the applied configuration owned by fieldManager from +// openStackMachine. If no managedFields are found in openStackMachine for fieldManager, a +// OpenStackMachineApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// openStackMachine must be a unmodified OpenStackMachine API object that was retrieved from the Kubernetes API. +// ExtractOpenStackMachine provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackMachine(openStackMachine *apiv1beta2.OpenStackMachine, fieldManager string) (*OpenStackMachineApplyConfiguration, error) { + return ExtractOpenStackMachineFrom(openStackMachine, fieldManager, "") +} + +// ExtractOpenStackMachineStatus extracts the applied configuration owned by fieldManager from +// openStackMachine for the status subresource. +func ExtractOpenStackMachineStatus(openStackMachine *apiv1beta2.OpenStackMachine, fieldManager string) (*OpenStackMachineApplyConfiguration, error) { + return ExtractOpenStackMachineFrom(openStackMachine, fieldManager, "status") +} + +func (b OpenStackMachineApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithKind(value string) *OpenStackMachineApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithAPIVersion(value string) *OpenStackMachineApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithName(value string) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithGenerateName(value string) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithNamespace(value string) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithUID(value types.UID) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithResourceVersion(value string) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithGeneration(value int64) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *OpenStackMachineApplyConfiguration) WithLabels(entries map[string]string) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *OpenStackMachineApplyConfiguration) WithAnnotations(entries map[string]string) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *OpenStackMachineApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *OpenStackMachineApplyConfiguration) WithFinalizers(values ...string) *OpenStackMachineApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *OpenStackMachineApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithSpec(value *OpenStackMachineSpecApplyConfiguration) *OpenStackMachineApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *OpenStackMachineApplyConfiguration) WithStatus(value *OpenStackMachineStatusApplyConfiguration) *OpenStackMachineApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackMachineApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackMachineApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *OpenStackMachineApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackMachineApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinespec.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinespec.go new file mode 100644 index 000000000..59fd4a416 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinespec.go @@ -0,0 +1,245 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// OpenStackMachineSpecApplyConfiguration represents a declarative configuration of the OpenStackMachineSpec type for use +// with apply. +// +// OpenStackMachineSpec defines the desired state of OpenStackMachine. +type OpenStackMachineSpecApplyConfiguration struct { + // ProviderID is the unique identifier as specified by the cloud provider. + ProviderID *string `json:"providerID,omitempty"` + // The flavor reference for the flavor for your server instance. + Flavor *string `json:"flavor,omitempty"` + // FlavorID allows flavors to be specified by ID. This field takes precedence + // over Flavor. + FlavorID *string `json:"flavorID,omitempty"` + // The image to use for your server instance. + // If the rootVolume is specified, this will be used when creating the root volume. + Image *ImageParamApplyConfiguration `json:"image,omitempty"` + // The ssh key to inject in the instance + SSHKeyName *string `json:"sshKeyName,omitempty"` + // Ports to be attached to the server instance. They are created if a port with the given name does not already exist. + // If not specified a default port will be added for the default cluster network. + Ports []PortOptsApplyConfiguration `json:"ports,omitempty"` + // The names of the security groups to assign to the instance + SecurityGroups []SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` + // Whether the server instance is created on a trunk port or not. + Trunk *bool `json:"trunk,omitempty"` + // Tags which will be added to the machine and all dependent resources + // which support them. These are in addition to Tags defined on the + // cluster. + // Requires Nova api 2.52 minimum! + Tags []string `json:"tags,omitempty"` + // Metadata mapping. Allows you to create a map of key value pairs to add to the server instance. + ServerMetadata []ServerMetadataApplyConfiguration `json:"serverMetadata,omitempty"` + // Config Drive support + ConfigDrive *bool `json:"configDrive,omitempty"` + // The volume metadata to boot from + RootVolume *RootVolumeApplyConfiguration `json:"rootVolume,omitempty"` + // AdditionalBlockDevices is a list of specifications for additional block devices to attach to the server instance + AdditionalBlockDevices []AdditionalBlockDeviceApplyConfiguration `json:"additionalBlockDevices,omitempty"` + // The server group to assign the machine to. + ServerGroup *ServerGroupParamApplyConfiguration `json:"serverGroup,omitempty"` + // IdentityRef is a reference to a secret holding OpenStack credentials + // to be used when reconciling this machine. If not specified, the + // credentials specified in the cluster will be used. + IdentityRef *OpenStackIdentityReferenceApplyConfiguration `json:"identityRef,omitempty"` + // floatingIPPoolRef is a reference to a IPPool that will be assigned + // to an IPAddressClaim. Once the IPAddressClaim is fulfilled, the FloatingIP + // will be assigned to the OpenStackMachine. + FloatingIPPoolRef *v1.TypedLocalObjectReference `json:"floatingIPPoolRef,omitempty"` + // SchedulerHintAdditionalProperties are arbitrary key/value pairs that provide additional hints + // to the OpenStack scheduler. These hints can influence how instances are placed on the infrastructure, + // such as specifying certain host aggregates or availability zones. + SchedulerHintAdditionalProperties []SchedulerHintAdditionalPropertyApplyConfiguration `json:"schedulerHintAdditionalProperties,omitempty"` +} + +// OpenStackMachineSpecApplyConfiguration constructs a declarative configuration of the OpenStackMachineSpec type for use with +// apply. +func OpenStackMachineSpec() *OpenStackMachineSpecApplyConfiguration { + return &OpenStackMachineSpecApplyConfiguration{} +} + +// WithProviderID sets the ProviderID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ProviderID field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithProviderID(value string) *OpenStackMachineSpecApplyConfiguration { + b.ProviderID = &value + return b +} + +// WithFlavor sets the Flavor field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Flavor field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithFlavor(value string) *OpenStackMachineSpecApplyConfiguration { + b.Flavor = &value + return b +} + +// WithFlavorID sets the FlavorID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FlavorID field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithFlavorID(value string) *OpenStackMachineSpecApplyConfiguration { + b.FlavorID = &value + return b +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithImage(value *ImageParamApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + b.Image = value + return b +} + +// WithSSHKeyName sets the SSHKeyName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SSHKeyName field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithSSHKeyName(value string) *OpenStackMachineSpecApplyConfiguration { + b.SSHKeyName = &value + return b +} + +// WithPorts adds the given value to the Ports field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Ports field. +func (b *OpenStackMachineSpecApplyConfiguration) WithPorts(values ...*PortOptsApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPorts") + } + b.Ports = append(b.Ports, *values[i]) + } + return b +} + +// WithSecurityGroups adds the given value to the SecurityGroups field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SecurityGroups field. +func (b *OpenStackMachineSpecApplyConfiguration) WithSecurityGroups(values ...*SecurityGroupParamApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSecurityGroups") + } + b.SecurityGroups = append(b.SecurityGroups, *values[i]) + } + return b +} + +// WithTrunk sets the Trunk field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Trunk field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithTrunk(value bool) *OpenStackMachineSpecApplyConfiguration { + b.Trunk = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *OpenStackMachineSpecApplyConfiguration) WithTags(values ...string) *OpenStackMachineSpecApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithServerMetadata adds the given value to the ServerMetadata field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ServerMetadata field. +func (b *OpenStackMachineSpecApplyConfiguration) WithServerMetadata(values ...*ServerMetadataApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithServerMetadata") + } + b.ServerMetadata = append(b.ServerMetadata, *values[i]) + } + return b +} + +// WithConfigDrive sets the ConfigDrive field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConfigDrive field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithConfigDrive(value bool) *OpenStackMachineSpecApplyConfiguration { + b.ConfigDrive = &value + return b +} + +// WithRootVolume sets the RootVolume field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RootVolume field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithRootVolume(value *RootVolumeApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + b.RootVolume = value + return b +} + +// WithAdditionalBlockDevices adds the given value to the AdditionalBlockDevices field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AdditionalBlockDevices field. +func (b *OpenStackMachineSpecApplyConfiguration) WithAdditionalBlockDevices(values ...*AdditionalBlockDeviceApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAdditionalBlockDevices") + } + b.AdditionalBlockDevices = append(b.AdditionalBlockDevices, *values[i]) + } + return b +} + +// WithServerGroup sets the ServerGroup field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServerGroup field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithServerGroup(value *ServerGroupParamApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + b.ServerGroup = value + return b +} + +// WithIdentityRef sets the IdentityRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IdentityRef field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithIdentityRef(value *OpenStackIdentityReferenceApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + b.IdentityRef = value + return b +} + +// WithFloatingIPPoolRef sets the FloatingIPPoolRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FloatingIPPoolRef field is set to the value of the last call. +func (b *OpenStackMachineSpecApplyConfiguration) WithFloatingIPPoolRef(value v1.TypedLocalObjectReference) *OpenStackMachineSpecApplyConfiguration { + b.FloatingIPPoolRef = &value + return b +} + +// WithSchedulerHintAdditionalProperties adds the given value to the SchedulerHintAdditionalProperties field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SchedulerHintAdditionalProperties field. +func (b *OpenStackMachineSpecApplyConfiguration) WithSchedulerHintAdditionalProperties(values ...*SchedulerHintAdditionalPropertyApplyConfiguration) *OpenStackMachineSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSchedulerHintAdditionalProperties") + } + b.SchedulerHintAdditionalProperties = append(b.SchedulerHintAdditionalProperties, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinestatus.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinestatus.go new file mode 100644 index 000000000..2c890ddcf --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinestatus.go @@ -0,0 +1,121 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// OpenStackMachineStatusApplyConfiguration represents a declarative configuration of the OpenStackMachineStatus type for use +// with apply. +// +// OpenStackMachineStatus defines the observed state of OpenStackMachine. +type OpenStackMachineStatusApplyConfiguration struct { + // Initialization contains information about the initialization status of the machine. + Initialization *MachineInitializationApplyConfiguration `json:"initialization,omitempty"` + // InstanceID is the OpenStack instance ID for this machine. + InstanceID *string `json:"instanceID,omitempty"` + // Addresses contains the OpenStack instance associated addresses. + Addresses []v1.NodeAddress `json:"addresses,omitempty"` + // InstanceState is the state of the OpenStack instance for this machine. + // This field is not set anymore by the OpenStackMachine controller. + // Instead, it's set by the OpenStackServer controller. + InstanceState *apiv1beta2.InstanceState `json:"instanceState,omitempty"` + // Resolved contains parts of the machine spec with all external + // references fully resolved. + Resolved *ResolvedMachineSpecApplyConfiguration `json:"resolved,omitempty"` + // Resources contains references to OpenStack resources created for the machine. + Resources *MachineResourcesApplyConfiguration `json:"resources,omitempty"` + // Conditions defines current service state of the OpenStackMachine. + // This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + // (both during initial provisioning and after the initial provisioning is completed). + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// OpenStackMachineStatusApplyConfiguration constructs a declarative configuration of the OpenStackMachineStatus type for use with +// apply. +func OpenStackMachineStatus() *OpenStackMachineStatusApplyConfiguration { + return &OpenStackMachineStatusApplyConfiguration{} +} + +// WithInitialization sets the Initialization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Initialization field is set to the value of the last call. +func (b *OpenStackMachineStatusApplyConfiguration) WithInitialization(value *MachineInitializationApplyConfiguration) *OpenStackMachineStatusApplyConfiguration { + b.Initialization = value + return b +} + +// WithInstanceID sets the InstanceID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the InstanceID field is set to the value of the last call. +func (b *OpenStackMachineStatusApplyConfiguration) WithInstanceID(value string) *OpenStackMachineStatusApplyConfiguration { + b.InstanceID = &value + return b +} + +// WithAddresses adds the given value to the Addresses field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Addresses field. +func (b *OpenStackMachineStatusApplyConfiguration) WithAddresses(values ...v1.NodeAddress) *OpenStackMachineStatusApplyConfiguration { + for i := range values { + b.Addresses = append(b.Addresses, values[i]) + } + return b +} + +// WithInstanceState sets the InstanceState field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the InstanceState field is set to the value of the last call. +func (b *OpenStackMachineStatusApplyConfiguration) WithInstanceState(value apiv1beta2.InstanceState) *OpenStackMachineStatusApplyConfiguration { + b.InstanceState = &value + return b +} + +// WithResolved sets the Resolved field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resolved field is set to the value of the last call. +func (b *OpenStackMachineStatusApplyConfiguration) WithResolved(value *ResolvedMachineSpecApplyConfiguration) *OpenStackMachineStatusApplyConfiguration { + b.Resolved = value + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *OpenStackMachineStatusApplyConfiguration) WithResources(value *MachineResourcesApplyConfiguration) *OpenStackMachineStatusApplyConfiguration { + b.Resources = value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *OpenStackMachineStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *OpenStackMachineStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplate.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplate.go new file mode 100644 index 000000000..6a4f1afcb --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplate.go @@ -0,0 +1,289 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + internal "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/internal" +) + +// OpenStackMachineTemplateApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplate type for use +// with apply. +// +// OpenStackMachineTemplate is the Schema for the openstackmachinetemplates API. +type OpenStackMachineTemplateApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OpenStackMachineTemplateSpecApplyConfiguration `json:"spec,omitempty"` + Status *OpenStackMachineTemplateStatusApplyConfiguration `json:"status,omitempty"` +} + +// OpenStackMachineTemplate constructs a declarative configuration of the OpenStackMachineTemplate type for use with +// apply. +func OpenStackMachineTemplate(name, namespace string) *OpenStackMachineTemplateApplyConfiguration { + b := &OpenStackMachineTemplateApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("OpenStackMachineTemplate") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b +} + +// ExtractOpenStackMachineTemplateFrom extracts the applied configuration owned by fieldManager from +// openStackMachineTemplate for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// openStackMachineTemplate must be a unmodified OpenStackMachineTemplate API object that was retrieved from the Kubernetes API. +// ExtractOpenStackMachineTemplateFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackMachineTemplateFrom(openStackMachineTemplate *apiv1beta2.OpenStackMachineTemplate, fieldManager string, subresource string) (*OpenStackMachineTemplateApplyConfiguration, error) { + b := &OpenStackMachineTemplateApplyConfiguration{} + err := managedfields.ExtractInto(openStackMachineTemplate, internal.Parser().Type("io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplate"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(openStackMachineTemplate.Name) + b.WithNamespace(openStackMachineTemplate.Namespace) + + b.WithKind("OpenStackMachineTemplate") + b.WithAPIVersion("infrastructure.cluster.x-k8s.io/v1beta2") + return b, nil +} + +// ExtractOpenStackMachineTemplate extracts the applied configuration owned by fieldManager from +// openStackMachineTemplate. If no managedFields are found in openStackMachineTemplate for fieldManager, a +// OpenStackMachineTemplateApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// openStackMachineTemplate must be a unmodified OpenStackMachineTemplate API object that was retrieved from the Kubernetes API. +// ExtractOpenStackMachineTemplate provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOpenStackMachineTemplate(openStackMachineTemplate *apiv1beta2.OpenStackMachineTemplate, fieldManager string) (*OpenStackMachineTemplateApplyConfiguration, error) { + return ExtractOpenStackMachineTemplateFrom(openStackMachineTemplate, fieldManager, "") +} + +// ExtractOpenStackMachineTemplateStatus extracts the applied configuration owned by fieldManager from +// openStackMachineTemplate for the status subresource. +func ExtractOpenStackMachineTemplateStatus(openStackMachineTemplate *apiv1beta2.OpenStackMachineTemplate, fieldManager string) (*OpenStackMachineTemplateApplyConfiguration, error) { + return ExtractOpenStackMachineTemplateFrom(openStackMachineTemplate, fieldManager, "status") +} + +func (b OpenStackMachineTemplateApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithKind(value string) *OpenStackMachineTemplateApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithAPIVersion(value string) *OpenStackMachineTemplateApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithName(value string) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithGenerateName(value string) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithNamespace(value string) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithUID(value types.UID) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithResourceVersion(value string) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithGeneration(value int64) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *OpenStackMachineTemplateApplyConfiguration) WithLabels(entries map[string]string) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *OpenStackMachineTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *OpenStackMachineTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *OpenStackMachineTemplateApplyConfiguration) WithFinalizers(values ...string) *OpenStackMachineTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *OpenStackMachineTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithSpec(value *OpenStackMachineTemplateSpecApplyConfiguration) *OpenStackMachineTemplateApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *OpenStackMachineTemplateApplyConfiguration) WithStatus(value *OpenStackMachineTemplateStatusApplyConfiguration) *OpenStackMachineTemplateApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *OpenStackMachineTemplateApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *OpenStackMachineTemplateApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *OpenStackMachineTemplateApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *OpenStackMachineTemplateApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplateresource.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplateresource.go new file mode 100644 index 000000000..6a7d2d0a7 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplateresource.go @@ -0,0 +1,42 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// OpenStackMachineTemplateResourceApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplateResource type for use +// with apply. +// +// OpenStackMachineTemplateResource describes the data needed to create a OpenStackMachine from a template. +type OpenStackMachineTemplateResourceApplyConfiguration struct { + // Spec is the specification of the desired behavior of the machine. + Spec *OpenStackMachineSpecApplyConfiguration `json:"spec,omitempty"` +} + +// OpenStackMachineTemplateResourceApplyConfiguration constructs a declarative configuration of the OpenStackMachineTemplateResource type for use with +// apply. +func OpenStackMachineTemplateResource() *OpenStackMachineTemplateResourceApplyConfiguration { + return &OpenStackMachineTemplateResourceApplyConfiguration{} +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *OpenStackMachineTemplateResourceApplyConfiguration) WithSpec(value *OpenStackMachineSpecApplyConfiguration) *OpenStackMachineTemplateResourceApplyConfiguration { + b.Spec = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplatespec.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplatespec.go new file mode 100644 index 000000000..65705acf2 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplatespec.go @@ -0,0 +1,41 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// OpenStackMachineTemplateSpecApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplateSpec type for use +// with apply. +// +// OpenStackMachineTemplateSpec defines the desired state of OpenStackMachineTemplate. +type OpenStackMachineTemplateSpecApplyConfiguration struct { + Template *OpenStackMachineTemplateResourceApplyConfiguration `json:"template,omitempty"` +} + +// OpenStackMachineTemplateSpecApplyConfiguration constructs a declarative configuration of the OpenStackMachineTemplateSpec type for use with +// apply. +func OpenStackMachineTemplateSpec() *OpenStackMachineTemplateSpecApplyConfiguration { + return &OpenStackMachineTemplateSpecApplyConfiguration{} +} + +// WithTemplate sets the Template field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Template field is set to the value of the last call. +func (b *OpenStackMachineTemplateSpecApplyConfiguration) WithTemplate(value *OpenStackMachineTemplateResourceApplyConfiguration) *OpenStackMachineTemplateSpecApplyConfiguration { + b.Template = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplatestatus.go b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplatestatus.go new file mode 100644 index 000000000..432876dbb --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/openstackmachinetemplatestatus.go @@ -0,0 +1,75 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// OpenStackMachineTemplateStatusApplyConfiguration represents a declarative configuration of the OpenStackMachineTemplateStatus type for use +// with apply. +// +// OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate. +type OpenStackMachineTemplateStatusApplyConfiguration struct { + // Capacity defines the resource capacity for this machine. + // This value is used for autoscaling from zero operations as defined in: + // https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + Capacity *v1.ResourceList `json:"capacity,omitempty"` + NodeInfo *NodeInfoApplyConfiguration `json:"nodeInfo,omitempty"` + // Conditions defines current service state of the OpenStackMachineTemplate. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachineTemplate. + // (both during initial provisioning and after the initial provisioning is completed). + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// OpenStackMachineTemplateStatusApplyConfiguration constructs a declarative configuration of the OpenStackMachineTemplateStatus type for use with +// apply. +func OpenStackMachineTemplateStatus() *OpenStackMachineTemplateStatusApplyConfiguration { + return &OpenStackMachineTemplateStatusApplyConfiguration{} +} + +// WithCapacity sets the Capacity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Capacity field is set to the value of the last call. +func (b *OpenStackMachineTemplateStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *OpenStackMachineTemplateStatusApplyConfiguration { + b.Capacity = &value + return b +} + +// WithNodeInfo sets the NodeInfo field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeInfo field is set to the value of the last call. +func (b *OpenStackMachineTemplateStatusApplyConfiguration) WithNodeInfo(value *NodeInfoApplyConfiguration) *OpenStackMachineTemplateStatusApplyConfiguration { + b.NodeInfo = value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *OpenStackMachineTemplateStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *OpenStackMachineTemplateStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/portopts.go b/pkg/generated/applyconfiguration/api/v1beta2/portopts.go new file mode 100644 index 000000000..65752638b --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/portopts.go @@ -0,0 +1,199 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// PortOptsApplyConfiguration represents a declarative configuration of the PortOpts type for use +// with apply. +type PortOptsApplyConfiguration struct { + // Network is a query for an openstack network that the port will be created or discovered on. + // This will fail if the query returns more than one network. + Network *NetworkParamApplyConfiguration `json:"network,omitempty"` + // Description is a human-readable description for the port. + Description *string `json:"description,omitempty"` + // NameSuffix will be appended to the name of the port if specified. If unspecified, instead the 0-based index of the port in the list is used. + NameSuffix *string `json:"nameSuffix,omitempty"` + // FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network. + FixedIPs []FixedIPApplyConfiguration `json:"fixedIPs,omitempty"` + // SecurityGroups is a list of the names, uuids, filters or any combination these of the security groups to assign to the instance. + SecurityGroups []SecurityGroupParamApplyConfiguration `json:"securityGroups,omitempty"` + // Tags applied to the port (and corresponding trunk, if a trunk is configured.) + // These tags are applied in addition to the instance's tags, which will also be applied to the port. + Tags []string `json:"tags,omitempty"` + // Trunk specifies whether trunking is enabled at the port level. If not + // provided the value is inherited from the machine, or false for a + // bastion host. + Trunk *bool `json:"trunk,omitempty"` + ResolvedPortSpecFieldsApplyConfiguration `json:",inline"` +} + +// PortOptsApplyConfiguration constructs a declarative configuration of the PortOpts type for use with +// apply. +func PortOpts() *PortOptsApplyConfiguration { + return &PortOptsApplyConfiguration{} +} + +// WithNetwork sets the Network field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Network field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithNetwork(value *NetworkParamApplyConfiguration) *PortOptsApplyConfiguration { + b.Network = value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithDescription(value string) *PortOptsApplyConfiguration { + b.Description = &value + return b +} + +// WithNameSuffix sets the NameSuffix field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NameSuffix field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithNameSuffix(value string) *PortOptsApplyConfiguration { + b.NameSuffix = &value + return b +} + +// WithFixedIPs adds the given value to the FixedIPs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the FixedIPs field. +func (b *PortOptsApplyConfiguration) WithFixedIPs(values ...*FixedIPApplyConfiguration) *PortOptsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithFixedIPs") + } + b.FixedIPs = append(b.FixedIPs, *values[i]) + } + return b +} + +// WithSecurityGroups adds the given value to the SecurityGroups field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SecurityGroups field. +func (b *PortOptsApplyConfiguration) WithSecurityGroups(values ...*SecurityGroupParamApplyConfiguration) *PortOptsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSecurityGroups") + } + b.SecurityGroups = append(b.SecurityGroups, *values[i]) + } + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *PortOptsApplyConfiguration) WithTags(values ...string) *PortOptsApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithTrunk sets the Trunk field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Trunk field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithTrunk(value bool) *PortOptsApplyConfiguration { + b.Trunk = &value + return b +} + +// WithAdminStateUp sets the AdminStateUp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AdminStateUp field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithAdminStateUp(value bool) *PortOptsApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.AdminStateUp = &value + return b +} + +// WithMACAddress sets the MACAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MACAddress field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithMACAddress(value string) *PortOptsApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.MACAddress = &value + return b +} + +// WithAllowedAddressPairs adds the given value to the AllowedAddressPairs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AllowedAddressPairs field. +func (b *PortOptsApplyConfiguration) WithAllowedAddressPairs(values ...*AddressPairApplyConfiguration) *PortOptsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAllowedAddressPairs") + } + b.ResolvedPortSpecFieldsApplyConfiguration.AllowedAddressPairs = append(b.ResolvedPortSpecFieldsApplyConfiguration.AllowedAddressPairs, *values[i]) + } + return b +} + +// WithHostID sets the HostID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HostID field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithHostID(value string) *PortOptsApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.HostID = &value + return b +} + +// WithVNICType sets the VNICType field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VNICType field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithVNICType(value string) *PortOptsApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.VNICType = &value + return b +} + +// WithProfile sets the Profile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Profile field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithProfile(value *BindingProfileApplyConfiguration) *PortOptsApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.Profile = value + return b +} + +// WithDisablePortSecurity sets the DisablePortSecurity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisablePortSecurity field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithDisablePortSecurity(value bool) *PortOptsApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.DisablePortSecurity = &value + return b +} + +// WithPropagateUplinkStatus sets the PropagateUplinkStatus field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PropagateUplinkStatus field is set to the value of the last call. +func (b *PortOptsApplyConfiguration) WithPropagateUplinkStatus(value bool) *PortOptsApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.PropagateUplinkStatus = &value + return b +} + +// WithValueSpecs adds the given value to the ValueSpecs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ValueSpecs field. +func (b *PortOptsApplyConfiguration) WithValueSpecs(values ...*ValueSpecApplyConfiguration) *PortOptsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithValueSpecs") + } + b.ResolvedPortSpecFieldsApplyConfiguration.ValueSpecs = append(b.ResolvedPortSpecFieldsApplyConfiguration.ValueSpecs, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/portstatus.go b/pkg/generated/applyconfiguration/api/v1beta2/portstatus.go new file mode 100644 index 000000000..a0e51e6d3 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/portstatus.go @@ -0,0 +1,40 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// PortStatusApplyConfiguration represents a declarative configuration of the PortStatus type for use +// with apply. +type PortStatusApplyConfiguration struct { + // ID is the unique identifier of the port. + ID *string `json:"id,omitempty"` +} + +// PortStatusApplyConfiguration constructs a declarative configuration of the PortStatus type for use with +// apply. +func PortStatus() *PortStatusApplyConfiguration { + return &PortStatusApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *PortStatusApplyConfiguration) WithID(value string) *PortStatusApplyConfiguration { + b.ID = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/resolvedfixedip.go b/pkg/generated/applyconfiguration/api/v1beta2/resolvedfixedip.go new file mode 100644 index 000000000..be484a0e0 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/resolvedfixedip.go @@ -0,0 +1,55 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ResolvedFixedIPApplyConfiguration represents a declarative configuration of the ResolvedFixedIP type for use +// with apply. +// +// ResolvedFixedIP is a FixedIP with the Subnet resolved to an ID. +type ResolvedFixedIPApplyConfiguration struct { + // SubnetID is the id of a subnet to create the fixed IP of a port in. + SubnetID *string `json:"subnet,omitempty"` + // IPAddress is a specific IP address to assign to the port. If SubnetID + // is also specified, IPAddress must be a valid IP address in the + // subnet. If Subnet is not specified, IPAddress must be a valid IP + // address in any subnet of the port's network. + IPAddress *string `json:"ipAddress,omitempty"` +} + +// ResolvedFixedIPApplyConfiguration constructs a declarative configuration of the ResolvedFixedIP type for use with +// apply. +func ResolvedFixedIP() *ResolvedFixedIPApplyConfiguration { + return &ResolvedFixedIPApplyConfiguration{} +} + +// WithSubnetID sets the SubnetID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SubnetID field is set to the value of the last call. +func (b *ResolvedFixedIPApplyConfiguration) WithSubnetID(value string) *ResolvedFixedIPApplyConfiguration { + b.SubnetID = &value + return b +} + +// WithIPAddress sets the IPAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPAddress field is set to the value of the last call. +func (b *ResolvedFixedIPApplyConfiguration) WithIPAddress(value string) *ResolvedFixedIPApplyConfiguration { + b.IPAddress = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/resolvedmachinespec.go b/pkg/generated/applyconfiguration/api/v1beta2/resolvedmachinespec.go new file mode 100644 index 000000000..c3c0268e8 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/resolvedmachinespec.go @@ -0,0 +1,77 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ResolvedMachineSpecApplyConfiguration represents a declarative configuration of the ResolvedMachineSpec type for use +// with apply. +// +// ResolvedMachineSpec contains resolved references to resources required by the machine. +type ResolvedMachineSpecApplyConfiguration struct { + // ServerGroupID is the ID of the server group the machine should be added to and is calculated based on ServerGroupFilter. + ServerGroupID *string `json:"serverGroupID,omitempty"` + // ImageID is the ID of the image to use for the machine and is calculated based on ImageFilter. + ImageID *string `json:"imageID,omitempty"` + // FlavorID is the ID of the flavor to use. + FlavorID *string `json:"flavorID,omitempty"` + // Ports is the fully resolved list of ports to create for the machine. + Ports []ResolvedPortSpecApplyConfiguration `json:"ports,omitempty"` +} + +// ResolvedMachineSpecApplyConfiguration constructs a declarative configuration of the ResolvedMachineSpec type for use with +// apply. +func ResolvedMachineSpec() *ResolvedMachineSpecApplyConfiguration { + return &ResolvedMachineSpecApplyConfiguration{} +} + +// WithServerGroupID sets the ServerGroupID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServerGroupID field is set to the value of the last call. +func (b *ResolvedMachineSpecApplyConfiguration) WithServerGroupID(value string) *ResolvedMachineSpecApplyConfiguration { + b.ServerGroupID = &value + return b +} + +// WithImageID sets the ImageID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImageID field is set to the value of the last call. +func (b *ResolvedMachineSpecApplyConfiguration) WithImageID(value string) *ResolvedMachineSpecApplyConfiguration { + b.ImageID = &value + return b +} + +// WithFlavorID sets the FlavorID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FlavorID field is set to the value of the last call. +func (b *ResolvedMachineSpecApplyConfiguration) WithFlavorID(value string) *ResolvedMachineSpecApplyConfiguration { + b.FlavorID = &value + return b +} + +// WithPorts adds the given value to the Ports field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Ports field. +func (b *ResolvedMachineSpecApplyConfiguration) WithPorts(values ...*ResolvedPortSpecApplyConfiguration) *ResolvedMachineSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPorts") + } + b.Ports = append(b.Ports, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/resolvedportspec.go b/pkg/generated/applyconfiguration/api/v1beta2/resolvedportspec.go new file mode 100644 index 000000000..9bb7cbf3a --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/resolvedportspec.go @@ -0,0 +1,194 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ResolvedPortSpecApplyConfiguration represents a declarative configuration of the ResolvedPortSpec type for use +// with apply. +// +// ResolvedPortSpec is a PortOpts with all contained references fully resolved. +type ResolvedPortSpecApplyConfiguration struct { + // Name is the name of the port. + Name *string `json:"name,omitempty"` + // Description is a human-readable description for the port. + Description *string `json:"description,omitempty"` + // NetworkID is the ID of the network the port will be created in. + NetworkID *string `json:"networkID,omitempty"` + // Tags applied to the port (and corresponding trunk, if a trunk is configured.) + Tags []string `json:"tags,omitempty"` + // Trunk specifies whether trunking is enabled at the port level. + Trunk *bool `json:"trunk,omitempty"` + // FixedIPs is a list of pairs of subnet and/or IP address to assign to the port. If specified, these must be subnets of the port's network. + FixedIPs []ResolvedFixedIPApplyConfiguration `json:"fixedIPs,omitempty"` + // SecurityGroups is a list of security group IDs to assign to the port. + SecurityGroups []string `json:"securityGroups,omitempty"` + ResolvedPortSpecFieldsApplyConfiguration `json:",inline"` +} + +// ResolvedPortSpecApplyConfiguration constructs a declarative configuration of the ResolvedPortSpec type for use with +// apply. +func ResolvedPortSpec() *ResolvedPortSpecApplyConfiguration { + return &ResolvedPortSpecApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithName(value string) *ResolvedPortSpecApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithDescription(value string) *ResolvedPortSpecApplyConfiguration { + b.Description = &value + return b +} + +// WithNetworkID sets the NetworkID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NetworkID field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithNetworkID(value string) *ResolvedPortSpecApplyConfiguration { + b.NetworkID = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *ResolvedPortSpecApplyConfiguration) WithTags(values ...string) *ResolvedPortSpecApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithTrunk sets the Trunk field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Trunk field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithTrunk(value bool) *ResolvedPortSpecApplyConfiguration { + b.Trunk = &value + return b +} + +// WithFixedIPs adds the given value to the FixedIPs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the FixedIPs field. +func (b *ResolvedPortSpecApplyConfiguration) WithFixedIPs(values ...*ResolvedFixedIPApplyConfiguration) *ResolvedPortSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithFixedIPs") + } + b.FixedIPs = append(b.FixedIPs, *values[i]) + } + return b +} + +// WithSecurityGroups adds the given value to the SecurityGroups field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SecurityGroups field. +func (b *ResolvedPortSpecApplyConfiguration) WithSecurityGroups(values ...string) *ResolvedPortSpecApplyConfiguration { + for i := range values { + b.SecurityGroups = append(b.SecurityGroups, values[i]) + } + return b +} + +// WithAdminStateUp sets the AdminStateUp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AdminStateUp field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithAdminStateUp(value bool) *ResolvedPortSpecApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.AdminStateUp = &value + return b +} + +// WithMACAddress sets the MACAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MACAddress field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithMACAddress(value string) *ResolvedPortSpecApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.MACAddress = &value + return b +} + +// WithAllowedAddressPairs adds the given value to the AllowedAddressPairs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AllowedAddressPairs field. +func (b *ResolvedPortSpecApplyConfiguration) WithAllowedAddressPairs(values ...*AddressPairApplyConfiguration) *ResolvedPortSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAllowedAddressPairs") + } + b.ResolvedPortSpecFieldsApplyConfiguration.AllowedAddressPairs = append(b.ResolvedPortSpecFieldsApplyConfiguration.AllowedAddressPairs, *values[i]) + } + return b +} + +// WithHostID sets the HostID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HostID field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithHostID(value string) *ResolvedPortSpecApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.HostID = &value + return b +} + +// WithVNICType sets the VNICType field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VNICType field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithVNICType(value string) *ResolvedPortSpecApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.VNICType = &value + return b +} + +// WithProfile sets the Profile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Profile field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithProfile(value *BindingProfileApplyConfiguration) *ResolvedPortSpecApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.Profile = value + return b +} + +// WithDisablePortSecurity sets the DisablePortSecurity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisablePortSecurity field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithDisablePortSecurity(value bool) *ResolvedPortSpecApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.DisablePortSecurity = &value + return b +} + +// WithPropagateUplinkStatus sets the PropagateUplinkStatus field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PropagateUplinkStatus field is set to the value of the last call. +func (b *ResolvedPortSpecApplyConfiguration) WithPropagateUplinkStatus(value bool) *ResolvedPortSpecApplyConfiguration { + b.ResolvedPortSpecFieldsApplyConfiguration.PropagateUplinkStatus = &value + return b +} + +// WithValueSpecs adds the given value to the ValueSpecs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ValueSpecs field. +func (b *ResolvedPortSpecApplyConfiguration) WithValueSpecs(values ...*ValueSpecApplyConfiguration) *ResolvedPortSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithValueSpecs") + } + b.ResolvedPortSpecFieldsApplyConfiguration.ValueSpecs = append(b.ResolvedPortSpecFieldsApplyConfiguration.ValueSpecs, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/resolvedportspecfields.go b/pkg/generated/applyconfiguration/api/v1beta2/resolvedportspecfields.go new file mode 100644 index 000000000..634b82ba1 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/resolvedportspecfields.go @@ -0,0 +1,154 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ResolvedPortSpecFieldsApplyConfiguration represents a declarative configuration of the ResolvedPortSpecFields type for use +// with apply. +// +// ResolvePortSpecFields is a convenience struct containing all fields of a +// PortOpts which don't contain references which need to be resolved, and can +// therefore be shared with ResolvedPortSpec. +type ResolvedPortSpecFieldsApplyConfiguration struct { + // AdminStateUp specifies whether the port should be created in the up (true) or down (false) state. The default is up. + AdminStateUp *bool `json:"adminStateUp,omitempty"` + // MACAddress specifies the MAC address of the port. If not specified, the MAC address will be generated. + MACAddress *string `json:"macAddress,omitempty"` + // AllowedAddressPairs is a list of address pairs which Neutron will + // allow the port to send traffic from in addition to the port's + // addresses. If not specified, the MAC Address will be the MAC Address + // of the port. Depending on the configuration of Neutron, it may be + // supported to specify a CIDR instead of a specific IP address. + AllowedAddressPairs []AddressPairApplyConfiguration `json:"allowedAddressPairs,omitempty"` + // HostID specifies the ID of the host where the port resides. + HostID *string `json:"hostID,omitempty"` + // VNICType specifies the type of vNIC which this port should be + // attached to. This is used to determine which mechanism driver(s) to + // be used to bind the port. The valid values are normal, macvtap, + // direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + // remote-managed, although these values will not be validated in this + // API to ensure compatibility with future neutron changes or custom + // implementations. What type of vNIC is actually available depends on + // deployments. If not specified, the Neutron default value is used. + VNICType *string `json:"vnicType,omitempty"` + // Profile is a set of key-value pairs that are used for binding + // details. We intentionally don't expose this as a map[string]string + // because we only want to enable the users to set the values of the + // keys that are known to work in OpenStack Networking API. See + // https://docs.openstack.org/api-ref/network/v2/index.html?expanded=create-port-detail#create-port + // To set profiles, your tenant needs permissions rule:create_port, and + // rule:create_port:binding:profile + Profile *BindingProfileApplyConfiguration `json:"profile,omitempty"` + // DisablePortSecurity enables or disables the port security when set. + // When not set, it takes the value of the corresponding field at the network level. + DisablePortSecurity *bool `json:"disablePortSecurity,omitempty"` + // PropageteUplinkStatus enables or disables the propagate uplink status on the port. + PropagateUplinkStatus *bool `json:"propagateUplinkStatus,omitempty"` + // Value specs are extra parameters to include in the API request with OpenStack. + // This is an extension point for the API, so what they do and if they are supported, + // depends on the specific OpenStack implementation. + ValueSpecs []ValueSpecApplyConfiguration `json:"valueSpecs,omitempty"` +} + +// ResolvedPortSpecFieldsApplyConfiguration constructs a declarative configuration of the ResolvedPortSpecFields type for use with +// apply. +func ResolvedPortSpecFields() *ResolvedPortSpecFieldsApplyConfiguration { + return &ResolvedPortSpecFieldsApplyConfiguration{} +} + +// WithAdminStateUp sets the AdminStateUp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AdminStateUp field is set to the value of the last call. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithAdminStateUp(value bool) *ResolvedPortSpecFieldsApplyConfiguration { + b.AdminStateUp = &value + return b +} + +// WithMACAddress sets the MACAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MACAddress field is set to the value of the last call. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithMACAddress(value string) *ResolvedPortSpecFieldsApplyConfiguration { + b.MACAddress = &value + return b +} + +// WithAllowedAddressPairs adds the given value to the AllowedAddressPairs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AllowedAddressPairs field. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithAllowedAddressPairs(values ...*AddressPairApplyConfiguration) *ResolvedPortSpecFieldsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAllowedAddressPairs") + } + b.AllowedAddressPairs = append(b.AllowedAddressPairs, *values[i]) + } + return b +} + +// WithHostID sets the HostID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HostID field is set to the value of the last call. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithHostID(value string) *ResolvedPortSpecFieldsApplyConfiguration { + b.HostID = &value + return b +} + +// WithVNICType sets the VNICType field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VNICType field is set to the value of the last call. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithVNICType(value string) *ResolvedPortSpecFieldsApplyConfiguration { + b.VNICType = &value + return b +} + +// WithProfile sets the Profile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Profile field is set to the value of the last call. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithProfile(value *BindingProfileApplyConfiguration) *ResolvedPortSpecFieldsApplyConfiguration { + b.Profile = value + return b +} + +// WithDisablePortSecurity sets the DisablePortSecurity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisablePortSecurity field is set to the value of the last call. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithDisablePortSecurity(value bool) *ResolvedPortSpecFieldsApplyConfiguration { + b.DisablePortSecurity = &value + return b +} + +// WithPropagateUplinkStatus sets the PropagateUplinkStatus field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PropagateUplinkStatus field is set to the value of the last call. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithPropagateUplinkStatus(value bool) *ResolvedPortSpecFieldsApplyConfiguration { + b.PropagateUplinkStatus = &value + return b +} + +// WithValueSpecs adds the given value to the ValueSpecs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ValueSpecs field. +func (b *ResolvedPortSpecFieldsApplyConfiguration) WithValueSpecs(values ...*ValueSpecApplyConfiguration) *ResolvedPortSpecFieldsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithValueSpecs") + } + b.ValueSpecs = append(b.ValueSpecs, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/resourcereference.go b/pkg/generated/applyconfiguration/api/v1beta2/resourcereference.go new file mode 100644 index 000000000..93131bf2d --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/resourcereference.go @@ -0,0 +1,40 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ResourceReferenceApplyConfiguration represents a declarative configuration of the ResourceReference type for use +// with apply. +type ResourceReferenceApplyConfiguration struct { + // Name is the name of the referenced resource + Name *string `json:"name,omitempty"` +} + +// ResourceReferenceApplyConfiguration constructs a declarative configuration of the ResourceReference type for use with +// apply. +func ResourceReference() *ResourceReferenceApplyConfiguration { + return &ResourceReferenceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceReferenceApplyConfiguration) WithName(value string) *ResourceReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/rootvolume.go b/pkg/generated/applyconfiguration/api/v1beta2/rootvolume.go new file mode 100644 index 000000000..710a8cdda --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/rootvolume.go @@ -0,0 +1,57 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// RootVolumeApplyConfiguration represents a declarative configuration of the RootVolume type for use +// with apply. +type RootVolumeApplyConfiguration struct { + // SizeGiB is the size of the block device in gibibytes (GiB). + SizeGiB *int `json:"sizeGiB,omitempty"` + BlockDeviceVolumeApplyConfiguration `json:",inline"` +} + +// RootVolumeApplyConfiguration constructs a declarative configuration of the RootVolume type for use with +// apply. +func RootVolume() *RootVolumeApplyConfiguration { + return &RootVolumeApplyConfiguration{} +} + +// WithSizeGiB sets the SizeGiB field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SizeGiB field is set to the value of the last call. +func (b *RootVolumeApplyConfiguration) WithSizeGiB(value int) *RootVolumeApplyConfiguration { + b.SizeGiB = &value + return b +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *RootVolumeApplyConfiguration) WithType(value string) *RootVolumeApplyConfiguration { + b.BlockDeviceVolumeApplyConfiguration.Type = &value + return b +} + +// WithAvailabilityZone sets the AvailabilityZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AvailabilityZone field is set to the value of the last call. +func (b *RootVolumeApplyConfiguration) WithAvailabilityZone(value *VolumeAvailabilityZoneApplyConfiguration) *RootVolumeApplyConfiguration { + b.BlockDeviceVolumeApplyConfiguration.AvailabilityZone = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/router.go b/pkg/generated/applyconfiguration/api/v1beta2/router.go new file mode 100644 index 000000000..a1b9c3982 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/router.go @@ -0,0 +1,72 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// RouterApplyConfiguration represents a declarative configuration of the Router type for use +// with apply. +// +// Router represents basic information about the associated OpenStack Neutron Router. +type RouterApplyConfiguration struct { + Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + Tags []string `json:"tags,omitempty"` + IPs []string `json:"ips,omitempty"` +} + +// RouterApplyConfiguration constructs a declarative configuration of the Router type for use with +// apply. +func Router() *RouterApplyConfiguration { + return &RouterApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *RouterApplyConfiguration) WithName(value string) *RouterApplyConfiguration { + b.Name = &value + return b +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *RouterApplyConfiguration) WithID(value string) *RouterApplyConfiguration { + b.ID = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *RouterApplyConfiguration) WithTags(values ...string) *RouterApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithIPs adds the given value to the IPs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the IPs field. +func (b *RouterApplyConfiguration) WithIPs(values ...string) *RouterApplyConfiguration { + for i := range values { + b.IPs = append(b.IPs, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/routerfilter.go b/pkg/generated/applyconfiguration/api/v1beta2/routerfilter.go new file mode 100644 index 000000000..39d5ff568 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/routerfilter.go @@ -0,0 +1,104 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// RouterFilterApplyConfiguration represents a declarative configuration of the RouterFilter type for use +// with apply. +// +// RouterFilter specifies a query to select an OpenStack router. At least one property must be set. +type RouterFilterApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ProjectID *string `json:"projectID,omitempty"` + FilterByNeutronTagsApplyConfiguration `json:",inline"` +} + +// RouterFilterApplyConfiguration constructs a declarative configuration of the RouterFilter type for use with +// apply. +func RouterFilter() *RouterFilterApplyConfiguration { + return &RouterFilterApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *RouterFilterApplyConfiguration) WithName(value string) *RouterFilterApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *RouterFilterApplyConfiguration) WithDescription(value string) *RouterFilterApplyConfiguration { + b.Description = &value + return b +} + +// WithProjectID sets the ProjectID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ProjectID field is set to the value of the last call. +func (b *RouterFilterApplyConfiguration) WithProjectID(value string) *RouterFilterApplyConfiguration { + b.ProjectID = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *RouterFilterApplyConfiguration) WithTags(values ...apiv1beta2.NeutronTag) *RouterFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.Tags = append(b.FilterByNeutronTagsApplyConfiguration.Tags, values[i]) + } + return b +} + +// WithTagsAny adds the given value to the TagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TagsAny field. +func (b *RouterFilterApplyConfiguration) WithTagsAny(values ...apiv1beta2.NeutronTag) *RouterFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.TagsAny = append(b.FilterByNeutronTagsApplyConfiguration.TagsAny, values[i]) + } + return b +} + +// WithNotTags adds the given value to the NotTags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTags field. +func (b *RouterFilterApplyConfiguration) WithNotTags(values ...apiv1beta2.NeutronTag) *RouterFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTags = append(b.FilterByNeutronTagsApplyConfiguration.NotTags, values[i]) + } + return b +} + +// WithNotTagsAny adds the given value to the NotTagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTagsAny field. +func (b *RouterFilterApplyConfiguration) WithNotTagsAny(values ...apiv1beta2.NeutronTag) *RouterFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTagsAny = append(b.FilterByNeutronTagsApplyConfiguration.NotTagsAny, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/routerparam.go b/pkg/generated/applyconfiguration/api/v1beta2/routerparam.go new file mode 100644 index 000000000..07901299f --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/routerparam.go @@ -0,0 +1,52 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// RouterParamApplyConfiguration represents a declarative configuration of the RouterParam type for use +// with apply. +// +// RouterParam specifies an OpenStack router to use. It may be specified by either ID or filter, but not both. +type RouterParamApplyConfiguration struct { + // ID is the ID of the router to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + ID *string `json:"id,omitempty"` + // Filter specifies a filter to select an OpenStack router. If provided, cannot be empty. + Filter *RouterFilterApplyConfiguration `json:"filter,omitempty"` +} + +// RouterParamApplyConfiguration constructs a declarative configuration of the RouterParam type for use with +// apply. +func RouterParam() *RouterParamApplyConfiguration { + return &RouterParamApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *RouterParamApplyConfiguration) WithID(value string) *RouterParamApplyConfiguration { + b.ID = &value + return b +} + +// WithFilter sets the Filter field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Filter field is set to the value of the last call. +func (b *RouterParamApplyConfiguration) WithFilter(value *RouterFilterApplyConfiguration) *RouterParamApplyConfiguration { + b.Filter = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/schedulerhintadditionalproperty.go b/pkg/generated/applyconfiguration/api/v1beta2/schedulerhintadditionalproperty.go new file mode 100644 index 000000000..8f9d21a27 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/schedulerhintadditionalproperty.go @@ -0,0 +1,55 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// SchedulerHintAdditionalPropertyApplyConfiguration represents a declarative configuration of the SchedulerHintAdditionalProperty type for use +// with apply. +// +// SchedulerHintAdditionalProperty represents a single additional property for a scheduler hint. +// It includes a Name to identify the property and a Value that can be of various types. +type SchedulerHintAdditionalPropertyApplyConfiguration struct { + // Name is the name of the scheduler hint property. + // It is a unique identifier for the property. + Name *string `json:"name,omitempty"` + // Value is the value of the scheduler hint property, which can be of various types + // (e.g., bool, string, int). The type is indicated by the Value.Type field. + Value *SchedulerHintAdditionalValueApplyConfiguration `json:"value,omitempty"` +} + +// SchedulerHintAdditionalPropertyApplyConfiguration constructs a declarative configuration of the SchedulerHintAdditionalProperty type for use with +// apply. +func SchedulerHintAdditionalProperty() *SchedulerHintAdditionalPropertyApplyConfiguration { + return &SchedulerHintAdditionalPropertyApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SchedulerHintAdditionalPropertyApplyConfiguration) WithName(value string) *SchedulerHintAdditionalPropertyApplyConfiguration { + b.Name = &value + return b +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *SchedulerHintAdditionalPropertyApplyConfiguration) WithValue(value *SchedulerHintAdditionalValueApplyConfiguration) *SchedulerHintAdditionalPropertyApplyConfiguration { + b.Value = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/schedulerhintadditionalvalue.go b/pkg/generated/applyconfiguration/api/v1beta2/schedulerhintadditionalvalue.go new file mode 100644 index 000000000..b6604c01b --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/schedulerhintadditionalvalue.go @@ -0,0 +1,82 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// SchedulerHintAdditionalValueApplyConfiguration represents a declarative configuration of the SchedulerHintAdditionalValue type for use +// with apply. +// +// SchedulerHintAdditionalValue represents the value of a scheduler hint property. +// The value can be of various types: Bool, String, or Number. +// The Type field indicates the type of the value being used. +type SchedulerHintAdditionalValueApplyConfiguration struct { + // Type represents the type of the value. + // Valid values are Bool, String, and Number. + Type *apiv1beta2.SchedulerHintValueType `json:"type,omitempty"` + // Bool is the boolean value of the scheduler hint, used when Type is "Bool". + // This field is required if type is 'Bool', and must not be set otherwise. + Bool *bool `json:"bool,omitempty"` + // Number is the integer value of the scheduler hint, used when Type is "Number". + // This field is required if type is 'Number', and must not be set otherwise. + Number *int `json:"number,omitempty"` + // String is the string value of the scheduler hint, used when Type is "String". + // This field is required if type is 'String', and must not be set otherwise. + String *string `json:"string,omitempty"` +} + +// SchedulerHintAdditionalValueApplyConfiguration constructs a declarative configuration of the SchedulerHintAdditionalValue type for use with +// apply. +func SchedulerHintAdditionalValue() *SchedulerHintAdditionalValueApplyConfiguration { + return &SchedulerHintAdditionalValueApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *SchedulerHintAdditionalValueApplyConfiguration) WithType(value apiv1beta2.SchedulerHintValueType) *SchedulerHintAdditionalValueApplyConfiguration { + b.Type = &value + return b +} + +// WithBool sets the Bool field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Bool field is set to the value of the last call. +func (b *SchedulerHintAdditionalValueApplyConfiguration) WithBool(value bool) *SchedulerHintAdditionalValueApplyConfiguration { + b.Bool = &value + return b +} + +// WithNumber sets the Number field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Number field is set to the value of the last call. +func (b *SchedulerHintAdditionalValueApplyConfiguration) WithNumber(value int) *SchedulerHintAdditionalValueApplyConfiguration { + b.Number = &value + return b +} + +// WithString sets the String field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the String field is set to the value of the last call. +func (b *SchedulerHintAdditionalValueApplyConfiguration) WithString(value string) *SchedulerHintAdditionalValueApplyConfiguration { + b.String = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/securitygroupfilter.go b/pkg/generated/applyconfiguration/api/v1beta2/securitygroupfilter.go new file mode 100644 index 000000000..d6c687b1e --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/securitygroupfilter.go @@ -0,0 +1,104 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// SecurityGroupFilterApplyConfiguration represents a declarative configuration of the SecurityGroupFilter type for use +// with apply. +// +// SecurityGroupFilter specifies a query to select an OpenStack security group. At least one property must be set. +type SecurityGroupFilterApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ProjectID *string `json:"projectID,omitempty"` + FilterByNeutronTagsApplyConfiguration `json:",inline"` +} + +// SecurityGroupFilterApplyConfiguration constructs a declarative configuration of the SecurityGroupFilter type for use with +// apply. +func SecurityGroupFilter() *SecurityGroupFilterApplyConfiguration { + return &SecurityGroupFilterApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SecurityGroupFilterApplyConfiguration) WithName(value string) *SecurityGroupFilterApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *SecurityGroupFilterApplyConfiguration) WithDescription(value string) *SecurityGroupFilterApplyConfiguration { + b.Description = &value + return b +} + +// WithProjectID sets the ProjectID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ProjectID field is set to the value of the last call. +func (b *SecurityGroupFilterApplyConfiguration) WithProjectID(value string) *SecurityGroupFilterApplyConfiguration { + b.ProjectID = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *SecurityGroupFilterApplyConfiguration) WithTags(values ...apiv1beta2.NeutronTag) *SecurityGroupFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.Tags = append(b.FilterByNeutronTagsApplyConfiguration.Tags, values[i]) + } + return b +} + +// WithTagsAny adds the given value to the TagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TagsAny field. +func (b *SecurityGroupFilterApplyConfiguration) WithTagsAny(values ...apiv1beta2.NeutronTag) *SecurityGroupFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.TagsAny = append(b.FilterByNeutronTagsApplyConfiguration.TagsAny, values[i]) + } + return b +} + +// WithNotTags adds the given value to the NotTags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTags field. +func (b *SecurityGroupFilterApplyConfiguration) WithNotTags(values ...apiv1beta2.NeutronTag) *SecurityGroupFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTags = append(b.FilterByNeutronTagsApplyConfiguration.NotTags, values[i]) + } + return b +} + +// WithNotTagsAny adds the given value to the NotTagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTagsAny field. +func (b *SecurityGroupFilterApplyConfiguration) WithNotTagsAny(values ...apiv1beta2.NeutronTag) *SecurityGroupFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTagsAny = append(b.FilterByNeutronTagsApplyConfiguration.NotTagsAny, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/securitygroupparam.go b/pkg/generated/applyconfiguration/api/v1beta2/securitygroupparam.go new file mode 100644 index 000000000..ec79c00b3 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/securitygroupparam.go @@ -0,0 +1,52 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// SecurityGroupParamApplyConfiguration represents a declarative configuration of the SecurityGroupParam type for use +// with apply. +// +// SecurityGroupParam specifies an OpenStack security group. It may be specified by ID or filter, but not both. +type SecurityGroupParamApplyConfiguration struct { + // ID is the ID of the security group to use. If ID is provided, the other filters cannot be provided. Must be in UUID format. + ID *string `json:"id,omitempty"` + // Filter specifies a query to select an OpenStack security group. If provided, cannot be empty. + Filter *SecurityGroupFilterApplyConfiguration `json:"filter,omitempty"` +} + +// SecurityGroupParamApplyConfiguration constructs a declarative configuration of the SecurityGroupParam type for use with +// apply. +func SecurityGroupParam() *SecurityGroupParamApplyConfiguration { + return &SecurityGroupParamApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *SecurityGroupParamApplyConfiguration) WithID(value string) *SecurityGroupParamApplyConfiguration { + b.ID = &value + return b +} + +// WithFilter sets the Filter field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Filter field is set to the value of the last call. +func (b *SecurityGroupParamApplyConfiguration) WithFilter(value *SecurityGroupFilterApplyConfiguration) *SecurityGroupParamApplyConfiguration { + b.Filter = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/securitygrouprulespec.go b/pkg/generated/applyconfiguration/api/v1beta2/securitygrouprulespec.go new file mode 100644 index 000000000..db1ab7ad0 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/securitygrouprulespec.go @@ -0,0 +1,153 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// SecurityGroupRuleSpecApplyConfiguration represents a declarative configuration of the SecurityGroupRuleSpec type for use +// with apply. +// +// SecurityGroupRuleSpec represent the basic information of the associated OpenStack +// Security Group Role. +// For now this is only used for the allNodesSecurityGroupRules but when we add +// other security groups, we'll need to add a validation because +// Remote* fields are mutually exclusive. +type SecurityGroupRuleSpecApplyConfiguration struct { + // name of the security group rule. + // It's used to identify the rule so it can be patched and will not be sent to the OpenStack API. + Name *string `json:"name,omitempty"` + // description of the security group rule. + Description *string `json:"description,omitempty"` + // direction in which the security group rule is applied. The only values + // allowed are "ingress" or "egress". For a compute instance, an ingress + // security group rule is applied to incoming (ingress) traffic for that + // instance. An egress rule is applied to traffic leaving the instance. + Direction *string `json:"direction,omitempty"` + // etherType must be IPv4 or IPv6, and addresses represented in CIDR must match the + // ingress or egress rules. + EtherType *string `json:"etherType,omitempty"` + // portRangeMin is a number in the range that is matched by the security group + // rule. If the protocol is TCP or UDP, this value must be less than or equal + // to the value of the portRangeMax attribute. + PortRangeMin *int `json:"portRangeMin,omitempty"` + // portRangeMax is a number in the range that is matched by the security group + // rule. The portRangeMin attribute constrains the portRangeMax attribute. + PortRangeMax *int `json:"portRangeMax,omitempty"` + // protocol is the protocol that is matched by the security group rule. + Protocol *string `json:"protocol,omitempty"` + // remoteGroupID is the remote group ID to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + RemoteGroupID *string `json:"remoteGroupID,omitempty"` + // remoteIPPrefix is the remote IP prefix to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + RemoteIPPrefix *string `json:"remoteIPPrefix,omitempty"` + // remoteManagedGroups is the remote managed groups to be associated with this security group rule. + // You can specify either remoteGroupID or remoteIPPrefix or remoteManagedGroups. + RemoteManagedGroups []apiv1beta2.ManagedSecurityGroupName `json:"remoteManagedGroups,omitempty"` +} + +// SecurityGroupRuleSpecApplyConfiguration constructs a declarative configuration of the SecurityGroupRuleSpec type for use with +// apply. +func SecurityGroupRuleSpec() *SecurityGroupRuleSpecApplyConfiguration { + return &SecurityGroupRuleSpecApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithName(value string) *SecurityGroupRuleSpecApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithDescription(value string) *SecurityGroupRuleSpecApplyConfiguration { + b.Description = &value + return b +} + +// WithDirection sets the Direction field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Direction field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithDirection(value string) *SecurityGroupRuleSpecApplyConfiguration { + b.Direction = &value + return b +} + +// WithEtherType sets the EtherType field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the EtherType field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithEtherType(value string) *SecurityGroupRuleSpecApplyConfiguration { + b.EtherType = &value + return b +} + +// WithPortRangeMin sets the PortRangeMin field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PortRangeMin field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithPortRangeMin(value int) *SecurityGroupRuleSpecApplyConfiguration { + b.PortRangeMin = &value + return b +} + +// WithPortRangeMax sets the PortRangeMax field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PortRangeMax field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithPortRangeMax(value int) *SecurityGroupRuleSpecApplyConfiguration { + b.PortRangeMax = &value + return b +} + +// WithProtocol sets the Protocol field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Protocol field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithProtocol(value string) *SecurityGroupRuleSpecApplyConfiguration { + b.Protocol = &value + return b +} + +// WithRemoteGroupID sets the RemoteGroupID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RemoteGroupID field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithRemoteGroupID(value string) *SecurityGroupRuleSpecApplyConfiguration { + b.RemoteGroupID = &value + return b +} + +// WithRemoteIPPrefix sets the RemoteIPPrefix field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RemoteIPPrefix field is set to the value of the last call. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithRemoteIPPrefix(value string) *SecurityGroupRuleSpecApplyConfiguration { + b.RemoteIPPrefix = &value + return b +} + +// WithRemoteManagedGroups adds the given value to the RemoteManagedGroups field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the RemoteManagedGroups field. +func (b *SecurityGroupRuleSpecApplyConfiguration) WithRemoteManagedGroups(values ...apiv1beta2.ManagedSecurityGroupName) *SecurityGroupRuleSpecApplyConfiguration { + for i := range values { + b.RemoteManagedGroups = append(b.RemoteManagedGroups, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/securitygroupstatus.go b/pkg/generated/applyconfiguration/api/v1beta2/securitygroupstatus.go new file mode 100644 index 000000000..09b3f9c29 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/securitygroupstatus.go @@ -0,0 +1,53 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// SecurityGroupStatusApplyConfiguration represents a declarative configuration of the SecurityGroupStatus type for use +// with apply. +// +// SecurityGroupStatus represents the basic information of the associated +// OpenStack Neutron Security Group. +type SecurityGroupStatusApplyConfiguration struct { + // name of the security group + Name *string `json:"name,omitempty"` + // id of the security group + ID *string `json:"id,omitempty"` +} + +// SecurityGroupStatusApplyConfiguration constructs a declarative configuration of the SecurityGroupStatus type for use with +// apply. +func SecurityGroupStatus() *SecurityGroupStatusApplyConfiguration { + return &SecurityGroupStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SecurityGroupStatusApplyConfiguration) WithName(value string) *SecurityGroupStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *SecurityGroupStatusApplyConfiguration) WithID(value string) *SecurityGroupStatusApplyConfiguration { + b.ID = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/servergroupfilter.go b/pkg/generated/applyconfiguration/api/v1beta2/servergroupfilter.go new file mode 100644 index 000000000..a860c6849 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/servergroupfilter.go @@ -0,0 +1,42 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ServerGroupFilterApplyConfiguration represents a declarative configuration of the ServerGroupFilter type for use +// with apply. +// +// ServerGroupFilter specifies a query to select an OpenStack server group. At least one property must be set. +type ServerGroupFilterApplyConfiguration struct { + // Name is the name of a server group to look for. + Name *string `json:"name,omitempty"` +} + +// ServerGroupFilterApplyConfiguration constructs a declarative configuration of the ServerGroupFilter type for use with +// apply. +func ServerGroupFilter() *ServerGroupFilterApplyConfiguration { + return &ServerGroupFilterApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ServerGroupFilterApplyConfiguration) WithName(value string) *ServerGroupFilterApplyConfiguration { + b.Name = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/servergroupparam.go b/pkg/generated/applyconfiguration/api/v1beta2/servergroupparam.go new file mode 100644 index 000000000..e5083b190 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/servergroupparam.go @@ -0,0 +1,52 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ServerGroupParamApplyConfiguration represents a declarative configuration of the ServerGroupParam type for use +// with apply. +// +// ServerGroupParam specifies an OpenStack server group. It may be specified by ID or filter, but not both. +type ServerGroupParamApplyConfiguration struct { + // ID is the ID of the server group to use. + ID *string `json:"id,omitempty"` + // Filter specifies a query to select an OpenStack server group. If provided, it cannot be empty. + Filter *ServerGroupFilterApplyConfiguration `json:"filter,omitempty"` +} + +// ServerGroupParamApplyConfiguration constructs a declarative configuration of the ServerGroupParam type for use with +// apply. +func ServerGroupParam() *ServerGroupParamApplyConfiguration { + return &ServerGroupParamApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *ServerGroupParamApplyConfiguration) WithID(value string) *ServerGroupParamApplyConfiguration { + b.ID = &value + return b +} + +// WithFilter sets the Filter field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Filter field is set to the value of the last call. +func (b *ServerGroupParamApplyConfiguration) WithFilter(value *ServerGroupFilterApplyConfiguration) *ServerGroupParamApplyConfiguration { + b.Filter = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/servermetadata.go b/pkg/generated/applyconfiguration/api/v1beta2/servermetadata.go new file mode 100644 index 000000000..e2c46f0af --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/servermetadata.go @@ -0,0 +1,50 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ServerMetadataApplyConfiguration represents a declarative configuration of the ServerMetadata type for use +// with apply. +type ServerMetadataApplyConfiguration struct { + // Key is the server metadata key + Key *string `json:"key,omitempty"` + // Value is the server metadata value + Value *string `json:"value,omitempty"` +} + +// ServerMetadataApplyConfiguration constructs a declarative configuration of the ServerMetadata type for use with +// apply. +func ServerMetadata() *ServerMetadataApplyConfiguration { + return &ServerMetadataApplyConfiguration{} +} + +// WithKey sets the Key field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Key field is set to the value of the last call. +func (b *ServerMetadataApplyConfiguration) WithKey(value string) *ServerMetadataApplyConfiguration { + b.Key = &value + return b +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *ServerMetadataApplyConfiguration) WithValue(value string) *ServerMetadataApplyConfiguration { + b.Value = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/subnet.go b/pkg/generated/applyconfiguration/api/v1beta2/subnet.go new file mode 100644 index 000000000..4d9f498f3 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/subnet.go @@ -0,0 +1,70 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// SubnetApplyConfiguration represents a declarative configuration of the Subnet type for use +// with apply. +// +// Subnet represents basic information about the associated OpenStack Neutron Subnet. +type SubnetApplyConfiguration struct { + Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + CIDR *string `json:"cidr,omitempty"` + Tags []string `json:"tags,omitempty"` +} + +// SubnetApplyConfiguration constructs a declarative configuration of the Subnet type for use with +// apply. +func Subnet() *SubnetApplyConfiguration { + return &SubnetApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SubnetApplyConfiguration) WithName(value string) *SubnetApplyConfiguration { + b.Name = &value + return b +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *SubnetApplyConfiguration) WithID(value string) *SubnetApplyConfiguration { + b.ID = &value + return b +} + +// WithCIDR sets the CIDR field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CIDR field is set to the value of the last call. +func (b *SubnetApplyConfiguration) WithCIDR(value string) *SubnetApplyConfiguration { + b.CIDR = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *SubnetApplyConfiguration) WithTags(values ...string) *SubnetApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/subnetfilter.go b/pkg/generated/applyconfiguration/api/v1beta2/subnetfilter.go new file mode 100644 index 000000000..68beede2c --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/subnetfilter.go @@ -0,0 +1,149 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// SubnetFilterApplyConfiguration represents a declarative configuration of the SubnetFilter type for use +// with apply. +// +// SubnetFilter specifies a filter to select a subnet. At least one parameter must be specified. +type SubnetFilterApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ProjectID *string `json:"projectID,omitempty"` + IPVersion *int `json:"ipVersion,omitempty"` + GatewayIP *string `json:"gatewayIP,omitempty"` + CIDR *string `json:"cidr,omitempty"` + IPv6AddressMode *string `json:"ipv6AddressMode,omitempty"` + IPv6RAMode *string `json:"ipv6RAMode,omitempty"` + FilterByNeutronTagsApplyConfiguration `json:",inline"` +} + +// SubnetFilterApplyConfiguration constructs a declarative configuration of the SubnetFilter type for use with +// apply. +func SubnetFilter() *SubnetFilterApplyConfiguration { + return &SubnetFilterApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithName(value string) *SubnetFilterApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithDescription(value string) *SubnetFilterApplyConfiguration { + b.Description = &value + return b +} + +// WithProjectID sets the ProjectID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ProjectID field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithProjectID(value string) *SubnetFilterApplyConfiguration { + b.ProjectID = &value + return b +} + +// WithIPVersion sets the IPVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPVersion field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithIPVersion(value int) *SubnetFilterApplyConfiguration { + b.IPVersion = &value + return b +} + +// WithGatewayIP sets the GatewayIP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GatewayIP field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithGatewayIP(value string) *SubnetFilterApplyConfiguration { + b.GatewayIP = &value + return b +} + +// WithCIDR sets the CIDR field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CIDR field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithCIDR(value string) *SubnetFilterApplyConfiguration { + b.CIDR = &value + return b +} + +// WithIPv6AddressMode sets the IPv6AddressMode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPv6AddressMode field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithIPv6AddressMode(value string) *SubnetFilterApplyConfiguration { + b.IPv6AddressMode = &value + return b +} + +// WithIPv6RAMode sets the IPv6RAMode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPv6RAMode field is set to the value of the last call. +func (b *SubnetFilterApplyConfiguration) WithIPv6RAMode(value string) *SubnetFilterApplyConfiguration { + b.IPv6RAMode = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *SubnetFilterApplyConfiguration) WithTags(values ...apiv1beta2.NeutronTag) *SubnetFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.Tags = append(b.FilterByNeutronTagsApplyConfiguration.Tags, values[i]) + } + return b +} + +// WithTagsAny adds the given value to the TagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TagsAny field. +func (b *SubnetFilterApplyConfiguration) WithTagsAny(values ...apiv1beta2.NeutronTag) *SubnetFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.TagsAny = append(b.FilterByNeutronTagsApplyConfiguration.TagsAny, values[i]) + } + return b +} + +// WithNotTags adds the given value to the NotTags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTags field. +func (b *SubnetFilterApplyConfiguration) WithNotTags(values ...apiv1beta2.NeutronTag) *SubnetFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTags = append(b.FilterByNeutronTagsApplyConfiguration.NotTags, values[i]) + } + return b +} + +// WithNotTagsAny adds the given value to the NotTagsAny field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NotTagsAny field. +func (b *SubnetFilterApplyConfiguration) WithNotTagsAny(values ...apiv1beta2.NeutronTag) *SubnetFilterApplyConfiguration { + for i := range values { + b.FilterByNeutronTagsApplyConfiguration.NotTagsAny = append(b.FilterByNeutronTagsApplyConfiguration.NotTagsAny, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/subnetparam.go b/pkg/generated/applyconfiguration/api/v1beta2/subnetparam.go new file mode 100644 index 000000000..9cf1d93c3 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/subnetparam.go @@ -0,0 +1,52 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// SubnetParamApplyConfiguration represents a declarative configuration of the SubnetParam type for use +// with apply. +// +// SubnetParam specifies an OpenStack subnet to use. It may be specified by either ID or filter, but not both. +type SubnetParamApplyConfiguration struct { + // ID is the uuid of the subnet. It will not be validated. + ID *string `json:"id,omitempty"` + // Filter specifies a filter to select the subnet. It must match exactly one subnet. + Filter *SubnetFilterApplyConfiguration `json:"filter,omitempty"` +} + +// SubnetParamApplyConfiguration constructs a declarative configuration of the SubnetParam type for use with +// apply. +func SubnetParam() *SubnetParamApplyConfiguration { + return &SubnetParamApplyConfiguration{} +} + +// WithID sets the ID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ID field is set to the value of the last call. +func (b *SubnetParamApplyConfiguration) WithID(value string) *SubnetParamApplyConfiguration { + b.ID = &value + return b +} + +// WithFilter sets the Filter field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Filter field is set to the value of the last call. +func (b *SubnetParamApplyConfiguration) WithFilter(value *SubnetFilterApplyConfiguration) *SubnetParamApplyConfiguration { + b.Filter = value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/subnetspec.go b/pkg/generated/applyconfiguration/api/v1beta2/subnetspec.go new file mode 100644 index 000000000..4556feedc --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/subnetspec.go @@ -0,0 +1,71 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// SubnetSpecApplyConfiguration represents a declarative configuration of the SubnetSpec type for use +// with apply. +type SubnetSpecApplyConfiguration struct { + // CIDR is representing the IP address range used to create the subnet, e.g. 10.0.0.0/24. + // This field is required when defining a subnet. + CIDR *string `json:"cidr,omitempty"` + // DNSNameservers holds a list of DNS server addresses that will be provided when creating + // the subnet. These addresses need to have the same IP version as CIDR. + DNSNameservers []string `json:"dnsNameservers,omitempty"` + // AllocationPools is an array of AllocationPool objects that will be applied to OpenStack Subnet being created. + // If set, OpenStack will only allocate these IPs for Machines. It will still be possible to create ports from + // outside of these ranges manually. + AllocationPools []AllocationPoolApplyConfiguration `json:"allocationPools,omitempty"` +} + +// SubnetSpecApplyConfiguration constructs a declarative configuration of the SubnetSpec type for use with +// apply. +func SubnetSpec() *SubnetSpecApplyConfiguration { + return &SubnetSpecApplyConfiguration{} +} + +// WithCIDR sets the CIDR field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CIDR field is set to the value of the last call. +func (b *SubnetSpecApplyConfiguration) WithCIDR(value string) *SubnetSpecApplyConfiguration { + b.CIDR = &value + return b +} + +// WithDNSNameservers adds the given value to the DNSNameservers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the DNSNameservers field. +func (b *SubnetSpecApplyConfiguration) WithDNSNameservers(values ...string) *SubnetSpecApplyConfiguration { + for i := range values { + b.DNSNameservers = append(b.DNSNameservers, values[i]) + } + return b +} + +// WithAllocationPools adds the given value to the AllocationPools field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AllocationPools field. +func (b *SubnetSpecApplyConfiguration) WithAllocationPools(values ...*AllocationPoolApplyConfiguration) *SubnetSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAllocationPools") + } + b.AllocationPools = append(b.AllocationPools, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/valuespec.go b/pkg/generated/applyconfiguration/api/v1beta2/valuespec.go new file mode 100644 index 000000000..654eff0a8 --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/valuespec.go @@ -0,0 +1,63 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +// ValueSpecApplyConfiguration represents a declarative configuration of the ValueSpec type for use +// with apply. +// +// ValueSpec represents a single value_spec key-value pair. +type ValueSpecApplyConfiguration struct { + // Name is the name of the key-value pair. + // This is just for identifying the pair and will not be sent to the OpenStack API. + Name *string `json:"name,omitempty"` + // Key is the key in the key-value pair. + Key *string `json:"key,omitempty"` + // Value is the value in the key-value pair. + Value *string `json:"value,omitempty"` +} + +// ValueSpecApplyConfiguration constructs a declarative configuration of the ValueSpec type for use with +// apply. +func ValueSpec() *ValueSpecApplyConfiguration { + return &ValueSpecApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ValueSpecApplyConfiguration) WithName(value string) *ValueSpecApplyConfiguration { + b.Name = &value + return b +} + +// WithKey sets the Key field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Key field is set to the value of the last call. +func (b *ValueSpecApplyConfiguration) WithKey(value string) *ValueSpecApplyConfiguration { + b.Key = &value + return b +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *ValueSpecApplyConfiguration) WithValue(value string) *ValueSpecApplyConfiguration { + b.Value = &value + return b +} diff --git a/pkg/generated/applyconfiguration/api/v1beta2/volumeavailabilityzone.go b/pkg/generated/applyconfiguration/api/v1beta2/volumeavailabilityzone.go new file mode 100644 index 000000000..a0a095b6c --- /dev/null +++ b/pkg/generated/applyconfiguration/api/v1beta2/volumeavailabilityzone.go @@ -0,0 +1,62 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta2 + +import ( + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// VolumeAvailabilityZoneApplyConfiguration represents a declarative configuration of the VolumeAvailabilityZone type for use +// with apply. +// +// VolumeAvailabilityZone specifies the availability zone for a volume. +type VolumeAvailabilityZoneApplyConfiguration struct { + // From specifies where we will obtain the availability zone for the + // volume. The options are "Name" and "Machine". If "Name" is specified + // then the Name field must also be specified. If "Machine" is specified + // the volume will use the value of FailureDomain, if any, from the + // associated Machine. + From *apiv1beta2.VolumeAZSource `json:"from,omitempty"` + // Name is the name of a volume availability zone to use. It is required + // if From is "Name". The volume availability zone name may not contain + // spaces. + Name *apiv1beta2.VolumeAZName `json:"name,omitempty"` +} + +// VolumeAvailabilityZoneApplyConfiguration constructs a declarative configuration of the VolumeAvailabilityZone type for use with +// apply. +func VolumeAvailabilityZone() *VolumeAvailabilityZoneApplyConfiguration { + return &VolumeAvailabilityZoneApplyConfiguration{} +} + +// WithFrom sets the From field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the From field is set to the value of the last call. +func (b *VolumeAvailabilityZoneApplyConfiguration) WithFrom(value apiv1beta2.VolumeAZSource) *VolumeAvailabilityZoneApplyConfiguration { + b.From = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *VolumeAvailabilityZoneApplyConfiguration) WithName(value apiv1beta2.VolumeAZName) *VolumeAvailabilityZoneApplyConfiguration { + b.Name = &value + return b +} diff --git a/pkg/generated/applyconfiguration/internal/internal.go b/pkg/generated/applyconfiguration/internal/internal.go index b11934fa5..c5043c74e 100644 --- a/pkg/generated/applyconfiguration/internal/internal.go +++ b/pkg/generated/applyconfiguration/internal/internal.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import ( fmt "fmt" sync "sync" - typed "sigs.k8s.io/structured-merge-diff/v4/typed" + typed "sigs.k8s.io/structured-merge-diff/v6/typed" ) func Parser() *typed.Parser { @@ -39,41 +39,32 @@ func Parser() *typed.Parser { var parserOnce sync.Once var parser *typed.Parser var schemaYAML = typed.YAMLObject(`types: -- name: io.k8s.api.core.v1.LocalObjectReference +- name: Condition.v1.meta.apis.pkg.apimachinery.k8s.io map: fields: - - name: name + - name: lastTransitionTime type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.NodeAddress - map: - fields: - - name: address + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io + - name: message type: scalar: string default: "" - - name: type + - name: observedGeneration type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.TypedLocalObjectReference - map: - fields: - - name: apiGroup + scalar: numeric + - name: reason type: scalar: string - - name: kind + default: "" + - name: status type: scalar: string default: "" - - name: name + - name: type type: scalar: string default: "" - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 +- name: FieldsV1.v1.meta.apis.pkg.apimachinery.k8s.io map: elementType: scalar: untyped @@ -85,14 +76,14 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: __untyped_deduced_ elementRelationship: separable -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: LabelSelector.v1.meta.apis.pkg.apimachinery.k8s.io map: fields: - name: matchExpressions type: list: elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement + namedType: LabelSelectorRequirement.v1.meta.apis.pkg.apimachinery.k8s.io elementRelationship: atomic - name: matchLabels type: @@ -100,7 +91,7 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement +- name: LabelSelectorRequirement.v1.meta.apis.pkg.apimachinery.k8s.io map: fields: - name: key @@ -117,7 +108,15 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry +- name: LocalObjectReference.v1.core.api.k8s.io + map: + fields: + - name: name + type: + scalar: string + default: "" + elementRelationship: atomic +- name: ManagedFieldsEntry.v1.meta.apis.pkg.apimachinery.k8s.io map: fields: - name: apiVersion @@ -128,7 +127,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: fieldsV1 type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 + namedType: FieldsV1.v1.meta.apis.pkg.apimachinery.k8s.io - name: manager type: scalar: string @@ -140,8 +139,19 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: time type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io +- name: NodeAddress.v1.core.api.k8s.io + map: + fields: + - name: address + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io map: fields: - name: annotations @@ -151,13 +161,13 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: creationTimestamp type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io - name: deletionGracePeriodSeconds type: scalar: numeric - name: deletionTimestamp type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io - name: finalizers type: list: @@ -179,7 +189,7 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry + namedType: ManagedFieldsEntry.v1.meta.apis.pkg.apimachinery.k8s.io elementRelationship: atomic - name: name type: @@ -191,7 +201,7 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference + namedType: OwnerReference.v1.meta.apis.pkg.apimachinery.k8s.io elementRelationship: associative keys: - uid @@ -204,7 +214,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: uid type: scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference +- name: OwnerReference.v1.meta.apis.pkg.apimachinery.k8s.io map: fields: - name: apiVersion @@ -230,8 +240,25 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string default: "" elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Time +- name: Quantity.resource.api.pkg.apimachinery.k8s.io + scalar: string +- name: Time.v1.meta.apis.pkg.apimachinery.k8s.io scalar: untyped +- name: TypedLocalObjectReference.v1.core.api.k8s.io + map: + fields: + - name: apiGroup + type: + scalar: string + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + elementRelationship: atomic - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1alpha1.OpenStackClusterIdentity map: fields: @@ -243,7 +270,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: metadata type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io default: {} - name: spec type: @@ -254,7 +281,7 @@ var schemaYAML = typed.YAMLObject(`types: fields: - name: namespaceSelector type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + namedType: LabelSelector.v1.meta.apis.pkg.apimachinery.k8s.io - name: secretRef type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1alpha1.OpenStackCredentialSecretReference @@ -281,7 +308,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: metadata type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io default: {} - name: spec type: @@ -298,7 +325,7 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.AdditionalBlockDevice + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AdditionalBlockDevice elementRelationship: associative keys: - name @@ -316,29 +343,29 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: floatingIPPoolRef type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference + namedType: TypedLocalObjectReference.v1.core.api.k8s.io - name: identityRef type: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackIdentityReference + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackIdentityReference default: {} - name: image type: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.ImageParam + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ImageParam default: {} - name: ports type: list: elementType: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.PortOpts + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.PortOpts elementRelationship: atomic - name: rootVolume type: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.RootVolume + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RootVolume - name: schedulerHintAdditionalProperties type: list: elementType: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.SchedulerHintAdditionalProperty + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SchedulerHintAdditionalProperty elementRelationship: associative keys: - name @@ -346,16 +373,16 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.SecurityGroupParam + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupParam elementRelationship: atomic - name: serverGroup type: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.ServerGroupParam + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerGroupParam - name: serverMetadata type: list: elementType: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.ServerMetadata + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerMetadata elementRelationship: associative keys: - key @@ -374,7 +401,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: boolean - name: userDataRef type: - namedType: io.k8s.api.core.v1.LocalObjectReference + namedType: LocalObjectReference.v1.core.api.k8s.io - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1alpha1.OpenStackServerStatus map: fields: @@ -382,13 +409,13 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.core.v1.NodeAddress + namedType: NodeAddress.v1.core.api.k8s.io elementRelationship: atomic - name: conditions type: list: elementType: - namedType: io.k8s.sigs.cluster-api.api.core.v1beta1.Condition + namedType: Condition.v1.meta.apis.pkg.apimachinery.k8s.io elementRelationship: atomic - name: instanceID type: @@ -419,7 +446,7 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.ResolvedPortSpec + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedPortSpec elementRelationship: atomic - name: serverGroupID type: @@ -431,7 +458,7 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.PortStatus + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.PortStatus elementRelationship: atomic - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.APIServerLoadBalancer map: @@ -598,6 +625,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: type type: scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.ClusterInitialization + map: + fields: + - name: provisioned + type: + scalar: boolean - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.ExternalRouterIPParam map: fields: @@ -675,6 +708,12 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.MachineInitialization + map: + fields: + - name: provisioned + type: + scalar: boolean - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.MachineResources map: fields: @@ -800,6 +839,12 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.NodeInfo + map: + fields: + - name: operatingSystem + type: + scalar: string - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackCluster map: fields: @@ -811,7 +856,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: metadata type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io default: {} - name: spec type: @@ -915,6 +960,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: bastionSecurityGroup type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.SecurityGroupStatus + - name: conditions + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api.api.core.v1beta1.Condition + elementRelationship: atomic - name: controlPlaneSecurityGroup type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.SecurityGroupStatus @@ -932,6 +983,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: failureReason type: scalar: string + - name: initialization + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.ClusterInitialization - name: network type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.NetworkStatusWithSubnets @@ -956,7 +1010,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: metadata type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io default: {} - name: spec type: @@ -1004,7 +1058,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: metadata type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io default: {} - name: spec type: @@ -1036,7 +1090,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: floatingIPPoolRef type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference + namedType: TypedLocalObjectReference.v1.core.api.k8s.io - name: identityRef type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackIdentityReference @@ -1100,7 +1154,7 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.core.v1.NodeAddress + namedType: NodeAddress.v1.core.api.k8s.io elementRelationship: atomic - name: conditions type: @@ -1114,6 +1168,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: failureReason type: scalar: string + - name: initialization + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.MachineInitialization - name: instanceID type: scalar: string @@ -1141,12 +1198,16 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: metadata type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io default: {} - name: spec type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachineTemplateSpec default: {} + - name: status + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachineTemplateStatus + default: {} - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachineTemplateResource map: fields: @@ -1161,6 +1222,24 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachineTemplateResource default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.OpenStackMachineTemplateStatus + map: + fields: + - name: capacity + type: + map: + elementType: + namedType: Quantity.resource.api.pkg.apimachinery.k8s.io + - name: conditions + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api.api.core.v1beta1.Condition + elementRelationship: atomic + - name: nodeInfo + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.NodeInfo + default: {} - name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta1.PortOpts map: fields: @@ -1693,51 +1772,1367 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string -- name: io.k8s.sigs.cluster-api.api.core.v1beta1.APIEndpoint +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.APIServerLoadBalancer map: fields: - - name: host + - name: additionalPorts + type: + list: + elementType: + scalar: numeric + elementRelationship: associative + - name: allowedCIDRs + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: availabilityZone + type: + scalar: string + - name: enabled + type: + scalar: boolean + - name: flavor + type: + scalar: string + - name: monitor + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.APIServerLoadBalancerMonitor + - name: network + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkParam + - name: provider + type: + scalar: string + - name: subnets + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetParam + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.APIServerLoadBalancerMonitor + map: + fields: + - name: delay + type: + scalar: numeric + - name: maxRetries + type: + scalar: numeric + - name: maxRetriesDown + type: + scalar: numeric + - name: timeout + type: + scalar: numeric +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AdditionalBlockDevice + map: + fields: + - name: name type: scalar: string default: "" - - name: port + - name: sizeGiB type: scalar: numeric default: 0 -- name: io.k8s.sigs.cluster-api.api.core.v1beta1.Condition + - name: storage + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BlockDeviceStorage + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AddressPair map: fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message + - name: ipAddress type: scalar: string - - name: reason + default: "" + - name: macAddress type: scalar: string - - name: severity +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AllocationPool + map: + fields: + - name: end type: scalar: string - - name: status + default: "" + - name: start type: scalar: string default: "" +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.Bastion + map: + fields: + - name: availabilityZone + type: + scalar: string + - name: enabled + type: + scalar: boolean + - name: floatingIP + type: + scalar: string + - name: spec + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineSpec +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BastionStatus + map: + fields: + - name: floatingIP + type: + scalar: string + - name: id + type: + scalar: string + - name: ip + type: + scalar: string + - name: name + type: + scalar: string + - name: resolved + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedMachineSpec + - name: resources + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.MachineResources + - name: sshKeyName + type: + scalar: string + - name: state + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BindingProfile + map: + fields: + - name: ovsHWOffload + type: + scalar: boolean + - name: trustedVF + type: + scalar: boolean +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BlockDeviceStorage + map: + fields: - name: type type: scalar: string default: "" -- name: io.k8s.sigs.cluster-api.api.core.v1beta1.FailureDomainSpec + - name: volume + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BlockDeviceVolume + unions: + - discriminator: type + fields: + - fieldName: volume + discriminatorValue: Volume +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BlockDeviceVolume map: fields: - - name: attributes + - name: availabilityZone type: - map: - elementType: - scalar: string - - name: controlPlane + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.VolumeAvailabilityZone + - name: type + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ClusterInitialization + map: + fields: + - name: provisioned type: scalar: boolean +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ExternalRouterIPParam + map: + fields: + - name: fixedIP + type: + scalar: string + - name: subnet + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetParam + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.FixedIP + map: + fields: + - name: ipAddress + type: + scalar: string + - name: subnet + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetParam +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ImageFilter + map: + fields: + - name: name + type: + scalar: string + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ImageParam + map: + fields: + - name: filter + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ImageFilter + - name: id + type: + scalar: string + - name: imageRef + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResourceReference +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.LoadBalancer + map: + fields: + - name: allowedCIDRs + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: id + type: + scalar: string + default: "" + - name: internalIP + type: + scalar: string + default: "" + - name: ip + type: + scalar: string + default: "" + - name: loadBalancerNetwork + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkStatusWithSubnets + - name: name + type: + scalar: string + default: "" + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.MachineInitialization + map: + fields: + - name: provisioned + type: + scalar: boolean +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.MachineResources + map: + fields: + - name: ports + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.PortStatus + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ManagedSecurityGroups + map: + fields: + - name: allNodesSecurityGroupRules + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupRuleSpec + elementRelationship: associative + keys: + - name + - name: allowAllInClusterTraffic + type: + scalar: boolean + default: false + - name: controlPlaneNodesSecurityGroupRules + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupRuleSpec + elementRelationship: associative + keys: + - name + - name: workerNodesSecurityGroupRules + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupRuleSpec + elementRelationship: associative + keys: + - name +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkFilter + map: + fields: + - name: description + type: + scalar: string + - name: name + type: + scalar: string + - name: notTags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: notTagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: projectID + type: + scalar: string + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: tagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkParam + map: + fields: + - name: filter + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkFilter + - name: id + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkStatus + map: + fields: + - name: id + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkStatusWithSubnets + map: + fields: + - name: id + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: subnets + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.Subnet + elementRelationship: atomic + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NodeInfo + map: + fields: + - name: operatingSystem + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackCluster + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterSpec + default: {} + - name: status + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterStatus + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterSpec + map: + fields: + - name: apiServerFixedIP + type: + scalar: string + - name: apiServerFloatingIP + type: + scalar: string + - name: apiServerLoadBalancer + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.APIServerLoadBalancer + - name: apiServerPort + type: + scalar: numeric + - name: bastion + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.Bastion + - name: controlPlaneAvailabilityZones + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: controlPlaneEndpoint + type: + namedType: io.k8s.sigs.cluster-api.api.core.v1beta2.APIEndpoint + - name: controlPlaneOmitAvailabilityZone + type: + scalar: boolean + - name: disableAPIServerFloatingIP + type: + scalar: boolean + - name: disableExternalNetwork + type: + scalar: boolean + - name: disablePortSecurity + type: + scalar: boolean + - name: externalNetwork + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkParam + - name: externalRouterIPs + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ExternalRouterIPParam + elementRelationship: atomic + - name: identityRef + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackIdentityReference + default: {} + - name: managedSecurityGroups + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ManagedSecurityGroups + - name: managedSubnets + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetSpec + elementRelationship: atomic + - name: network + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkParam + - name: networkMTU + type: + scalar: numeric + - name: router + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RouterParam + - name: subnets + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetParam + elementRelationship: atomic + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterStatus + map: + fields: + - name: apiServerLoadBalancer + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.LoadBalancer + - name: bastion + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BastionStatus + - name: bastionSecurityGroup + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupStatus + - name: conditions + type: + list: + elementType: + namedType: Condition.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: atomic + - name: controlPlaneSecurityGroup + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupStatus + - name: externalNetwork + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkStatus + - name: failureDomains + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api.api.core.v1beta2.FailureDomain + elementRelationship: atomic + - name: initialization + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ClusterInitialization + - name: network + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkStatusWithSubnets + - name: router + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.Router + - name: workerSecurityGroup + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupStatus +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterTemplate + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterTemplateSpec + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterTemplateResource + map: + fields: + - name: spec + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterSpec + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterTemplateSpec + map: + fields: + - name: template + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackClusterTemplateResource + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackIdentityReference + map: + fields: + - name: cloudName + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: region + type: + scalar: string + - name: type + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachine + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineSpec + default: {} + - name: status + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineStatus + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineSpec + map: + fields: + - name: additionalBlockDevices + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AdditionalBlockDevice + elementRelationship: associative + keys: + - name + - name: configDrive + type: + scalar: boolean + - name: flavor + type: + scalar: string + - name: flavorID + type: + scalar: string + - name: floatingIPPoolRef + type: + namedType: TypedLocalObjectReference.v1.core.api.k8s.io + - name: identityRef + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackIdentityReference + - name: image + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ImageParam + default: {} + - name: ports + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.PortOpts + elementRelationship: atomic + - name: providerID + type: + scalar: string + - name: rootVolume + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RootVolume + - name: schedulerHintAdditionalProperties + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SchedulerHintAdditionalProperty + elementRelationship: associative + keys: + - name + - name: securityGroups + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupParam + elementRelationship: atomic + - name: serverGroup + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerGroupParam + - name: serverMetadata + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerMetadata + elementRelationship: associative + keys: + - key + - name: sshKeyName + type: + scalar: string + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: trunk + type: + scalar: boolean +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineStatus + map: + fields: + - name: addresses + type: + list: + elementType: + namedType: NodeAddress.v1.core.api.k8s.io + elementRelationship: atomic + - name: conditions + type: + list: + elementType: + namedType: Condition.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: atomic + - name: initialization + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.MachineInitialization + - name: instanceID + type: + scalar: string + - name: instanceState + type: + scalar: string + - name: resolved + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedMachineSpec + - name: resources + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.MachineResources +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplate + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplateSpec + default: {} + - name: status + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplateStatus + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplateResource + map: + fields: + - name: spec + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineSpec + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplateSpec + map: + fields: + - name: template + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplateResource + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.OpenStackMachineTemplateStatus + map: + fields: + - name: capacity + type: + map: + elementType: + namedType: Quantity.resource.api.pkg.apimachinery.k8s.io + - name: conditions + type: + list: + elementType: + namedType: Condition.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: atomic + - name: nodeInfo + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NodeInfo + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.PortOpts + map: + fields: + - name: adminStateUp + type: + scalar: boolean + - name: allowedAddressPairs + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AddressPair + elementRelationship: atomic + - name: description + type: + scalar: string + - name: disablePortSecurity + type: + scalar: boolean + - name: fixedIPs + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.FixedIP + elementRelationship: atomic + - name: hostID + type: + scalar: string + - name: macAddress + type: + scalar: string + - name: nameSuffix + type: + scalar: string + - name: network + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.NetworkParam + - name: profile + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BindingProfile + - name: propagateUplinkStatus + type: + scalar: boolean + - name: securityGroups + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupParam + elementRelationship: atomic + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: trunk + type: + scalar: boolean + - name: valueSpecs + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ValueSpec + elementRelationship: associative + keys: + - name + - name: vnicType + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.PortStatus + map: + fields: + - name: id + type: + scalar: string + default: "" +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedFixedIP + map: + fields: + - name: ipAddress + type: + scalar: string + - name: subnet + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedMachineSpec + map: + fields: + - name: flavorID + type: + scalar: string + - name: imageID + type: + scalar: string + - name: ports + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedPortSpec + elementRelationship: atomic + - name: serverGroupID + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedPortSpec + map: + fields: + - name: adminStateUp + type: + scalar: boolean + - name: allowedAddressPairs + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AddressPair + elementRelationship: atomic + - name: description + type: + scalar: string + default: "" + - name: disablePortSecurity + type: + scalar: boolean + - name: fixedIPs + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResolvedFixedIP + elementRelationship: atomic + - name: hostID + type: + scalar: string + - name: macAddress + type: + scalar: string + - name: name + type: + scalar: string + default: "" + - name: networkID + type: + scalar: string + default: "" + - name: profile + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.BindingProfile + - name: propagateUplinkStatus + type: + scalar: boolean + - name: securityGroups + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: trunk + type: + scalar: boolean + - name: valueSpecs + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ValueSpec + elementRelationship: associative + keys: + - name + - name: vnicType + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ResourceReference + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RootVolume + map: + fields: + - name: availabilityZone + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.VolumeAvailabilityZone + - name: sizeGiB + type: + scalar: numeric + default: 0 + - name: type + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.Router + map: + fields: + - name: id + type: + scalar: string + default: "" + - name: ips + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: name + type: + scalar: string + default: "" + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RouterFilter + map: + fields: + - name: description + type: + scalar: string + - name: name + type: + scalar: string + - name: notTags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: notTagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: projectID + type: + scalar: string + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: tagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RouterParam + map: + fields: + - name: filter + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.RouterFilter + - name: id + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SchedulerHintAdditionalProperty + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: value + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SchedulerHintAdditionalValue + default: {} +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SchedulerHintAdditionalValue + map: + fields: + - name: bool + type: + scalar: boolean + - name: number + type: + scalar: numeric + - name: string + type: + scalar: string + - name: type + type: + scalar: string + default: "" +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupFilter + map: + fields: + - name: description + type: + scalar: string + - name: name + type: + scalar: string + - name: notTags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: notTagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: projectID + type: + scalar: string + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: tagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupParam + map: + fields: + - name: filter + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupFilter + - name: id + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupRuleSpec + map: + fields: + - name: description + type: + scalar: string + - name: direction + type: + scalar: string + default: "" + - name: etherType + type: + scalar: string + - name: name + type: + scalar: string + default: "" + - name: portRangeMax + type: + scalar: numeric + - name: portRangeMin + type: + scalar: numeric + - name: protocol + type: + scalar: string + - name: remoteGroupID + type: + scalar: string + - name: remoteIPPrefix + type: + scalar: string + - name: remoteManagedGroups + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SecurityGroupStatus + map: + fields: + - name: id + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerGroupFilter + map: + fields: + - name: name + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerGroupParam + map: + fields: + - name: filter + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerGroupFilter + - name: id + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ServerMetadata + map: + fields: + - name: key + type: + scalar: string + default: "" + - name: value + type: + scalar: string + default: "" +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.Subnet + map: + fields: + - name: cidr + type: + scalar: string + default: "" + - name: id + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetFilter + map: + fields: + - name: cidr + type: + scalar: string + - name: description + type: + scalar: string + - name: gatewayIP + type: + scalar: string + - name: ipVersion + type: + scalar: numeric + - name: ipv6AddressMode + type: + scalar: string + - name: ipv6RAMode + type: + scalar: string + - name: name + type: + scalar: string + - name: notTags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: notTagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: projectID + type: + scalar: string + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: tagsAny + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetParam + map: + fields: + - name: filter + type: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetFilter + - name: id + type: + scalar: string +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.SubnetSpec + map: + fields: + - name: allocationPools + type: + list: + elementType: + namedType: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.AllocationPool + elementRelationship: atomic + - name: cidr + type: + scalar: string + default: "" + - name: dnsNameservers + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.ValueSpec + map: + fields: + - name: key + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: value + type: + scalar: string + default: "" +- name: io.k8s.sigs.cluster-api-provider-openstack.api.v1beta2.VolumeAvailabilityZone + map: + fields: + - name: from + type: + scalar: string + - name: name + type: + scalar: string +- name: io.k8s.sigs.cluster-api.api.core.v1beta1.APIEndpoint + map: + fields: + - name: host + type: + scalar: string + default: "" + - name: port + type: + scalar: numeric + default: 0 +- name: io.k8s.sigs.cluster-api.api.core.v1beta1.Condition + map: + fields: + - name: lastTransitionTime + type: + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io + - name: message + type: + scalar: string + - name: reason + type: + scalar: string + - name: severity + type: + scalar: string + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.sigs.cluster-api.api.core.v1beta1.FailureDomainSpec + map: + fields: + - name: attributes + type: + map: + elementType: + scalar: string + - name: controlPlane + type: + scalar: boolean +- name: io.k8s.sigs.cluster-api.api.core.v1beta2.APIEndpoint + map: + fields: + - name: host + type: + scalar: string + - name: port + type: + scalar: numeric +- name: io.k8s.sigs.cluster-api.api.core.v1beta2.FailureDomain + map: + fields: + - name: attributes + type: + map: + elementType: + scalar: string + - name: controlPlane + type: + scalar: boolean + - name: name + type: + scalar: string - name: __untyped_atomic_ scalar: untyped list: diff --git a/pkg/generated/applyconfiguration/utils.go b/pkg/generated/applyconfiguration/utils.go index 494dc2afa..913ddeb93 100644 --- a/pkg/generated/applyconfiguration/utils.go +++ b/pkg/generated/applyconfiguration/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,13 @@ package applyconfiguration import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" - testing "k8s.io/client-go/testing" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" v1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" apiv1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1alpha1" apiv1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta1" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" internal "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/internal" ) @@ -72,6 +74,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apiv1beta1.BlockDeviceStorageApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("BlockDeviceVolume"): return &apiv1beta1.BlockDeviceVolumeApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("ClusterInitialization"): + return &apiv1beta1.ClusterInitializationApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ExternalRouterIPParam"): return &apiv1beta1.ExternalRouterIPParamApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("FilterByNeutronTags"): @@ -84,6 +88,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apiv1beta1.ImageParamApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("LoadBalancer"): return &apiv1beta1.LoadBalancerApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("MachineInitialization"): + return &apiv1beta1.MachineInitializationApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("MachineResources"): return &apiv1beta1.MachineResourcesApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ManagedSecurityGroups"): @@ -96,6 +102,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apiv1beta1.NetworkStatusApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("NetworkStatusWithSubnets"): return &apiv1beta1.NetworkStatusWithSubnetsApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("NodeInfo"): + return &apiv1beta1.NodeInfoApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("OpenStackCluster"): return &apiv1beta1.OpenStackClusterApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("OpenStackClusterSpec"): @@ -122,6 +130,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apiv1beta1.OpenStackMachineTemplateResourceApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("OpenStackMachineTemplateSpec"): return &apiv1beta1.OpenStackMachineTemplateSpecApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("OpenStackMachineTemplateStatus"): + return &apiv1beta1.OpenStackMachineTemplateStatusApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("PortOpts"): return &apiv1beta1.PortOptsApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("PortStatus"): @@ -175,10 +185,142 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case v1beta1.SchemeGroupVersion.WithKind("VolumeAvailabilityZone"): return &apiv1beta1.VolumeAvailabilityZoneApplyConfiguration{} + // Group=infrastructure.cluster.x-k8s.io, Version=v1beta2 + case v1beta2.SchemeGroupVersion.WithKind("AdditionalBlockDevice"): + return &apiv1beta2.AdditionalBlockDeviceApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("AddressPair"): + return &apiv1beta2.AddressPairApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("AllocationPool"): + return &apiv1beta2.AllocationPoolApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("APIServerLoadBalancer"): + return &apiv1beta2.APIServerLoadBalancerApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("APIServerLoadBalancerMonitor"): + return &apiv1beta2.APIServerLoadBalancerMonitorApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("Bastion"): + return &apiv1beta2.BastionApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("BastionStatus"): + return &apiv1beta2.BastionStatusApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("BindingProfile"): + return &apiv1beta2.BindingProfileApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("BlockDeviceStorage"): + return &apiv1beta2.BlockDeviceStorageApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("BlockDeviceVolume"): + return &apiv1beta2.BlockDeviceVolumeApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ClusterInitialization"): + return &apiv1beta2.ClusterInitializationApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ExternalRouterIPParam"): + return &apiv1beta2.ExternalRouterIPParamApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("FilterByNeutronTags"): + return &apiv1beta2.FilterByNeutronTagsApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("FixedIP"): + return &apiv1beta2.FixedIPApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ImageFilter"): + return &apiv1beta2.ImageFilterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ImageParam"): + return &apiv1beta2.ImageParamApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("LoadBalancer"): + return &apiv1beta2.LoadBalancerApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("MachineInitialization"): + return &apiv1beta2.MachineInitializationApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("MachineResources"): + return &apiv1beta2.MachineResourcesApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ManagedSecurityGroups"): + return &apiv1beta2.ManagedSecurityGroupsApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("NetworkFilter"): + return &apiv1beta2.NetworkFilterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("NetworkParam"): + return &apiv1beta2.NetworkParamApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("NetworkStatus"): + return &apiv1beta2.NetworkStatusApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("NetworkStatusWithSubnets"): + return &apiv1beta2.NetworkStatusWithSubnetsApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("NodeInfo"): + return &apiv1beta2.NodeInfoApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackCluster"): + return &apiv1beta2.OpenStackClusterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackClusterSpec"): + return &apiv1beta2.OpenStackClusterSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackClusterStatus"): + return &apiv1beta2.OpenStackClusterStatusApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackClusterTemplate"): + return &apiv1beta2.OpenStackClusterTemplateApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackClusterTemplateResource"): + return &apiv1beta2.OpenStackClusterTemplateResourceApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackClusterTemplateSpec"): + return &apiv1beta2.OpenStackClusterTemplateSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackIdentityReference"): + return &apiv1beta2.OpenStackIdentityReferenceApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackMachine"): + return &apiv1beta2.OpenStackMachineApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackMachineSpec"): + return &apiv1beta2.OpenStackMachineSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackMachineStatus"): + return &apiv1beta2.OpenStackMachineStatusApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackMachineTemplate"): + return &apiv1beta2.OpenStackMachineTemplateApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackMachineTemplateResource"): + return &apiv1beta2.OpenStackMachineTemplateResourceApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackMachineTemplateSpec"): + return &apiv1beta2.OpenStackMachineTemplateSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("OpenStackMachineTemplateStatus"): + return &apiv1beta2.OpenStackMachineTemplateStatusApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("PortOpts"): + return &apiv1beta2.PortOptsApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("PortStatus"): + return &apiv1beta2.PortStatusApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ResolvedFixedIP"): + return &apiv1beta2.ResolvedFixedIPApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ResolvedMachineSpec"): + return &apiv1beta2.ResolvedMachineSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ResolvedPortSpec"): + return &apiv1beta2.ResolvedPortSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ResolvedPortSpecFields"): + return &apiv1beta2.ResolvedPortSpecFieldsApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ResourceReference"): + return &apiv1beta2.ResourceReferenceApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("RootVolume"): + return &apiv1beta2.RootVolumeApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("Router"): + return &apiv1beta2.RouterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("RouterFilter"): + return &apiv1beta2.RouterFilterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("RouterParam"): + return &apiv1beta2.RouterParamApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SchedulerHintAdditionalProperty"): + return &apiv1beta2.SchedulerHintAdditionalPropertyApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SchedulerHintAdditionalValue"): + return &apiv1beta2.SchedulerHintAdditionalValueApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SecurityGroupFilter"): + return &apiv1beta2.SecurityGroupFilterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SecurityGroupParam"): + return &apiv1beta2.SecurityGroupParamApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SecurityGroupRuleSpec"): + return &apiv1beta2.SecurityGroupRuleSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SecurityGroupStatus"): + return &apiv1beta2.SecurityGroupStatusApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ServerGroupFilter"): + return &apiv1beta2.ServerGroupFilterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ServerGroupParam"): + return &apiv1beta2.ServerGroupParamApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ServerMetadata"): + return &apiv1beta2.ServerMetadataApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("Subnet"): + return &apiv1beta2.SubnetApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SubnetFilter"): + return &apiv1beta2.SubnetFilterApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SubnetParam"): + return &apiv1beta2.SubnetParamApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("SubnetSpec"): + return &apiv1beta2.SubnetSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("ValueSpec"): + return &apiv1beta2.ValueSpecApplyConfiguration{} + case v1beta2.SchemeGroupVersion.WithKind("VolumeAvailabilityZone"): + return &apiv1beta2.VolumeAvailabilityZoneApplyConfiguration{} + } return nil } -func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter { - return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()} +func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter { + return managedfields.NewSchemeTypeConverter(scheme, internal.Parser()) } diff --git a/pkg/generated/clientset/clientset/clientset.go b/pkg/generated/clientset/clientset/clientset.go index 7229f3c19..969b7aff4 100644 --- a/pkg/generated/clientset/clientset/clientset.go +++ b/pkg/generated/clientset/clientset/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,12 +27,14 @@ import ( flowcontrol "k8s.io/client-go/util/flowcontrol" infrastructurev1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1alpha1" infrastructurev1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta1" + infrastructurev1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2" ) type Interface interface { Discovery() discovery.DiscoveryInterface InfrastructureV1alpha1() infrastructurev1alpha1.InfrastructureV1alpha1Interface InfrastructureV1beta1() infrastructurev1beta1.InfrastructureV1beta1Interface + InfrastructureV1beta2() infrastructurev1beta2.InfrastructureV1beta2Interface } // Clientset contains the clients for groups. @@ -40,6 +42,7 @@ type Clientset struct { *discovery.DiscoveryClient infrastructureV1alpha1 *infrastructurev1alpha1.InfrastructureV1alpha1Client infrastructureV1beta1 *infrastructurev1beta1.InfrastructureV1beta1Client + infrastructureV1beta2 *infrastructurev1beta2.InfrastructureV1beta2Client } // InfrastructureV1alpha1 retrieves the InfrastructureV1alpha1Client @@ -52,6 +55,11 @@ func (c *Clientset) InfrastructureV1beta1() infrastructurev1beta1.Infrastructure return c.infrastructureV1beta1 } +// InfrastructureV1beta2 retrieves the InfrastructureV1beta2Client +func (c *Clientset) InfrastructureV1beta2() infrastructurev1beta2.InfrastructureV1beta2Interface { + return c.infrastructureV1beta2 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -104,6 +112,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.infrastructureV1beta2, err = infrastructurev1beta2.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -127,6 +139,7 @@ func New(c rest.Interface) *Clientset { var cs Clientset cs.infrastructureV1alpha1 = infrastructurev1alpha1.New(c) cs.infrastructureV1beta1 = infrastructurev1beta1.New(c) + cs.infrastructureV1beta2 = infrastructurev1beta2.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/generated/clientset/clientset/fake/clientset_generated.go b/pkg/generated/clientset/clientset/fake/clientset_generated.go index defcf12cf..d0d411d84 100644 --- a/pkg/generated/clientset/clientset/fake/clientset_generated.go +++ b/pkg/generated/clientset/clientset/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -31,16 +31,14 @@ import ( fakeinfrastructurev1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake" infrastructurev1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta1" fakeinfrastructurev1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta1/fake" + infrastructurev1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2" + fakeinfrastructurev1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2/fake" ) // NewSimpleClientset returns a clientset that will respond with the provided objects. // It's backed by a very simple object tracker that processes creates, updates and deletions as-is, // without applying any field management, validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. -// -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves -// server side apply testing. NewClientset is only available when apply configurations are generated (e.g. -// via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) for _, obj := range objects { @@ -54,8 +52,8 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() @@ -86,10 +84,25 @@ func (c *Clientset) Tracker() testing.ObjectTracker { return c.tracker } +// IsWatchListSemanticsSupported informs the reflector that this client +// doesn't support WatchList semantics. +// +// This is a synthetic method whose sole purpose is to satisfy the optional +// interface check performed by the reflector. +// Returning true signals that WatchList can NOT be used. +// No additional logic is implemented here. +func (c *Clientset) IsWatchListSemanticsUnSupported() bool { + return true +} + // NewClientset returns a clientset that will respond with the provided objects. // It's backed by a very simple object tracker that processes creates, updates and deletions as-is, // without applying any validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. +// +// Compared to NewSimpleClientset, the Clientset returned here supports field tracking and thus +// server-side apply. Beware though that support in that for CRDs is missing +// (https://github.com/kubernetes/kubernetes/issues/126850). func NewClientset(objects ...runtime.Object) *Clientset { o := testing.NewFieldManagedObjectTracker( scheme, @@ -107,8 +120,8 @@ func NewClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() @@ -136,3 +149,8 @@ func (c *Clientset) InfrastructureV1alpha1() infrastructurev1alpha1.Infrastructu func (c *Clientset) InfrastructureV1beta1() infrastructurev1beta1.InfrastructureV1beta1Interface { return &fakeinfrastructurev1beta1.FakeInfrastructureV1beta1{Fake: &c.Fake} } + +// InfrastructureV1beta2 retrieves the InfrastructureV1beta2Client +func (c *Clientset) InfrastructureV1beta2() infrastructurev1beta2.InfrastructureV1beta2Interface { + return &fakeinfrastructurev1beta2.FakeInfrastructureV1beta2{Fake: &c.Fake} +} diff --git a/pkg/generated/clientset/clientset/fake/doc.go b/pkg/generated/clientset/clientset/fake/doc.go index 593f551f4..e3fa1a30c 100644 --- a/pkg/generated/clientset/clientset/fake/doc.go +++ b/pkg/generated/clientset/clientset/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/fake/register.go b/pkg/generated/clientset/clientset/fake/register.go index e339c5b0d..76bb7f308 100644 --- a/pkg/generated/clientset/clientset/fake/register.go +++ b/pkg/generated/clientset/clientset/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" infrastructurev1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" infrastructurev1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrastructurev1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) var scheme = runtime.NewScheme() @@ -34,6 +35,7 @@ var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ infrastructurev1alpha1.AddToScheme, infrastructurev1beta1.AddToScheme, + infrastructurev1beta2.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/generated/clientset/clientset/scheme/doc.go b/pkg/generated/clientset/clientset/scheme/doc.go index 815f0a340..78f3802af 100644 --- a/pkg/generated/clientset/clientset/scheme/doc.go +++ b/pkg/generated/clientset/clientset/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/scheme/register.go b/pkg/generated/clientset/clientset/scheme/register.go index 101f18d8f..7e8d86da8 100644 --- a/pkg/generated/clientset/clientset/scheme/register.go +++ b/pkg/generated/clientset/clientset/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" infrastructurev1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" infrastructurev1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrastructurev1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) var Scheme = runtime.NewScheme() @@ -34,6 +35,7 @@ var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ infrastructurev1alpha1.AddToScheme, infrastructurev1beta1.AddToScheme, + infrastructurev1beta2.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/api_client.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/api_client.go index 788c390be..d9499dbce 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/api_client.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/api_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/doc.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/doc.go index 1dba7ff88..4dab1e3dc 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/doc.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/doc.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/doc.go index d54c6aae8..7c6f27f56 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/doc.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_api_client.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_api_client.go index 57bb4ca89..4b4b07d74 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_api_client.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_api_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackclusteridentity.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackclusteridentity.go index c7ae6ff3c..ed4e5a099 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackclusteridentity.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackclusteridentity.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackserver.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackserver.go index 102529b27..c66b36507 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackserver.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/fake/fake_openstackserver.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/generated_expansion.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/generated_expansion.go index a6b176dc0..07a5fc9a7 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/generated_expansion.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackclusteridentity.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackclusteridentity.go index 80d7788f9..a8eaf982a 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackclusteridentity.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackclusteridentity.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackserver.go b/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackserver.go index f7e4903b3..6b483faa5 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackserver.go +++ b/pkg/generated/clientset/clientset/typed/api/v1alpha1/openstackserver.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/api_client.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/api_client.go index 3153822ce..5853ca18f 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/api_client.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/api_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/doc.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/doc.go index 3375d9e57..37a558eb2 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/doc.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/doc.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/doc.go index d54c6aae8..7c6f27f56 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/doc.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_api_client.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_api_client.go index 47e8cfb26..8ee534d09 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_api_client.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_api_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackcluster.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackcluster.go index 57998865c..8e6c41b67 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackcluster.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackcluster.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackclustertemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackclustertemplate.go index 892912dcd..e4a265aac 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackclustertemplate.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackclustertemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachine.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachine.go index 3f599e3e9..218dc410d 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachine.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachine.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachinetemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachinetemplate.go index ad96111ab..7bde8ee38 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachinetemplate.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/fake/fake_openstackmachinetemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/generated_expansion.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/generated_expansion.go index b63d3b1b8..c0b774f69 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/generated_expansion.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackcluster.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackcluster.go index f149414f2..93be25ff2 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackcluster.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackcluster.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackclustertemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackclustertemplate.go index 33d4d7d78..88b9985b6 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackclustertemplate.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackclustertemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachine.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachine.go index a7403526b..6f01830ac 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachine.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachine.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachinetemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachinetemplate.go index ca49cb02a..2814ed6cf 100644 --- a/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachinetemplate.go +++ b/pkg/generated/clientset/clientset/typed/api/v1beta1/openstackmachinetemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -40,6 +40,8 @@ type OpenStackMachineTemplatesGetter interface { type OpenStackMachineTemplateInterface interface { Create(ctx context.Context, openStackMachineTemplate *apiv1beta1.OpenStackMachineTemplate, opts v1.CreateOptions) (*apiv1beta1.OpenStackMachineTemplate, error) Update(ctx context.Context, openStackMachineTemplate *apiv1beta1.OpenStackMachineTemplate, opts v1.UpdateOptions) (*apiv1beta1.OpenStackMachineTemplate, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, openStackMachineTemplate *apiv1beta1.OpenStackMachineTemplate, opts v1.UpdateOptions) (*apiv1beta1.OpenStackMachineTemplate, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error Get(ctx context.Context, name string, opts v1.GetOptions) (*apiv1beta1.OpenStackMachineTemplate, error) @@ -47,6 +49,8 @@ type OpenStackMachineTemplateInterface interface { Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiv1beta1.OpenStackMachineTemplate, err error) Apply(ctx context.Context, openStackMachineTemplate *applyconfigurationapiv1beta1.OpenStackMachineTemplateApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta1.OpenStackMachineTemplate, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, openStackMachineTemplate *applyconfigurationapiv1beta1.OpenStackMachineTemplateApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta1.OpenStackMachineTemplate, err error) OpenStackMachineTemplateExpansion } diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/api_client.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/api_client.go new file mode 100644 index 000000000..84e7ce246 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/api_client.go @@ -0,0 +1,116 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + http "net/http" + + rest "k8s.io/client-go/rest" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + scheme "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/scheme" +) + +type InfrastructureV1beta2Interface interface { + RESTClient() rest.Interface + OpenStackClustersGetter + OpenStackClusterTemplatesGetter + OpenStackMachinesGetter + OpenStackMachineTemplatesGetter +} + +// InfrastructureV1beta2Client is used to interact with features provided by the infrastructure.cluster.x-k8s.io group. +type InfrastructureV1beta2Client struct { + restClient rest.Interface +} + +func (c *InfrastructureV1beta2Client) OpenStackClusters(namespace string) OpenStackClusterInterface { + return newOpenStackClusters(c, namespace) +} + +func (c *InfrastructureV1beta2Client) OpenStackClusterTemplates(namespace string) OpenStackClusterTemplateInterface { + return newOpenStackClusterTemplates(c, namespace) +} + +func (c *InfrastructureV1beta2Client) OpenStackMachines(namespace string) OpenStackMachineInterface { + return newOpenStackMachines(c, namespace) +} + +func (c *InfrastructureV1beta2Client) OpenStackMachineTemplates(namespace string) OpenStackMachineTemplateInterface { + return newOpenStackMachineTemplates(c, namespace) +} + +// NewForConfig creates a new InfrastructureV1beta2Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*InfrastructureV1beta2Client, error) { + config := *c + setConfigDefaults(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new InfrastructureV1beta2Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*InfrastructureV1beta2Client, error) { + config := *c + setConfigDefaults(&config) + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &InfrastructureV1beta2Client{client}, nil +} + +// NewForConfigOrDie creates a new InfrastructureV1beta2Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *InfrastructureV1beta2Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new InfrastructureV1beta2Client for the given RESTClient. +func New(c rest.Interface) *InfrastructureV1beta2Client { + return &InfrastructureV1beta2Client{c} +} + +func setConfigDefaults(config *rest.Config) { + gv := apiv1beta2.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *InfrastructureV1beta2Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/doc.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/doc.go new file mode 100644 index 000000000..d17fb3404 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta2 diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/doc.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/doc.go new file mode 100644 index 000000000..7c6f27f56 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_api_client.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_api_client.go new file mode 100644 index 000000000..3e8b4e572 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_api_client.go @@ -0,0 +1,52 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2" +) + +type FakeInfrastructureV1beta2 struct { + *testing.Fake +} + +func (c *FakeInfrastructureV1beta2) OpenStackClusters(namespace string) v1beta2.OpenStackClusterInterface { + return newFakeOpenStackClusters(c, namespace) +} + +func (c *FakeInfrastructureV1beta2) OpenStackClusterTemplates(namespace string) v1beta2.OpenStackClusterTemplateInterface { + return newFakeOpenStackClusterTemplates(c, namespace) +} + +func (c *FakeInfrastructureV1beta2) OpenStackMachines(namespace string) v1beta2.OpenStackMachineInterface { + return newFakeOpenStackMachines(c, namespace) +} + +func (c *FakeInfrastructureV1beta2) OpenStackMachineTemplates(namespace string) v1beta2.OpenStackMachineTemplateInterface { + return newFakeOpenStackMachineTemplates(c, namespace) +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeInfrastructureV1beta2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackcluster.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackcluster.go new file mode 100644 index 000000000..c56057286 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackcluster.go @@ -0,0 +1,53 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + gentype "k8s.io/client-go/gentype" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + typedapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2" +) + +// fakeOpenStackClusters implements OpenStackClusterInterface +type fakeOpenStackClusters struct { + *gentype.FakeClientWithListAndApply[*v1beta2.OpenStackCluster, *v1beta2.OpenStackClusterList, *apiv1beta2.OpenStackClusterApplyConfiguration] + Fake *FakeInfrastructureV1beta2 +} + +func newFakeOpenStackClusters(fake *FakeInfrastructureV1beta2, namespace string) typedapiv1beta2.OpenStackClusterInterface { + return &fakeOpenStackClusters{ + gentype.NewFakeClientWithListAndApply[*v1beta2.OpenStackCluster, *v1beta2.OpenStackClusterList, *apiv1beta2.OpenStackClusterApplyConfiguration]( + fake.Fake, + namespace, + v1beta2.SchemeGroupVersion.WithResource("openstackclusters"), + v1beta2.SchemeGroupVersion.WithKind("OpenStackCluster"), + func() *v1beta2.OpenStackCluster { return &v1beta2.OpenStackCluster{} }, + func() *v1beta2.OpenStackClusterList { return &v1beta2.OpenStackClusterList{} }, + func(dst, src *v1beta2.OpenStackClusterList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta2.OpenStackClusterList) []*v1beta2.OpenStackCluster { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta2.OpenStackClusterList, items []*v1beta2.OpenStackCluster) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackclustertemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackclustertemplate.go new file mode 100644 index 000000000..a10683a55 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackclustertemplate.go @@ -0,0 +1,53 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + gentype "k8s.io/client-go/gentype" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + typedapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2" +) + +// fakeOpenStackClusterTemplates implements OpenStackClusterTemplateInterface +type fakeOpenStackClusterTemplates struct { + *gentype.FakeClientWithListAndApply[*v1beta2.OpenStackClusterTemplate, *v1beta2.OpenStackClusterTemplateList, *apiv1beta2.OpenStackClusterTemplateApplyConfiguration] + Fake *FakeInfrastructureV1beta2 +} + +func newFakeOpenStackClusterTemplates(fake *FakeInfrastructureV1beta2, namespace string) typedapiv1beta2.OpenStackClusterTemplateInterface { + return &fakeOpenStackClusterTemplates{ + gentype.NewFakeClientWithListAndApply[*v1beta2.OpenStackClusterTemplate, *v1beta2.OpenStackClusterTemplateList, *apiv1beta2.OpenStackClusterTemplateApplyConfiguration]( + fake.Fake, + namespace, + v1beta2.SchemeGroupVersion.WithResource("openstackclustertemplates"), + v1beta2.SchemeGroupVersion.WithKind("OpenStackClusterTemplate"), + func() *v1beta2.OpenStackClusterTemplate { return &v1beta2.OpenStackClusterTemplate{} }, + func() *v1beta2.OpenStackClusterTemplateList { return &v1beta2.OpenStackClusterTemplateList{} }, + func(dst, src *v1beta2.OpenStackClusterTemplateList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta2.OpenStackClusterTemplateList) []*v1beta2.OpenStackClusterTemplate { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta2.OpenStackClusterTemplateList, items []*v1beta2.OpenStackClusterTemplate) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackmachine.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackmachine.go new file mode 100644 index 000000000..304f57e0b --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackmachine.go @@ -0,0 +1,53 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + gentype "k8s.io/client-go/gentype" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + typedapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2" +) + +// fakeOpenStackMachines implements OpenStackMachineInterface +type fakeOpenStackMachines struct { + *gentype.FakeClientWithListAndApply[*v1beta2.OpenStackMachine, *v1beta2.OpenStackMachineList, *apiv1beta2.OpenStackMachineApplyConfiguration] + Fake *FakeInfrastructureV1beta2 +} + +func newFakeOpenStackMachines(fake *FakeInfrastructureV1beta2, namespace string) typedapiv1beta2.OpenStackMachineInterface { + return &fakeOpenStackMachines{ + gentype.NewFakeClientWithListAndApply[*v1beta2.OpenStackMachine, *v1beta2.OpenStackMachineList, *apiv1beta2.OpenStackMachineApplyConfiguration]( + fake.Fake, + namespace, + v1beta2.SchemeGroupVersion.WithResource("openstackmachines"), + v1beta2.SchemeGroupVersion.WithKind("OpenStackMachine"), + func() *v1beta2.OpenStackMachine { return &v1beta2.OpenStackMachine{} }, + func() *v1beta2.OpenStackMachineList { return &v1beta2.OpenStackMachineList{} }, + func(dst, src *v1beta2.OpenStackMachineList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta2.OpenStackMachineList) []*v1beta2.OpenStackMachine { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta2.OpenStackMachineList, items []*v1beta2.OpenStackMachine) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackmachinetemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackmachinetemplate.go new file mode 100644 index 000000000..4aa783008 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/fake/fake_openstackmachinetemplate.go @@ -0,0 +1,53 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + gentype "k8s.io/client-go/gentype" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + typedapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/typed/api/v1beta2" +) + +// fakeOpenStackMachineTemplates implements OpenStackMachineTemplateInterface +type fakeOpenStackMachineTemplates struct { + *gentype.FakeClientWithListAndApply[*v1beta2.OpenStackMachineTemplate, *v1beta2.OpenStackMachineTemplateList, *apiv1beta2.OpenStackMachineTemplateApplyConfiguration] + Fake *FakeInfrastructureV1beta2 +} + +func newFakeOpenStackMachineTemplates(fake *FakeInfrastructureV1beta2, namespace string) typedapiv1beta2.OpenStackMachineTemplateInterface { + return &fakeOpenStackMachineTemplates{ + gentype.NewFakeClientWithListAndApply[*v1beta2.OpenStackMachineTemplate, *v1beta2.OpenStackMachineTemplateList, *apiv1beta2.OpenStackMachineTemplateApplyConfiguration]( + fake.Fake, + namespace, + v1beta2.SchemeGroupVersion.WithResource("openstackmachinetemplates"), + v1beta2.SchemeGroupVersion.WithKind("OpenStackMachineTemplate"), + func() *v1beta2.OpenStackMachineTemplate { return &v1beta2.OpenStackMachineTemplate{} }, + func() *v1beta2.OpenStackMachineTemplateList { return &v1beta2.OpenStackMachineTemplateList{} }, + func(dst, src *v1beta2.OpenStackMachineTemplateList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta2.OpenStackMachineTemplateList) []*v1beta2.OpenStackMachineTemplate { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta2.OpenStackMachineTemplateList, items []*v1beta2.OpenStackMachineTemplate) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/generated_expansion.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/generated_expansion.go new file mode 100644 index 000000000..6afd57bed --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/generated_expansion.go @@ -0,0 +1,27 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta2 + +type OpenStackClusterExpansion interface{} + +type OpenStackClusterTemplateExpansion interface{} + +type OpenStackMachineExpansion interface{} + +type OpenStackMachineTemplateExpansion interface{} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackcluster.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackcluster.go new file mode 100644 index 000000000..f12fa1bb8 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackcluster.go @@ -0,0 +1,74 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + applyconfigurationapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + scheme "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/scheme" +) + +// OpenStackClustersGetter has a method to return a OpenStackClusterInterface. +// A group's client should implement this interface. +type OpenStackClustersGetter interface { + OpenStackClusters(namespace string) OpenStackClusterInterface +} + +// OpenStackClusterInterface has methods to work with OpenStackCluster resources. +type OpenStackClusterInterface interface { + Create(ctx context.Context, openStackCluster *apiv1beta2.OpenStackCluster, opts v1.CreateOptions) (*apiv1beta2.OpenStackCluster, error) + Update(ctx context.Context, openStackCluster *apiv1beta2.OpenStackCluster, opts v1.UpdateOptions) (*apiv1beta2.OpenStackCluster, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, openStackCluster *apiv1beta2.OpenStackCluster, opts v1.UpdateOptions) (*apiv1beta2.OpenStackCluster, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*apiv1beta2.OpenStackCluster, error) + List(ctx context.Context, opts v1.ListOptions) (*apiv1beta2.OpenStackClusterList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiv1beta2.OpenStackCluster, err error) + Apply(ctx context.Context, openStackCluster *applyconfigurationapiv1beta2.OpenStackClusterApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta2.OpenStackCluster, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, openStackCluster *applyconfigurationapiv1beta2.OpenStackClusterApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta2.OpenStackCluster, err error) + OpenStackClusterExpansion +} + +// openStackClusters implements OpenStackClusterInterface +type openStackClusters struct { + *gentype.ClientWithListAndApply[*apiv1beta2.OpenStackCluster, *apiv1beta2.OpenStackClusterList, *applyconfigurationapiv1beta2.OpenStackClusterApplyConfiguration] +} + +// newOpenStackClusters returns a OpenStackClusters +func newOpenStackClusters(c *InfrastructureV1beta2Client, namespace string) *openStackClusters { + return &openStackClusters{ + gentype.NewClientWithListAndApply[*apiv1beta2.OpenStackCluster, *apiv1beta2.OpenStackClusterList, *applyconfigurationapiv1beta2.OpenStackClusterApplyConfiguration]( + "openstackclusters", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *apiv1beta2.OpenStackCluster { return &apiv1beta2.OpenStackCluster{} }, + func() *apiv1beta2.OpenStackClusterList { return &apiv1beta2.OpenStackClusterList{} }, + ), + } +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackclustertemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackclustertemplate.go new file mode 100644 index 000000000..432c08c11 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackclustertemplate.go @@ -0,0 +1,70 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + applyconfigurationapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + scheme "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/scheme" +) + +// OpenStackClusterTemplatesGetter has a method to return a OpenStackClusterTemplateInterface. +// A group's client should implement this interface. +type OpenStackClusterTemplatesGetter interface { + OpenStackClusterTemplates(namespace string) OpenStackClusterTemplateInterface +} + +// OpenStackClusterTemplateInterface has methods to work with OpenStackClusterTemplate resources. +type OpenStackClusterTemplateInterface interface { + Create(ctx context.Context, openStackClusterTemplate *apiv1beta2.OpenStackClusterTemplate, opts v1.CreateOptions) (*apiv1beta2.OpenStackClusterTemplate, error) + Update(ctx context.Context, openStackClusterTemplate *apiv1beta2.OpenStackClusterTemplate, opts v1.UpdateOptions) (*apiv1beta2.OpenStackClusterTemplate, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*apiv1beta2.OpenStackClusterTemplate, error) + List(ctx context.Context, opts v1.ListOptions) (*apiv1beta2.OpenStackClusterTemplateList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiv1beta2.OpenStackClusterTemplate, err error) + Apply(ctx context.Context, openStackClusterTemplate *applyconfigurationapiv1beta2.OpenStackClusterTemplateApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta2.OpenStackClusterTemplate, err error) + OpenStackClusterTemplateExpansion +} + +// openStackClusterTemplates implements OpenStackClusterTemplateInterface +type openStackClusterTemplates struct { + *gentype.ClientWithListAndApply[*apiv1beta2.OpenStackClusterTemplate, *apiv1beta2.OpenStackClusterTemplateList, *applyconfigurationapiv1beta2.OpenStackClusterTemplateApplyConfiguration] +} + +// newOpenStackClusterTemplates returns a OpenStackClusterTemplates +func newOpenStackClusterTemplates(c *InfrastructureV1beta2Client, namespace string) *openStackClusterTemplates { + return &openStackClusterTemplates{ + gentype.NewClientWithListAndApply[*apiv1beta2.OpenStackClusterTemplate, *apiv1beta2.OpenStackClusterTemplateList, *applyconfigurationapiv1beta2.OpenStackClusterTemplateApplyConfiguration]( + "openstackclustertemplates", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *apiv1beta2.OpenStackClusterTemplate { return &apiv1beta2.OpenStackClusterTemplate{} }, + func() *apiv1beta2.OpenStackClusterTemplateList { return &apiv1beta2.OpenStackClusterTemplateList{} }, + ), + } +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackmachine.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackmachine.go new file mode 100644 index 000000000..18f92a248 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackmachine.go @@ -0,0 +1,74 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + applyconfigurationapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + scheme "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/scheme" +) + +// OpenStackMachinesGetter has a method to return a OpenStackMachineInterface. +// A group's client should implement this interface. +type OpenStackMachinesGetter interface { + OpenStackMachines(namespace string) OpenStackMachineInterface +} + +// OpenStackMachineInterface has methods to work with OpenStackMachine resources. +type OpenStackMachineInterface interface { + Create(ctx context.Context, openStackMachine *apiv1beta2.OpenStackMachine, opts v1.CreateOptions) (*apiv1beta2.OpenStackMachine, error) + Update(ctx context.Context, openStackMachine *apiv1beta2.OpenStackMachine, opts v1.UpdateOptions) (*apiv1beta2.OpenStackMachine, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, openStackMachine *apiv1beta2.OpenStackMachine, opts v1.UpdateOptions) (*apiv1beta2.OpenStackMachine, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*apiv1beta2.OpenStackMachine, error) + List(ctx context.Context, opts v1.ListOptions) (*apiv1beta2.OpenStackMachineList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiv1beta2.OpenStackMachine, err error) + Apply(ctx context.Context, openStackMachine *applyconfigurationapiv1beta2.OpenStackMachineApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta2.OpenStackMachine, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, openStackMachine *applyconfigurationapiv1beta2.OpenStackMachineApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta2.OpenStackMachine, err error) + OpenStackMachineExpansion +} + +// openStackMachines implements OpenStackMachineInterface +type openStackMachines struct { + *gentype.ClientWithListAndApply[*apiv1beta2.OpenStackMachine, *apiv1beta2.OpenStackMachineList, *applyconfigurationapiv1beta2.OpenStackMachineApplyConfiguration] +} + +// newOpenStackMachines returns a OpenStackMachines +func newOpenStackMachines(c *InfrastructureV1beta2Client, namespace string) *openStackMachines { + return &openStackMachines{ + gentype.NewClientWithListAndApply[*apiv1beta2.OpenStackMachine, *apiv1beta2.OpenStackMachineList, *applyconfigurationapiv1beta2.OpenStackMachineApplyConfiguration]( + "openstackmachines", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *apiv1beta2.OpenStackMachine { return &apiv1beta2.OpenStackMachine{} }, + func() *apiv1beta2.OpenStackMachineList { return &apiv1beta2.OpenStackMachineList{} }, + ), + } +} diff --git a/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackmachinetemplate.go b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackmachinetemplate.go new file mode 100644 index 000000000..d145fc0b3 --- /dev/null +++ b/pkg/generated/clientset/clientset/typed/api/v1beta2/openstackmachinetemplate.go @@ -0,0 +1,74 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + applyconfigurationapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta2" + scheme "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset/scheme" +) + +// OpenStackMachineTemplatesGetter has a method to return a OpenStackMachineTemplateInterface. +// A group's client should implement this interface. +type OpenStackMachineTemplatesGetter interface { + OpenStackMachineTemplates(namespace string) OpenStackMachineTemplateInterface +} + +// OpenStackMachineTemplateInterface has methods to work with OpenStackMachineTemplate resources. +type OpenStackMachineTemplateInterface interface { + Create(ctx context.Context, openStackMachineTemplate *apiv1beta2.OpenStackMachineTemplate, opts v1.CreateOptions) (*apiv1beta2.OpenStackMachineTemplate, error) + Update(ctx context.Context, openStackMachineTemplate *apiv1beta2.OpenStackMachineTemplate, opts v1.UpdateOptions) (*apiv1beta2.OpenStackMachineTemplate, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, openStackMachineTemplate *apiv1beta2.OpenStackMachineTemplate, opts v1.UpdateOptions) (*apiv1beta2.OpenStackMachineTemplate, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*apiv1beta2.OpenStackMachineTemplate, error) + List(ctx context.Context, opts v1.ListOptions) (*apiv1beta2.OpenStackMachineTemplateList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiv1beta2.OpenStackMachineTemplate, err error) + Apply(ctx context.Context, openStackMachineTemplate *applyconfigurationapiv1beta2.OpenStackMachineTemplateApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta2.OpenStackMachineTemplate, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, openStackMachineTemplate *applyconfigurationapiv1beta2.OpenStackMachineTemplateApplyConfiguration, opts v1.ApplyOptions) (result *apiv1beta2.OpenStackMachineTemplate, err error) + OpenStackMachineTemplateExpansion +} + +// openStackMachineTemplates implements OpenStackMachineTemplateInterface +type openStackMachineTemplates struct { + *gentype.ClientWithListAndApply[*apiv1beta2.OpenStackMachineTemplate, *apiv1beta2.OpenStackMachineTemplateList, *applyconfigurationapiv1beta2.OpenStackMachineTemplateApplyConfiguration] +} + +// newOpenStackMachineTemplates returns a OpenStackMachineTemplates +func newOpenStackMachineTemplates(c *InfrastructureV1beta2Client, namespace string) *openStackMachineTemplates { + return &openStackMachineTemplates{ + gentype.NewClientWithListAndApply[*apiv1beta2.OpenStackMachineTemplate, *apiv1beta2.OpenStackMachineTemplateList, *applyconfigurationapiv1beta2.OpenStackMachineTemplateApplyConfiguration]( + "openstackmachinetemplates", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *apiv1beta2.OpenStackMachineTemplate { return &apiv1beta2.OpenStackMachineTemplate{} }, + func() *apiv1beta2.OpenStackMachineTemplateList { return &apiv1beta2.OpenStackMachineTemplateList{} }, + ), + } +} diff --git a/pkg/generated/informers/externalversions/api/interface.go b/pkg/generated/informers/externalversions/api/interface.go index ea2a213e3..ebbc84a20 100644 --- a/pkg/generated/informers/externalversions/api/interface.go +++ b/pkg/generated/informers/externalversions/api/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package api import ( v1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/api/v1alpha1" v1beta1 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/api/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/api/v1beta2" internalinterfaces "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/internalinterfaces" ) @@ -30,6 +31,8 @@ type Interface interface { V1alpha1() v1alpha1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface + // V1beta2 provides access to shared informers for resources in V1beta2. + V1beta2() v1beta2.Interface } type group struct { @@ -52,3 +55,8 @@ func (g *group) V1alpha1() v1alpha1.Interface { func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) } + +// V1beta2 returns a new v1beta2.Interface. +func (g *group) V1beta2() v1beta2.Interface { + return v1beta2.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/pkg/generated/informers/externalversions/api/v1alpha1/interface.go b/pkg/generated/informers/externalversions/api/v1alpha1/interface.go index 93a99b517..b41656f04 100644 --- a/pkg/generated/informers/externalversions/api/v1alpha1/interface.go +++ b/pkg/generated/informers/externalversions/api/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/informers/externalversions/api/v1alpha1/openstackclusteridentity.go b/pkg/generated/informers/externalversions/api/v1alpha1/openstackclusteridentity.go index 4899bed46..6e7148eba 100644 --- a/pkg/generated/informers/externalversions/api/v1alpha1/openstackclusteridentity.go +++ b/pkg/generated/informers/externalversions/api/v1alpha1/openstackclusteridentity.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ func NewOpenStackClusterIdentityInformer(client clientset.Interface, namespace s // one. This reduces memory footprint and number of connections to the server. func NewFilteredOpenStackClusterIdentityInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -82,7 +82,7 @@ func NewFilteredOpenStackClusterIdentityInformer(client clientset.Interface, nam } return client.InfrastructureV1alpha1().OpenStackClusterIdentities(namespace).Watch(ctx, options) }, - }, + }, client), &clusterapiprovideropenstackapiv1alpha1.OpenStackClusterIdentity{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/api/v1alpha1/openstackserver.go b/pkg/generated/informers/externalversions/api/v1alpha1/openstackserver.go index a809678ea..d8a5619a0 100644 --- a/pkg/generated/informers/externalversions/api/v1alpha1/openstackserver.go +++ b/pkg/generated/informers/externalversions/api/v1alpha1/openstackserver.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ func NewOpenStackServerInformer(client clientset.Interface, namespace string, re // one. This reduces memory footprint and number of connections to the server. func NewFilteredOpenStackServerInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -82,7 +82,7 @@ func NewFilteredOpenStackServerInformer(client clientset.Interface, namespace st } return client.InfrastructureV1alpha1().OpenStackServers(namespace).Watch(ctx, options) }, - }, + }, client), &clusterapiprovideropenstackapiv1alpha1.OpenStackServer{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/api/v1beta1/interface.go b/pkg/generated/informers/externalversions/api/v1beta1/interface.go index f10af5184..9a386ba95 100644 --- a/pkg/generated/informers/externalversions/api/v1beta1/interface.go +++ b/pkg/generated/informers/externalversions/api/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/informers/externalversions/api/v1beta1/openstackcluster.go b/pkg/generated/informers/externalversions/api/v1beta1/openstackcluster.go index dd2b70c7f..0fc5d3855 100644 --- a/pkg/generated/informers/externalversions/api/v1beta1/openstackcluster.go +++ b/pkg/generated/informers/externalversions/api/v1beta1/openstackcluster.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ func NewOpenStackClusterInformer(client clientset.Interface, namespace string, r // one. This reduces memory footprint and number of connections to the server. func NewFilteredOpenStackClusterInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -82,7 +82,7 @@ func NewFilteredOpenStackClusterInformer(client clientset.Interface, namespace s } return client.InfrastructureV1beta1().OpenStackClusters(namespace).Watch(ctx, options) }, - }, + }, client), &clusterapiprovideropenstackapiv1beta1.OpenStackCluster{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/api/v1beta1/openstackclustertemplate.go b/pkg/generated/informers/externalversions/api/v1beta1/openstackclustertemplate.go index a6f96fea7..79c79e03b 100644 --- a/pkg/generated/informers/externalversions/api/v1beta1/openstackclustertemplate.go +++ b/pkg/generated/informers/externalversions/api/v1beta1/openstackclustertemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ func NewOpenStackClusterTemplateInformer(client clientset.Interface, namespace s // one. This reduces memory footprint and number of connections to the server. func NewFilteredOpenStackClusterTemplateInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -82,7 +82,7 @@ func NewFilteredOpenStackClusterTemplateInformer(client clientset.Interface, nam } return client.InfrastructureV1beta1().OpenStackClusterTemplates(namespace).Watch(ctx, options) }, - }, + }, client), &clusterapiprovideropenstackapiv1beta1.OpenStackClusterTemplate{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/api/v1beta1/openstackmachine.go b/pkg/generated/informers/externalversions/api/v1beta1/openstackmachine.go index 20ae86528..72de2c133 100644 --- a/pkg/generated/informers/externalversions/api/v1beta1/openstackmachine.go +++ b/pkg/generated/informers/externalversions/api/v1beta1/openstackmachine.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ func NewOpenStackMachineInformer(client clientset.Interface, namespace string, r // one. This reduces memory footprint and number of connections to the server. func NewFilteredOpenStackMachineInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -82,7 +82,7 @@ func NewFilteredOpenStackMachineInformer(client clientset.Interface, namespace s } return client.InfrastructureV1beta1().OpenStackMachines(namespace).Watch(ctx, options) }, - }, + }, client), &clusterapiprovideropenstackapiv1beta1.OpenStackMachine{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/api/v1beta1/openstackmachinetemplate.go b/pkg/generated/informers/externalversions/api/v1beta1/openstackmachinetemplate.go index 6d0f26db9..87fc14a6a 100644 --- a/pkg/generated/informers/externalversions/api/v1beta1/openstackmachinetemplate.go +++ b/pkg/generated/informers/externalversions/api/v1beta1/openstackmachinetemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ func NewOpenStackMachineTemplateInformer(client clientset.Interface, namespace s // one. This reduces memory footprint and number of connections to the server. func NewFilteredOpenStackMachineTemplateInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -82,7 +82,7 @@ func NewFilteredOpenStackMachineTemplateInformer(client clientset.Interface, nam } return client.InfrastructureV1beta1().OpenStackMachineTemplates(namespace).Watch(ctx, options) }, - }, + }, client), &clusterapiprovideropenstackapiv1beta1.OpenStackMachineTemplate{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/api/v1beta2/interface.go b/pkg/generated/informers/externalversions/api/v1beta2/interface.go new file mode 100644 index 000000000..8d72feea6 --- /dev/null +++ b/pkg/generated/informers/externalversions/api/v1beta2/interface.go @@ -0,0 +1,66 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + internalinterfaces "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // OpenStackClusters returns a OpenStackClusterInformer. + OpenStackClusters() OpenStackClusterInformer + // OpenStackClusterTemplates returns a OpenStackClusterTemplateInformer. + OpenStackClusterTemplates() OpenStackClusterTemplateInformer + // OpenStackMachines returns a OpenStackMachineInformer. + OpenStackMachines() OpenStackMachineInformer + // OpenStackMachineTemplates returns a OpenStackMachineTemplateInformer. + OpenStackMachineTemplates() OpenStackMachineTemplateInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// OpenStackClusters returns a OpenStackClusterInformer. +func (v *version) OpenStackClusters() OpenStackClusterInformer { + return &openStackClusterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// OpenStackClusterTemplates returns a OpenStackClusterTemplateInformer. +func (v *version) OpenStackClusterTemplates() OpenStackClusterTemplateInformer { + return &openStackClusterTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// OpenStackMachines returns a OpenStackMachineInformer. +func (v *version) OpenStackMachines() OpenStackMachineInformer { + return &openStackMachineInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// OpenStackMachineTemplates returns a OpenStackMachineTemplateInformer. +func (v *version) OpenStackMachineTemplates() OpenStackMachineTemplateInformer { + return &openStackMachineTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/generated/informers/externalversions/api/v1beta2/openstackcluster.go b/pkg/generated/informers/externalversions/api/v1beta2/openstackcluster.go new file mode 100644 index 000000000..035e15bed --- /dev/null +++ b/pkg/generated/informers/externalversions/api/v1beta2/openstackcluster.go @@ -0,0 +1,102 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + clusterapiprovideropenstackapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + clientset "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset" + internalinterfaces "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/internalinterfaces" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/listers/api/v1beta2" +) + +// OpenStackClusterInformer provides access to a shared informer and lister for +// OpenStackClusters. +type OpenStackClusterInformer interface { + Informer() cache.SharedIndexInformer + Lister() apiv1beta2.OpenStackClusterLister +} + +type openStackClusterInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewOpenStackClusterInformer constructs a new informer for OpenStackCluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewOpenStackClusterInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredOpenStackClusterInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredOpenStackClusterInformer constructs a new informer for OpenStackCluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredOpenStackClusterInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusters(namespace).List(context.Background(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusters(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusters(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusters(namespace).Watch(ctx, options) + }, + }, client), + &clusterapiprovideropenstackapiv1beta2.OpenStackCluster{}, + resyncPeriod, + indexers, + ) +} + +func (f *openStackClusterInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredOpenStackClusterInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *openStackClusterInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&clusterapiprovideropenstackapiv1beta2.OpenStackCluster{}, f.defaultInformer) +} + +func (f *openStackClusterInformer) Lister() apiv1beta2.OpenStackClusterLister { + return apiv1beta2.NewOpenStackClusterLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/api/v1beta2/openstackclustertemplate.go b/pkg/generated/informers/externalversions/api/v1beta2/openstackclustertemplate.go new file mode 100644 index 000000000..5b0edd2ba --- /dev/null +++ b/pkg/generated/informers/externalversions/api/v1beta2/openstackclustertemplate.go @@ -0,0 +1,102 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + clusterapiprovideropenstackapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + clientset "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset" + internalinterfaces "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/internalinterfaces" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/listers/api/v1beta2" +) + +// OpenStackClusterTemplateInformer provides access to a shared informer and lister for +// OpenStackClusterTemplates. +type OpenStackClusterTemplateInformer interface { + Informer() cache.SharedIndexInformer + Lister() apiv1beta2.OpenStackClusterTemplateLister +} + +type openStackClusterTemplateInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewOpenStackClusterTemplateInformer constructs a new informer for OpenStackClusterTemplate type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewOpenStackClusterTemplateInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredOpenStackClusterTemplateInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredOpenStackClusterTemplateInformer constructs a new informer for OpenStackClusterTemplate type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredOpenStackClusterTemplateInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusterTemplates(namespace).List(context.Background(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusterTemplates(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusterTemplates(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackClusterTemplates(namespace).Watch(ctx, options) + }, + }, client), + &clusterapiprovideropenstackapiv1beta2.OpenStackClusterTemplate{}, + resyncPeriod, + indexers, + ) +} + +func (f *openStackClusterTemplateInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredOpenStackClusterTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *openStackClusterTemplateInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&clusterapiprovideropenstackapiv1beta2.OpenStackClusterTemplate{}, f.defaultInformer) +} + +func (f *openStackClusterTemplateInformer) Lister() apiv1beta2.OpenStackClusterTemplateLister { + return apiv1beta2.NewOpenStackClusterTemplateLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/api/v1beta2/openstackmachine.go b/pkg/generated/informers/externalversions/api/v1beta2/openstackmachine.go new file mode 100644 index 000000000..2a0be2757 --- /dev/null +++ b/pkg/generated/informers/externalversions/api/v1beta2/openstackmachine.go @@ -0,0 +1,102 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + clusterapiprovideropenstackapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + clientset "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset" + internalinterfaces "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/internalinterfaces" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/listers/api/v1beta2" +) + +// OpenStackMachineInformer provides access to a shared informer and lister for +// OpenStackMachines. +type OpenStackMachineInformer interface { + Informer() cache.SharedIndexInformer + Lister() apiv1beta2.OpenStackMachineLister +} + +type openStackMachineInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewOpenStackMachineInformer constructs a new informer for OpenStackMachine type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewOpenStackMachineInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredOpenStackMachineInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredOpenStackMachineInformer constructs a new informer for OpenStackMachine type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredOpenStackMachineInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachines(namespace).List(context.Background(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachines(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachines(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachines(namespace).Watch(ctx, options) + }, + }, client), + &clusterapiprovideropenstackapiv1beta2.OpenStackMachine{}, + resyncPeriod, + indexers, + ) +} + +func (f *openStackMachineInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredOpenStackMachineInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *openStackMachineInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&clusterapiprovideropenstackapiv1beta2.OpenStackMachine{}, f.defaultInformer) +} + +func (f *openStackMachineInformer) Lister() apiv1beta2.OpenStackMachineLister { + return apiv1beta2.NewOpenStackMachineLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/api/v1beta2/openstackmachinetemplate.go b/pkg/generated/informers/externalversions/api/v1beta2/openstackmachinetemplate.go new file mode 100644 index 000000000..fff0585fa --- /dev/null +++ b/pkg/generated/informers/externalversions/api/v1beta2/openstackmachinetemplate.go @@ -0,0 +1,102 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + context "context" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + clusterapiprovideropenstackapiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + clientset "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/clientset/clientset" + internalinterfaces "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/informers/externalversions/internalinterfaces" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/listers/api/v1beta2" +) + +// OpenStackMachineTemplateInformer provides access to a shared informer and lister for +// OpenStackMachineTemplates. +type OpenStackMachineTemplateInformer interface { + Informer() cache.SharedIndexInformer + Lister() apiv1beta2.OpenStackMachineTemplateLister +} + +type openStackMachineTemplateInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewOpenStackMachineTemplateInformer constructs a new informer for OpenStackMachineTemplate type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewOpenStackMachineTemplateInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredOpenStackMachineTemplateInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredOpenStackMachineTemplateInformer constructs a new informer for OpenStackMachineTemplate type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredOpenStackMachineTemplateInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachineTemplates(namespace).List(context.Background(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachineTemplates(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachineTemplates(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.InfrastructureV1beta2().OpenStackMachineTemplates(namespace).Watch(ctx, options) + }, + }, client), + &clusterapiprovideropenstackapiv1beta2.OpenStackMachineTemplate{}, + resyncPeriod, + indexers, + ) +} + +func (f *openStackMachineTemplateInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredOpenStackMachineTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *openStackMachineTemplateInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&clusterapiprovideropenstackapiv1beta2.OpenStackMachineTemplate{}, f.defaultInformer) +} + +func (f *openStackMachineTemplateInformer) Lister() apiv1beta2.OpenStackMachineTemplateLister { + return apiv1beta2.NewOpenStackMachineTemplateLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/factory.go b/pkg/generated/informers/externalversions/factory.go index 615fd6c0a..3a4f5e7bc 100644 --- a/pkg/generated/informers/externalversions/factory.go +++ b/pkg/generated/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -97,6 +97,7 @@ func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Dur // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// // Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client clientset.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) @@ -204,7 +205,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // // It is typically used like this: // -// ctx, cancel := context.Background() +// ctx, cancel := context.WithCancel(context.Background()) // defer cancel() // factory := NewSharedInformerFactory(client, resyncPeriod) // defer factory.WaitForStop() // Returns immediately if nothing was started. diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go index c603ff05b..e9cfd39a2 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/pkg/generated/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import ( cache "k8s.io/client-go/tools/cache" v1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" v1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) // GenericInformer is type of SharedIndexInformer which will locate and delegate to other @@ -69,6 +70,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1beta1.SchemeGroupVersion.WithResource("openstackmachinetemplates"): return &genericInformer{resource: resource.GroupResource(), informer: f.Infrastructure().V1beta1().OpenStackMachineTemplates().Informer()}, nil + // Group=infrastructure.cluster.x-k8s.io, Version=v1beta2 + case v1beta2.SchemeGroupVersion.WithResource("openstackclusters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Infrastructure().V1beta2().OpenStackClusters().Informer()}, nil + case v1beta2.SchemeGroupVersion.WithResource("openstackclustertemplates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Infrastructure().V1beta2().OpenStackClusterTemplates().Informer()}, nil + case v1beta2.SchemeGroupVersion.WithResource("openstackmachines"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Infrastructure().V1beta2().OpenStackMachines().Informer()}, nil + case v1beta2.SchemeGroupVersion.WithResource("openstackmachinetemplates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Infrastructure().V1beta2().OpenStackMachineTemplates().Informer()}, nil + } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go index 8f0108f4a..1eab81d12 100644 --- a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1alpha1/expansion_generated.go b/pkg/generated/listers/api/v1alpha1/expansion_generated.go index 1a9f025d8..0b67cfe3d 100644 --- a/pkg/generated/listers/api/v1alpha1/expansion_generated.go +++ b/pkg/generated/listers/api/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1alpha1/openstackclusteridentity.go b/pkg/generated/listers/api/v1alpha1/openstackclusteridentity.go index 2251390b2..8435a1356 100644 --- a/pkg/generated/listers/api/v1alpha1/openstackclusteridentity.go +++ b/pkg/generated/listers/api/v1alpha1/openstackclusteridentity.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1alpha1/openstackserver.go b/pkg/generated/listers/api/v1alpha1/openstackserver.go index 84fadb81d..9f631c7bb 100644 --- a/pkg/generated/listers/api/v1alpha1/openstackserver.go +++ b/pkg/generated/listers/api/v1alpha1/openstackserver.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1beta1/expansion_generated.go b/pkg/generated/listers/api/v1beta1/expansion_generated.go index 3a3027067..5c5117cdc 100644 --- a/pkg/generated/listers/api/v1beta1/expansion_generated.go +++ b/pkg/generated/listers/api/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1beta1/openstackcluster.go b/pkg/generated/listers/api/v1beta1/openstackcluster.go index a256459c1..50645d617 100644 --- a/pkg/generated/listers/api/v1beta1/openstackcluster.go +++ b/pkg/generated/listers/api/v1beta1/openstackcluster.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1beta1/openstackclustertemplate.go b/pkg/generated/listers/api/v1beta1/openstackclustertemplate.go index d76848057..a6f0bada1 100644 --- a/pkg/generated/listers/api/v1beta1/openstackclustertemplate.go +++ b/pkg/generated/listers/api/v1beta1/openstackclustertemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1beta1/openstackmachine.go b/pkg/generated/listers/api/v1beta1/openstackmachine.go index d086ffc10..d40caa74d 100644 --- a/pkg/generated/listers/api/v1beta1/openstackmachine.go +++ b/pkg/generated/listers/api/v1beta1/openstackmachine.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1beta1/openstackmachinetemplate.go b/pkg/generated/listers/api/v1beta1/openstackmachinetemplate.go index a7548419d..4d21d8d9d 100644 --- a/pkg/generated/listers/api/v1beta1/openstackmachinetemplate.go +++ b/pkg/generated/listers/api/v1beta1/openstackmachinetemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2026 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/generated/listers/api/v1beta2/expansion_generated.go b/pkg/generated/listers/api/v1beta2/expansion_generated.go new file mode 100644 index 000000000..f6064c5f6 --- /dev/null +++ b/pkg/generated/listers/api/v1beta2/expansion_generated.go @@ -0,0 +1,51 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta2 + +// OpenStackClusterListerExpansion allows custom methods to be added to +// OpenStackClusterLister. +type OpenStackClusterListerExpansion interface{} + +// OpenStackClusterNamespaceListerExpansion allows custom methods to be added to +// OpenStackClusterNamespaceLister. +type OpenStackClusterNamespaceListerExpansion interface{} + +// OpenStackClusterTemplateListerExpansion allows custom methods to be added to +// OpenStackClusterTemplateLister. +type OpenStackClusterTemplateListerExpansion interface{} + +// OpenStackClusterTemplateNamespaceListerExpansion allows custom methods to be added to +// OpenStackClusterTemplateNamespaceLister. +type OpenStackClusterTemplateNamespaceListerExpansion interface{} + +// OpenStackMachineListerExpansion allows custom methods to be added to +// OpenStackMachineLister. +type OpenStackMachineListerExpansion interface{} + +// OpenStackMachineNamespaceListerExpansion allows custom methods to be added to +// OpenStackMachineNamespaceLister. +type OpenStackMachineNamespaceListerExpansion interface{} + +// OpenStackMachineTemplateListerExpansion allows custom methods to be added to +// OpenStackMachineTemplateLister. +type OpenStackMachineTemplateListerExpansion interface{} + +// OpenStackMachineTemplateNamespaceListerExpansion allows custom methods to be added to +// OpenStackMachineTemplateNamespaceLister. +type OpenStackMachineTemplateNamespaceListerExpansion interface{} diff --git a/pkg/generated/listers/api/v1beta2/openstackcluster.go b/pkg/generated/listers/api/v1beta2/openstackcluster.go new file mode 100644 index 000000000..941bade4b --- /dev/null +++ b/pkg/generated/listers/api/v1beta2/openstackcluster.go @@ -0,0 +1,70 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// OpenStackClusterLister helps list OpenStackClusters. +// All objects returned here must be treated as read-only. +type OpenStackClusterLister interface { + // List lists all OpenStackClusters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackCluster, err error) + // OpenStackClusters returns an object that can list and get OpenStackClusters. + OpenStackClusters(namespace string) OpenStackClusterNamespaceLister + OpenStackClusterListerExpansion +} + +// openStackClusterLister implements the OpenStackClusterLister interface. +type openStackClusterLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackCluster] +} + +// NewOpenStackClusterLister returns a new OpenStackClusterLister. +func NewOpenStackClusterLister(indexer cache.Indexer) OpenStackClusterLister { + return &openStackClusterLister{listers.New[*apiv1beta2.OpenStackCluster](indexer, apiv1beta2.Resource("openstackcluster"))} +} + +// OpenStackClusters returns an object that can list and get OpenStackClusters. +func (s *openStackClusterLister) OpenStackClusters(namespace string) OpenStackClusterNamespaceLister { + return openStackClusterNamespaceLister{listers.NewNamespaced[*apiv1beta2.OpenStackCluster](s.ResourceIndexer, namespace)} +} + +// OpenStackClusterNamespaceLister helps list and get OpenStackClusters. +// All objects returned here must be treated as read-only. +type OpenStackClusterNamespaceLister interface { + // List lists all OpenStackClusters in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackCluster, err error) + // Get retrieves the OpenStackCluster from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*apiv1beta2.OpenStackCluster, error) + OpenStackClusterNamespaceListerExpansion +} + +// openStackClusterNamespaceLister implements the OpenStackClusterNamespaceLister +// interface. +type openStackClusterNamespaceLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackCluster] +} diff --git a/pkg/generated/listers/api/v1beta2/openstackclustertemplate.go b/pkg/generated/listers/api/v1beta2/openstackclustertemplate.go new file mode 100644 index 000000000..7c4bd6e76 --- /dev/null +++ b/pkg/generated/listers/api/v1beta2/openstackclustertemplate.go @@ -0,0 +1,70 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// OpenStackClusterTemplateLister helps list OpenStackClusterTemplates. +// All objects returned here must be treated as read-only. +type OpenStackClusterTemplateLister interface { + // List lists all OpenStackClusterTemplates in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackClusterTemplate, err error) + // OpenStackClusterTemplates returns an object that can list and get OpenStackClusterTemplates. + OpenStackClusterTemplates(namespace string) OpenStackClusterTemplateNamespaceLister + OpenStackClusterTemplateListerExpansion +} + +// openStackClusterTemplateLister implements the OpenStackClusterTemplateLister interface. +type openStackClusterTemplateLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackClusterTemplate] +} + +// NewOpenStackClusterTemplateLister returns a new OpenStackClusterTemplateLister. +func NewOpenStackClusterTemplateLister(indexer cache.Indexer) OpenStackClusterTemplateLister { + return &openStackClusterTemplateLister{listers.New[*apiv1beta2.OpenStackClusterTemplate](indexer, apiv1beta2.Resource("openstackclustertemplate"))} +} + +// OpenStackClusterTemplates returns an object that can list and get OpenStackClusterTemplates. +func (s *openStackClusterTemplateLister) OpenStackClusterTemplates(namespace string) OpenStackClusterTemplateNamespaceLister { + return openStackClusterTemplateNamespaceLister{listers.NewNamespaced[*apiv1beta2.OpenStackClusterTemplate](s.ResourceIndexer, namespace)} +} + +// OpenStackClusterTemplateNamespaceLister helps list and get OpenStackClusterTemplates. +// All objects returned here must be treated as read-only. +type OpenStackClusterTemplateNamespaceLister interface { + // List lists all OpenStackClusterTemplates in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackClusterTemplate, err error) + // Get retrieves the OpenStackClusterTemplate from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*apiv1beta2.OpenStackClusterTemplate, error) + OpenStackClusterTemplateNamespaceListerExpansion +} + +// openStackClusterTemplateNamespaceLister implements the OpenStackClusterTemplateNamespaceLister +// interface. +type openStackClusterTemplateNamespaceLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackClusterTemplate] +} diff --git a/pkg/generated/listers/api/v1beta2/openstackmachine.go b/pkg/generated/listers/api/v1beta2/openstackmachine.go new file mode 100644 index 000000000..fe225e0c6 --- /dev/null +++ b/pkg/generated/listers/api/v1beta2/openstackmachine.go @@ -0,0 +1,70 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// OpenStackMachineLister helps list OpenStackMachines. +// All objects returned here must be treated as read-only. +type OpenStackMachineLister interface { + // List lists all OpenStackMachines in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackMachine, err error) + // OpenStackMachines returns an object that can list and get OpenStackMachines. + OpenStackMachines(namespace string) OpenStackMachineNamespaceLister + OpenStackMachineListerExpansion +} + +// openStackMachineLister implements the OpenStackMachineLister interface. +type openStackMachineLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackMachine] +} + +// NewOpenStackMachineLister returns a new OpenStackMachineLister. +func NewOpenStackMachineLister(indexer cache.Indexer) OpenStackMachineLister { + return &openStackMachineLister{listers.New[*apiv1beta2.OpenStackMachine](indexer, apiv1beta2.Resource("openstackmachine"))} +} + +// OpenStackMachines returns an object that can list and get OpenStackMachines. +func (s *openStackMachineLister) OpenStackMachines(namespace string) OpenStackMachineNamespaceLister { + return openStackMachineNamespaceLister{listers.NewNamespaced[*apiv1beta2.OpenStackMachine](s.ResourceIndexer, namespace)} +} + +// OpenStackMachineNamespaceLister helps list and get OpenStackMachines. +// All objects returned here must be treated as read-only. +type OpenStackMachineNamespaceLister interface { + // List lists all OpenStackMachines in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackMachine, err error) + // Get retrieves the OpenStackMachine from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*apiv1beta2.OpenStackMachine, error) + OpenStackMachineNamespaceListerExpansion +} + +// openStackMachineNamespaceLister implements the OpenStackMachineNamespaceLister +// interface. +type openStackMachineNamespaceLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackMachine] +} diff --git a/pkg/generated/listers/api/v1beta2/openstackmachinetemplate.go b/pkg/generated/listers/api/v1beta2/openstackmachinetemplate.go new file mode 100644 index 000000000..abce32e17 --- /dev/null +++ b/pkg/generated/listers/api/v1beta2/openstackmachinetemplate.go @@ -0,0 +1,70 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + apiv1beta2 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +// OpenStackMachineTemplateLister helps list OpenStackMachineTemplates. +// All objects returned here must be treated as read-only. +type OpenStackMachineTemplateLister interface { + // List lists all OpenStackMachineTemplates in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackMachineTemplate, err error) + // OpenStackMachineTemplates returns an object that can list and get OpenStackMachineTemplates. + OpenStackMachineTemplates(namespace string) OpenStackMachineTemplateNamespaceLister + OpenStackMachineTemplateListerExpansion +} + +// openStackMachineTemplateLister implements the OpenStackMachineTemplateLister interface. +type openStackMachineTemplateLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackMachineTemplate] +} + +// NewOpenStackMachineTemplateLister returns a new OpenStackMachineTemplateLister. +func NewOpenStackMachineTemplateLister(indexer cache.Indexer) OpenStackMachineTemplateLister { + return &openStackMachineTemplateLister{listers.New[*apiv1beta2.OpenStackMachineTemplate](indexer, apiv1beta2.Resource("openstackmachinetemplate"))} +} + +// OpenStackMachineTemplates returns an object that can list and get OpenStackMachineTemplates. +func (s *openStackMachineTemplateLister) OpenStackMachineTemplates(namespace string) OpenStackMachineTemplateNamespaceLister { + return openStackMachineTemplateNamespaceLister{listers.NewNamespaced[*apiv1beta2.OpenStackMachineTemplate](s.ResourceIndexer, namespace)} +} + +// OpenStackMachineTemplateNamespaceLister helps list and get OpenStackMachineTemplates. +// All objects returned here must be treated as read-only. +type OpenStackMachineTemplateNamespaceLister interface { + // List lists all OpenStackMachineTemplates in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*apiv1beta2.OpenStackMachineTemplate, err error) + // Get retrieves the OpenStackMachineTemplate from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*apiv1beta2.OpenStackMachineTemplate, error) + OpenStackMachineTemplateNamespaceListerExpansion +} + +// openStackMachineTemplateNamespaceLister implements the OpenStackMachineTemplateNamespaceLister +// interface. +type openStackMachineTemplateNamespaceLister struct { + listers.ResourceIndexer[*apiv1beta2.OpenStackMachineTemplate] +} diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 7bbeffff8..ba0de28d2 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package metrics +package metrics //nolint:revive import ( "sync" diff --git a/pkg/record/recorder.go b/pkg/record/recorder.go index c553bcc29..2ca4db03c 100644 --- a/pkg/record/recorder.go +++ b/pkg/record/recorder.go @@ -24,21 +24,28 @@ import ( "golang.org/x/text/language" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ) var ( initOnce sync.Once - defaultRecorder record.EventRecorder + defaultRecorder events.EventRecorder ) +// noopRecorder is a no-op implementation of events.EventRecorder used as the +// default before a real recorder is initialised. +type noopRecorder struct{} + +func (noopRecorder) Eventf(runtime.Object, runtime.Object, string, string, string, string, ...interface{}) { +} + func init() { - defaultRecorder = new(record.FakeRecorder) + defaultRecorder = noopRecorder{} } // InitFromRecorder initializes the global default recorder. It can only be called once. // Subsequent calls are considered noops. -func InitFromRecorder(recorder record.EventRecorder) { +func InitFromRecorder(recorder events.EventRecorder) { initOnce.Do(func() { defaultRecorder = recorder }) @@ -46,20 +53,20 @@ func InitFromRecorder(recorder record.EventRecorder) { // Event constructs an event from the given information and puts it in the queue for sending. func Event(object runtime.Object, reason, message string) { - defaultRecorder.Event(object, corev1.EventTypeNormal, cases.Title(language.English).String(reason), message) + defaultRecorder.Eventf(object, nil, corev1.EventTypeNormal, cases.Title(language.English).String(reason), cases.Title(language.English).String(reason), message) } // Eventf is just like Event, but with Sprintf for the message field. func Eventf(object runtime.Object, reason, message string, args ...interface{}) { - defaultRecorder.Eventf(object, corev1.EventTypeNormal, cases.Title(language.English).String(reason), message, args...) + defaultRecorder.Eventf(object, nil, corev1.EventTypeNormal, cases.Title(language.English).String(reason), cases.Title(language.English).String(reason), message, args...) } // Warn constructs a warning event from the given information and puts it in the queue for sending. func Warn(object runtime.Object, reason, message string) { - defaultRecorder.Event(object, corev1.EventTypeWarning, cases.Title(language.English).String(reason), message) + defaultRecorder.Eventf(object, nil, corev1.EventTypeWarning, cases.Title(language.English).String(reason), cases.Title(language.English).String(reason), message) } // Warnf is just like Warn, but with Sprintf for the message field. func Warnf(object runtime.Object, reason, message string, args ...interface{}) { - defaultRecorder.Eventf(object, corev1.EventTypeWarning, cases.Title(language.English).String(reason), message, args...) + defaultRecorder.Eventf(object, nil, corev1.EventTypeWarning, cases.Title(language.English).String(reason), cases.Title(language.English).String(reason), message, args...) } diff --git a/pkg/scope/mock.go b/pkg/scope/mock.go index d9568d644..648370e30 100644 --- a/pkg/scope/mock.go +++ b/pkg/scope/mock.go @@ -25,7 +25,7 @@ import ( "go.uber.org/mock/gomock" "sigs.k8s.io/controller-runtime/pkg/client" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients/mock" ) diff --git a/pkg/scope/provider.go b/pkg/scope/provider.go index 67ade5357..6c629fe92 100644 --- a/pkg/scope/provider.go +++ b/pkg/scope/provider.go @@ -40,7 +40,7 @@ import ( "sigs.k8s.io/yaml" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients" "sigs.k8s.io/cluster-api-provider-openstack/version" ) diff --git a/pkg/scope/provider_resolution_test.go b/pkg/scope/provider_resolution_test.go index e5c86f2fe..78a13229d 100644 --- a/pkg/scope/provider_resolution_test.go +++ b/pkg/scope/provider_resolution_test.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) const ( diff --git a/pkg/scope/scope.go b/pkg/scope/scope.go index 93f070fe7..d4bc4d668 100644 --- a/pkg/scope/scope.go +++ b/pkg/scope/scope.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/cache" "sigs.k8s.io/controller-runtime/pkg/client" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients" ) diff --git a/pkg/utils/controllers/controllers.go b/pkg/utils/controllers/controllers.go index 8c5f8f9fa..4b5d45d8e 100644 --- a/pkg/utils/controllers/controllers.go +++ b/pkg/utils/controllers/controllers.go @@ -17,10 +17,14 @@ limitations under the License. package controllers import ( + "context" "fmt" "net" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/controller-runtime/pkg/client" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) // ValidateSubnets validates if the amount of IPv4 and IPv6 subnets is allowed by OpenStackCluster. @@ -46,3 +50,15 @@ func ValidateSubnets(subnets []infrav1.Subnet) error { } return nil } + +func GetInfraCluster(ctx context.Context, c client.Client, cluster *clusterv1.Cluster) (*infrav1.OpenStackCluster, error) { + openStackCluster := &infrav1.OpenStackCluster{} + openStackClusterName := client.ObjectKey{ + Namespace: cluster.Namespace, + Name: cluster.Spec.InfrastructureRef.Name, + } + if err := c.Get(ctx, openStackClusterName, openStackCluster); err != nil { + return nil, err + } + return openStackCluster, nil +} diff --git a/pkg/utils/controllers/controllers_test.go b/pkg/utils/controllers/controllers_test.go index eea58d08f..655609e63 100644 --- a/pkg/utils/controllers/controllers_test.go +++ b/pkg/utils/controllers/controllers_test.go @@ -19,7 +19,7 @@ package controllers import ( "testing" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) func Test_validateSubnets(t *testing.T) { diff --git a/pkg/utils/conversioncommon/volumeavailabilityzone.go b/pkg/utils/conversioncommon/volumeavailabilityzone.go index 520a213a0..081692811 100644 --- a/pkg/utils/conversioncommon/volumeavailabilityzone.go +++ b/pkg/utils/conversioncommon/volumeavailabilityzone.go @@ -19,7 +19,7 @@ package conversioncommon import ( "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) func Convert_string_To_Pointer_v1beta1_VolumeAvailabilityZone(in *string, out **infrav1.VolumeAvailabilityZone, _ conversion.Scope) error { diff --git a/pkg/utils/errors/errors.go b/pkg/utils/errors/errors.go index 5c7b18d0c..aed3639d6 100644 --- a/pkg/utils/errors/errors.go +++ b/pkg/utils/errors/errors.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package errors +package capoerrors import ( "errors" diff --git a/pkg/utils/errors/terminal.go b/pkg/utils/errors/terminal.go index 4e88356d9..52f5b20bb 100644 --- a/pkg/utils/errors/terminal.go +++ b/pkg/utils/errors/terminal.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package errors +package capoerrors import ( goerrors "errors" diff --git a/pkg/utils/filterconvert/convert.go b/pkg/utils/filterconvert/convert.go index 25346b7d3..1646eb161 100644 --- a/pkg/utils/filterconvert/convert.go +++ b/pkg/utils/filterconvert/convert.go @@ -23,7 +23,7 @@ import ( "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/networks" "github.com/gophercloud/gophercloud/v2/openstack/networking/v2/subnets" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) func SecurityGroupFilterToListOpts(securityGroupFilter *infrav1.SecurityGroupFilter) securitygroups.ListOpts { diff --git a/pkg/utils/orc/identity_ref.go b/pkg/utils/orc/identity_ref.go index 7b1035c48..2c51fc1f6 100644 --- a/pkg/utils/orc/identity_ref.go +++ b/pkg/utils/orc/identity_ref.go @@ -19,7 +19,7 @@ package orc import ( orcv1alpha1 "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) type orcIdentityRefProvider struct { diff --git a/pkg/utils/strings/strings.go b/pkg/utils/strings/strings.go index ec97911fe..adc72c498 100644 --- a/pkg/utils/strings/strings.go +++ b/pkg/utils/strings/strings.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package strings +package strings //nolint:revive import ( "cmp" diff --git a/pkg/utils/strings/strings_test.go b/pkg/utils/strings/strings_test.go index 7502f060a..b82f283d9 100644 --- a/pkg/utils/strings/strings_test.go +++ b/pkg/utils/strings/strings_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package strings +package strings //nolint:revive import ( "slices" diff --git a/pkg/webhooks/fuzz_test.go b/pkg/webhooks/fuzz_test.go index b834a24ea..2b235cd58 100644 --- a/pkg/webhooks/fuzz_test.go +++ b/pkg/webhooks/fuzz_test.go @@ -25,10 +25,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/scheme" utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) type pointerToObject[T any] interface { @@ -36,8 +36,8 @@ type pointerToObject[T any] interface { runtime.Object } -// fuzzCustomValidator fuzzes a CustomValidator with objects of the validator's expected type. -func fuzzCustomValidator[O any, PO pointerToObject[O]](t *testing.T, name string, validator webhook.CustomValidator) { +// fuzzValidator fuzzes a Validator with objects of the validator's expected type. +func fuzzValidator[O any, PO pointerToObject[O]](t *testing.T, name string, validator admission.Validator[PO]) { t.Helper() fuzz := utilconversion.GetFuzzer(scheme.Scheme) ctx := context.TODO() @@ -77,21 +77,21 @@ func fuzzCustomValidator[O any, PO pointerToObject[O]](t *testing.T, name string } func Test_FuzzClusterWebhook(t *testing.T) { - fuzzCustomValidator[infrav1.OpenStackCluster](t, "OpenStackCluster", &openStackClusterWebhook{}) + fuzzValidator[infrav1.OpenStackCluster](t, "OpenStackCluster", &openStackClusterWebhook{}) } func Test_FuzzClusterTemplateWebhook(t *testing.T) { - fuzzCustomValidator[infrav1.OpenStackClusterTemplate](t, "OpenStackClusterTemplate", &openStackClusterTemplateWebhook{}) + fuzzValidator[infrav1.OpenStackClusterTemplate](t, "OpenStackClusterTemplate", &openStackClusterTemplateWebhook{}) } func Test_FuzzMachineWebhook(t *testing.T) { - fuzzCustomValidator[infrav1.OpenStackMachine](t, "OpenStackMachine", &openStackMachineWebhook{}) + fuzzValidator[infrav1.OpenStackMachine](t, "OpenStackMachine", &openStackMachineWebhook{}) } func Test_FuzzMachineTemplateWebhook(t *testing.T) { - fuzzCustomValidator[infrav1.OpenStackMachineTemplate](t, "OpenStackMachineTemplate", &openStackMachineTemplateWebhook{}) + fuzzValidator[infrav1.OpenStackMachineTemplate](t, "OpenStackMachineTemplate", &openStackMachineTemplateWebhook{}) } func Test_FuzzServerWebhook(t *testing.T) { - fuzzCustomValidator[infrav1alpha1.OpenStackServer](t, "OpenStackServer", &openStackServerWebhook{}) + fuzzValidator[infrav1alpha1.OpenStackServer](t, "OpenStackServer", &openStackServerWebhook{}) } diff --git a/pkg/webhooks/openstackcluster_webhook.go b/pkg/webhooks/openstackcluster_webhook.go index 936da8c6a..e885ff82a 100644 --- a/pkg/webhooks/openstackcluster_webhook.go +++ b/pkg/webhooks/openstackcluster_webhook.go @@ -21,52 +21,34 @@ import ( "fmt" "reflect" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) -// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackcluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackclusters,versions=v1beta1,name=validation.openstackcluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackcluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackclusters,versions=v1beta2,name=validation.openstackcluster.v1beta2.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1 +// SetupOpenStackClusterWebhook registers the validating webhook for OpenStackCluster with the manager. func SetupOpenStackClusterWebhook(mgr manager.Manager) error { - return builder.WebhookManagedBy(mgr). - For(&infrav1.OpenStackCluster{}). + return builder.WebhookManagedBy(mgr, &infrav1.OpenStackCluster{}). WithValidator(&openStackClusterWebhook{}). Complete() } type openStackClusterWebhook struct{} -// Compile-time assertion that openStackClusterWebhook implements webhook.CustomValidator. -var _ webhook.CustomValidator = &openStackClusterWebhook{} +var _ admission.Validator[*infrav1.OpenStackCluster] = &openStackClusterWebhook{} -// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackClusterWebhook) ValidateCreate(_ context.Context, objRaw runtime.Object) (admission.Warnings, error) { +// ValidateCreate implements admission.Validator so a webhook will be registered for the type. +func (*openStackClusterWebhook) ValidateCreate(_ context.Context, newObj *infrav1.OpenStackCluster) (admission.Warnings, error) { var allErrs field.ErrorList - newObj, err := castToOpenStackCluster(objRaw) - if err != nil { - return nil, err - } - if newObj.Spec.ManagedSecurityGroups != nil { - for _, rule := range newObj.Spec.ManagedSecurityGroups.AllNodesSecurityGroupRules { - if rule.RemoteManagedGroups != nil && (rule.RemoteGroupID != nil || rule.RemoteIPPrefix != nil) { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "managedSecurityGroups", "allNodesSecurityGroupRules"), "remoteManagedGroups cannot be used with remoteGroupID or remoteIPPrefix")) - } - if rule.RemoteGroupID != nil && (rule.RemoteManagedGroups != nil || rule.RemoteIPPrefix != nil) { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "managedSecurityGroups", "allNodesSecurityGroupRules"), "remoteGroupID cannot be used with remoteManagedGroups or remoteIPPrefix")) - } - if rule.RemoteIPPrefix != nil && (rule.RemoteManagedGroups != nil || rule.RemoteGroupID != nil) { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "managedSecurityGroups", "allNodesSecurityGroupRules"), "remoteIPPrefix cannot be used with remoteManagedGroups or remoteGroupID")) - } - } + allErrs = append(allErrs, validateManagedSecurityGroupRules(newObj.Spec.ManagedSecurityGroups)...) } return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) @@ -126,17 +108,9 @@ func allowSubnetFilterToIDTransition(oldObj, newObj *infrav1.OpenStackCluster) b return true } -// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObjRaw, newObjRaw runtime.Object) (admission.Warnings, error) { //nolint:gocyclo,cyclop +// ValidateUpdate implements admission.Validator so a webhook will be registered for the type. +func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObj, newObj *infrav1.OpenStackCluster) (admission.Warnings, error) { //nolint:gocyclo,cyclop var allErrs field.ErrorList - oldObj, err := castToOpenStackCluster(oldObjRaw) - if err != nil { - return nil, err - } - newObj, err := castToOpenStackCluster(newObjRaw) - if err != nil { - return nil, err - } // Allow changes to Spec.IdentityRef oldObj.Spec.IdentityRef = infrav1.OpenStackIdentityReference{} @@ -151,7 +125,7 @@ func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new newObj.Spec.ControlPlaneEndpoint = nil } - // Allow change only for the first time. + // Allow APIServerFixedIP to be set for the first time when floating IP is disabled. if ptr.Deref(oldObj.Spec.DisableAPIServerFloatingIP, false) && ptr.Deref(oldObj.Spec.APIServerFixedIP, "") == "" { oldObj.Spec.APIServerFixedIP = nil newObj.Spec.APIServerFixedIP = nil @@ -173,6 +147,11 @@ func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new oldObj.Spec.Bastion = &infrav1.Bastion{} newObj.Spec.Bastion = &infrav1.Bastion{} + // Validate new security group rules before zeroing them out for immutability comparison. + if newObj.Spec.ManagedSecurityGroups != nil { + allErrs = append(allErrs, validateManagedSecurityGroupRules(newObj.Spec.ManagedSecurityGroups)...) + } + // Allow changes to the managed securityGroupRules. if newObj.Spec.ManagedSecurityGroups != nil { if oldObj.Spec.ManagedSecurityGroups == nil { @@ -193,24 +172,27 @@ func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new newObj.Spec.ManagedSecurityGroups.AllowAllInClusterTraffic = false } - // Allow changes only to DNSNameservers in ManagedSubnets spec + // Allow changes only to DNSNameservers in ManagedSubnets spec. + // Subnets are matched by CIDR: the CIDR itself and AllocationPools are + // immutable, but DNSNameservers can be updated. We zero out DNSNameservers + // on both copies so the final DeepEqual ignores those changes. if newObj.Spec.ManagedSubnets != nil && oldObj.Spec.ManagedSubnets != nil { - // Check if any fields other than DNSNameservers have changed + // Check if any fields other than DNSNameservers have changed. if len(oldObj.Spec.ManagedSubnets) != len(newObj.Spec.ManagedSubnets) { allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "managedSubnets"), "cannot add or remove subnets")) } else { - // Build maps of subnets by CIDR + // Build maps of subnets by CIDR. oldSubnetMap := make(map[string]*infrav1.SubnetSpec) - for i := range oldObj.Spec.ManagedSubnets { oldSubnet := &oldObj.Spec.ManagedSubnets[i] oldSubnetMap[oldSubnet.CIDR] = oldSubnet } - // Check if all new subnets have matching old subnets with the same CIDR + // Compare each new subnet against the old map by CIDR. for i := range newObj.Spec.ManagedSubnets { newSubnet := &newObj.Spec.ManagedSubnets[i] + // If the CIDR is not found in the old map, it's a new subnet. oldSubnet, exists := oldSubnetMap[newSubnet.CIDR] if !exists { allErrs = append(allErrs, field.Forbidden( @@ -220,7 +202,7 @@ func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new continue } - // DNSNameservers is mutable + // Zero out DNSNameservers on both copies so they are ignored by DeepEqual. oldSubnet.DNSNameservers = nil newSubnet.DNSNameservers = nil } @@ -254,20 +236,21 @@ func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new oldObj.Spec.APIServerFloatingIP = nil } - // Allow changes from filter to id for spec.network and spec.subnets + // Allow transitioning spec.network from filter to id and spec.subnets from + // filter to id. This lets users pin to resolved IDs after initial creation. if newObj.Spec.Network != nil && oldObj.Spec.Network != nil && oldObj.Status.Network != nil { - // Allow change from spec.network.subnets from filter to id if it matches the current subnets. if allowSubnetFilterToIDTransition(oldObj, newObj) { oldObj.Spec.Subnets = nil newObj.Spec.Subnets = nil } - // Allow change from spec.network.filter to spec.network.id only if it matches the current network. if ptr.Deref(newObj.Spec.Network.ID, "") == oldObj.Status.Network.ID { newObj.Spec.Network = nil oldObj.Spec.Network = nil } } + // After zeroing out all mutable fields above, any remaining difference + // in spec is an immutability violation. if !reflect.DeepEqual(oldObj.Spec, newObj.Spec) { allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "cannot be modified")) } @@ -275,15 +258,34 @@ func (*openStackClusterWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackClusterWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) { +// ValidateDelete implements admission.Validator so a webhook will be registered for the type. +func (*openStackClusterWebhook) ValidateDelete(_ context.Context, _ *infrav1.OpenStackCluster) (admission.Warnings, error) { return nil, nil } -func castToOpenStackCluster(obj runtime.Object) (*infrav1.OpenStackCluster, error) { - cast, ok := obj.(*infrav1.OpenStackCluster) - if !ok { - return nil, fmt.Errorf("expected an OpenStackCluster but got a %T", obj) - } - return cast, nil +// securityGroupRemoteFields returns whether each remote field is set on a SecurityGroupRuleSpec. +func securityGroupRemoteFields(r *infrav1.SecurityGroupRuleSpec) (bool, bool, bool) { + return r.RemoteManagedGroups != nil, r.RemoteGroupID != nil, r.RemoteIPPrefix != nil +} + +// validateManagedSecurityGroupRules validates that remote* fields are mutually exclusive +// across all security group rule lists in ManagedSecurityGroups. +func validateManagedSecurityGroupRules(msg *infrav1.ManagedSecurityGroups) field.ErrorList { + var allErrs field.ErrorList + allErrs = append(allErrs, validateSecurityGroupRulesRemoteMutualExclusion( + msg.AllNodesSecurityGroupRules, + field.NewPath("spec", "managedSecurityGroups", "allNodesSecurityGroupRules"), + securityGroupRemoteFields, + )...) + allErrs = append(allErrs, validateSecurityGroupRulesRemoteMutualExclusion( + msg.ControlPlaneNodesSecurityGroupRules, + field.NewPath("spec", "managedSecurityGroups", "controlPlaneNodesSecurityGroupRules"), + securityGroupRemoteFields, + )...) + allErrs = append(allErrs, validateSecurityGroupRulesRemoteMutualExclusion( + msg.WorkerNodesSecurityGroupRules, + field.NewPath("spec", "managedSecurityGroups", "workerNodesSecurityGroupRules"), + securityGroupRemoteFields, + )...) + return allErrs } diff --git a/pkg/webhooks/openstackcluster_webhook_test.go b/pkg/webhooks/openstackcluster_webhook_test.go index 7ff7bcdba..7d374be7f 100644 --- a/pkg/webhooks/openstackcluster_webhook_test.go +++ b/pkg/webhooks/openstackcluster_webhook_test.go @@ -23,19 +23,19 @@ import ( . "github.com/onsi/gomega" //nolint:revive "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) func TestOpenStackCluster_ValidateUpdate(t *testing.T) { tests := []struct { - name string - oldTemplate *infrav1.OpenStackCluster - newTemplate *infrav1.OpenStackCluster - wantErr bool + name string + oldCluster *infrav1.OpenStackCluster + newCluster *infrav1.OpenStackCluster + wantErr bool }{ { name: "Changing OpenStackCluster.Spec.IdentityRef.Name is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -43,7 +43,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobarbaz", @@ -55,7 +55,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing OpenStackCluster.Spec.IdentityRef.CloudName is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -63,7 +63,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -75,7 +75,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing OpenStackCluster.Spec.Bastion is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -99,7 +99,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -122,7 +122,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing security group rules on the OpenStackCluster.Spec.ManagedSecurityGroups.AllNodesSecurityGroupRules is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -142,7 +142,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -166,7 +166,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing security group rules on the OpenStackCluster.Spec.ManagedSecurityGroups.ControlPlaneNodesSecurityGroupRules is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -186,7 +186,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -210,7 +210,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing security group rules on the OpenStackCluster.Spec.ManagedSecurityGroups.WorkerNodesSecurityGroupRules is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -230,7 +230,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -252,9 +252,42 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, wantErr: false, }, + { + name: "Mutually exclusive security group rule fields on update are rejected", + oldCluster: &infrav1.OpenStackCluster{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "foobar", + CloudName: "foobar", + }, + ManagedSecurityGroups: &infrav1.ManagedSecurityGroups{}, + }, + }, + newCluster: &infrav1.OpenStackCluster{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "foobar", + CloudName: "foobar", + }, + ManagedSecurityGroups: &infrav1.ManagedSecurityGroups{ + AllNodesSecurityGroupRules: []infrav1.SecurityGroupRuleSpec{ + { + Name: "bad-rule", + Protocol: ptr.To("tcp"), + PortRangeMin: ptr.To(80), + PortRangeMax: ptr.To(80), + RemoteManagedGroups: []infrav1.ManagedSecurityGroupName{"controlplane"}, + RemoteGroupID: ptr.To("some-group-id"), + }, + }, + }, + }, + }, + wantErr: true, + }, { name: "Changing CIDRs on the OpenStackCluster.Spec.APIServerLoadBalancer.AllowedCIDRs is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -269,7 +302,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -289,7 +322,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Adding OpenStackCluster.Spec.ControlPlaneAvailabilityZones is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -297,7 +330,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -313,7 +346,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Modifying OpenStackCluster.Spec.ControlPlaneAvailabilityZones is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -325,7 +358,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -342,7 +375,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Removing OpenStackCluster.Spec.ControlPlaneAvailabilityZones is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -354,7 +387,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -366,7 +399,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Modifying OpenstackCluster.Spec.ControlPlaneOmitAvailabilityZone is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -374,7 +407,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -387,7 +420,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing OpenStackCluster.Spec.APIServerFixedIP is allowed when API Server Floating IP is disabled", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -396,7 +429,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { DisableAPIServerFloatingIP: ptr.To(true), }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -410,7 +443,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing OpenStackCluster.Spec.APIServerFixedIP is not allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -419,7 +452,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { DisableAPIServerFloatingIP: ptr.To(false), }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -434,7 +467,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { { name: "Changing OpenStackCluster.Spec.APIServerPort is allowed when API Server Floating IP is disabled", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -443,7 +476,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { DisableAPIServerFloatingIP: ptr.To(true), }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ DisableAPIServerFloatingIP: ptr.To(true), APIServerPort: ptr.To(uint16(8443)), @@ -453,7 +486,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing OpenStackCluster.Spec.APIServerPort is not allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -462,7 +495,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { DisableAPIServerFloatingIP: ptr.To(false), }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -476,7 +509,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing OpenStackCluster.Spec.APIServerFloatingIP is allowed when it matches the current api server loadbalancer IP", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -489,7 +522,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -507,7 +540,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing OpenStackCluster.Spec.APIServerFloatingIP is not allowed when it doesn't matches the current api server loadbalancer IP", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -520,7 +553,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -538,7 +571,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Removing OpenStackCluster.Spec.Bastion when it is enabled is not allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -557,7 +590,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -569,7 +602,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Removing OpenStackCluster.Spec.Bastion when it is disabled is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -588,7 +621,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -600,7 +633,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Switching OpenStackCluster.Spec.Network from filter.name to id is allowed when they refer to the same network", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -621,7 +654,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -644,7 +677,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Switching OpenStackCluster.Spec.Network from filter.name to id is not allowed when they refer to different networks", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -665,7 +698,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -688,7 +721,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Switching OpenStackCluster.Spec.Subnets from filter.name to id is allowed when they refer to the same subnet", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -720,7 +753,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -754,7 +787,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Switching OpenStackCluster.Spec.Subnets from filter.name to id is not allowed when they refer to different subnets", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -786,7 +819,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -820,7 +853,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Switching one OpenStackCluster.Spec.Subnets entry from filter to a mismatched ID (from another subnet) should be rejected, even if other subnets remain unchanged", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -861,7 +894,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -905,7 +938,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { { name: "Changing OpenStackCluster.Spec.ManagedSubnets.DNSNameservers is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -928,7 +961,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -955,7 +988,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Adding new DNSNameserver to OpenStackCluster.Spec.ManagedSubnets.DNSNameservers is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -977,7 +1010,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1004,7 +1037,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Removing DNSNameservers from OpenStackCluster.Spec.ManagedSubnets is allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1027,7 +1060,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1051,7 +1084,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Multiple subnets with DNSNameservers changes are allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1085,7 +1118,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1123,7 +1156,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Changing CIDR in OpenStackCluster.Spec.ManagedSubnets is not allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1145,7 +1178,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1171,7 +1204,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Modifying AllocationPools in OpenStackCluster.Spec.ManagedSubnets is not allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1193,7 +1226,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1219,7 +1252,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Adding a new subnet to OpenStackCluster.Spec.ManagedSubnets is not allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1241,7 +1274,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1279,7 +1312,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, { name: "Removing a subnet from OpenStackCluster.Spec.ManagedSubnets is not allowed", - oldTemplate: &infrav1.OpenStackCluster{ + oldCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1313,7 +1346,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { }, }, }, - newTemplate: &infrav1.OpenStackCluster{ + newCluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1344,7 +1377,7 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { ctx := context.TODO() webhook := &openStackClusterWebhook{} - warn, err := webhook.ValidateUpdate(ctx, tt.oldTemplate, tt.newTemplate) + warn, err := webhook.ValidateUpdate(ctx, tt.oldCluster, tt.newCluster) if tt.wantErr { g.Expect(err).To(HaveOccurred()) } else { @@ -1358,13 +1391,13 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { func TestOpenStackCluster_ValidateCreate(t *testing.T) { tests := []struct { - name string - template *infrav1.OpenStackCluster - wantErr bool + name string + cluster *infrav1.OpenStackCluster + wantErr bool }{ { name: "OpenStackCluster.Spec.IdentityRef with correct spec on create", - template: &infrav1.OpenStackCluster{ + cluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1376,7 +1409,7 @@ func TestOpenStackCluster_ValidateCreate(t *testing.T) { }, { name: "OpenStackCluster.Spec.ManagedSecurityGroups.AllNodesSecurityGroupRules with correct spec on create", - template: &infrav1.OpenStackCluster{ + cluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1399,7 +1432,7 @@ func TestOpenStackCluster_ValidateCreate(t *testing.T) { }, { name: "OpenStackCluster.Spec.ManagedSecurityGroups.AllNodesSecurityGroupRules with mutually exclusive fields on create", - template: &infrav1.OpenStackCluster{ + cluster: &infrav1.OpenStackCluster{ Spec: infrav1.OpenStackClusterSpec{ IdentityRef: infrav1.OpenStackIdentityReference{ Name: "foobar", @@ -1422,6 +1455,54 @@ func TestOpenStackCluster_ValidateCreate(t *testing.T) { }, wantErr: true, }, + { + name: "ControlPlane security group rules with mutually exclusive fields on create", + cluster: &infrav1.OpenStackCluster{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "foobar", + CloudName: "foobar", + }, + ManagedSecurityGroups: &infrav1.ManagedSecurityGroups{ + ControlPlaneNodesSecurityGroupRules: []infrav1.SecurityGroupRuleSpec{ + { + Name: "bad-cp-rule", + Protocol: ptr.To("tcp"), + PortRangeMin: ptr.To(443), + PortRangeMax: ptr.To(443), + RemoteManagedGroups: []infrav1.ManagedSecurityGroupName{"controlplane"}, + RemoteIPPrefix: ptr.To("10.0.0.0/8"), + }, + }, + }, + }, + }, + wantErr: true, + }, + { + name: "Worker security group rules with mutually exclusive fields on create", + cluster: &infrav1.OpenStackCluster{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "foobar", + CloudName: "foobar", + }, + ManagedSecurityGroups: &infrav1.ManagedSecurityGroups{ + WorkerNodesSecurityGroupRules: []infrav1.SecurityGroupRuleSpec{ + { + Name: "bad-worker-rule", + Protocol: ptr.To("tcp"), + PortRangeMin: ptr.To(80), + PortRangeMax: ptr.To(80), + RemoteGroupID: ptr.To("some-group"), + RemoteIPPrefix: ptr.To("10.0.0.0/8"), + }, + }, + }, + }, + }, + wantErr: true, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1429,7 +1510,7 @@ func TestOpenStackCluster_ValidateCreate(t *testing.T) { ctx := context.TODO() webhook := &openStackClusterWebhook{} - warn, err := webhook.ValidateCreate(ctx, tt.template) + warn, err := webhook.ValidateCreate(ctx, tt.cluster) if tt.wantErr { g.Expect(err).To(HaveOccurred()) } else { diff --git a/pkg/webhooks/openstackclustertemplate_webhook.go b/pkg/webhooks/openstackclustertemplate_webhook.go index b82f510ca..bbc0fc2b8 100644 --- a/pkg/webhooks/openstackclustertemplate_webhook.go +++ b/pkg/webhooks/openstackclustertemplate_webhook.go @@ -18,54 +18,38 @@ package webhooks import ( "context" - "fmt" "reflect" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/builder" + "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) -// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackclustertemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackclustertemplates,versions=v1beta1,name=validation.openstackclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackclustertemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackclustertemplates,versions=v1beta2,name=validation.openstackclustertemplate.v1beta2.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1 -func SetupOpenStackClusterTemplateWebhook(mgr ctrl.Manager) error { - return ctrl.NewWebhookManagedBy(mgr). - For(&infrav1.OpenStackClusterTemplate{}). +func SetupOpenStackClusterTemplateWebhook(mgr manager.Manager) error { + return builder.WebhookManagedBy(mgr, &infrav1.OpenStackClusterTemplate{}). WithValidator(&openStackClusterTemplateWebhook{}). Complete() } type openStackClusterTemplateWebhook struct{} -// Compile-time assertion that openStackClusterTemplateWebhook implements webhook.CustomValidator. -var _ webhook.CustomValidator = &openStackClusterTemplateWebhook{} +var _ admission.Validator[*infrav1.OpenStackClusterTemplate] = &openStackClusterTemplateWebhook{} -// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackClusterTemplateWebhook) ValidateCreate(_ context.Context, objRaw runtime.Object) (admission.Warnings, error) { +// ValidateCreate implements admission.Validator so a webhook will be registered for the type. +func (*openStackClusterTemplateWebhook) ValidateCreate(_ context.Context, newObj *infrav1.OpenStackClusterTemplate) (admission.Warnings, error) { var allErrs field.ErrorList - newObj, err := castToOpenStackClusterTemplate(objRaw) - if err != nil { - return nil, err - } return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackClusterTemplateWebhook) ValidateUpdate(_ context.Context, oldObjRaw, newObjRaw runtime.Object) (admission.Warnings, error) { +// ValidateUpdate implements admission.Validator so a webhook will be registered for the type. +func (*openStackClusterTemplateWebhook) ValidateUpdate(_ context.Context, oldObj, newObj *infrav1.OpenStackClusterTemplate) (admission.Warnings, error) { var allErrs field.ErrorList - oldObj, err := castToOpenStackClusterTemplate(oldObjRaw) - if err != nil { - return nil, err - } - newObj, err := castToOpenStackClusterTemplate(newObjRaw) - if err != nil { - return nil, err - } if !reflect.DeepEqual(newObj.Spec.Template.Spec, oldObj.Spec.Template.Spec) { allErrs = append(allErrs, @@ -76,15 +60,7 @@ func (*openStackClusterTemplateWebhook) ValidateUpdate(_ context.Context, oldObj return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackClusterTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) { +// ValidateDelete implements admission.Validator so a webhook will be registered for the type. +func (*openStackClusterTemplateWebhook) ValidateDelete(_ context.Context, _ *infrav1.OpenStackClusterTemplate) (admission.Warnings, error) { return nil, nil } - -func castToOpenStackClusterTemplate(obj runtime.Object) (*infrav1.OpenStackClusterTemplate, error) { - cast, ok := obj.(*infrav1.OpenStackClusterTemplate) - if !ok { - return nil, fmt.Errorf("expected an OpenStackClusterTemplate but got a %T", obj) - } - return cast, nil -} diff --git a/pkg/webhooks/openstackclustertemplate_webhook_test.go b/pkg/webhooks/openstackclustertemplate_webhook_test.go new file mode 100644 index 000000000..582f45dd3 --- /dev/null +++ b/pkg/webhooks/openstackclustertemplate_webhook_test.go @@ -0,0 +1,109 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package webhooks + +import ( + "context" + "testing" + + . "github.com/onsi/gomega" //nolint:revive + "k8s.io/utils/ptr" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +func TestOpenStackClusterTemplate_ValidateUpdate(t *testing.T) { + tests := []struct { + name string + oldTemplate *infrav1.OpenStackClusterTemplate + newTemplate *infrav1.OpenStackClusterTemplate + wantErr bool + }{ + { + name: "Changing spec.template.spec is not allowed", + oldTemplate: &infrav1.OpenStackClusterTemplate{ + Spec: infrav1.OpenStackClusterTemplateSpec{ + Template: infrav1.OpenStackClusterTemplateResource{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "foobar", + CloudName: "foobar", + }, + }, + }, + }, + }, + newTemplate: &infrav1.OpenStackClusterTemplate{ + Spec: infrav1.OpenStackClusterTemplateSpec{ + Template: infrav1.OpenStackClusterTemplateResource{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "changed", + CloudName: "foobar", + }, + DisableAPIServerFloatingIP: ptr.To(true), + }, + }, + }, + }, + wantErr: true, + }, + { + name: "No change to spec.template.spec is allowed", + oldTemplate: &infrav1.OpenStackClusterTemplate{ + Spec: infrav1.OpenStackClusterTemplateSpec{ + Template: infrav1.OpenStackClusterTemplateResource{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "foobar", + CloudName: "foobar", + }, + }, + }, + }, + }, + newTemplate: &infrav1.OpenStackClusterTemplate{ + Spec: infrav1.OpenStackClusterTemplateSpec{ + Template: infrav1.OpenStackClusterTemplateResource{ + Spec: infrav1.OpenStackClusterSpec{ + IdentityRef: infrav1.OpenStackIdentityReference{ + Name: "foobar", + CloudName: "foobar", + }, + }, + }, + }, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + ctx := context.TODO() + + webhook := &openStackClusterTemplateWebhook{} + warn, err := webhook.ValidateUpdate(ctx, tt.oldTemplate, tt.newTemplate) + if tt.wantErr { + g.Expect(err).To(HaveOccurred()) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + g.Expect(warn).To(BeEmpty()) + }) + } +} diff --git a/pkg/webhooks/openstackmachine_webhook.go b/pkg/webhooks/openstackmachine_webhook.go index 601fef647..a71be3d62 100644 --- a/pkg/webhooks/openstackmachine_webhook.go +++ b/pkg/webhooks/openstackmachine_webhook.go @@ -27,37 +27,30 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) -// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackmachine,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackmachines,versions=v1beta1,name=validation.openstackmachine.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackmachine,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackmachines,versions=v1beta2,name=validation.openstackmachine.v1beta2.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1 func SetupOpenStackMachineWebhook(mgr manager.Manager) error { - return builder.WebhookManagedBy(mgr). - For(&infrav1.OpenStackMachine{}). + return builder.WebhookManagedBy(mgr, &infrav1.OpenStackMachine{}). WithValidator(&openStackMachineWebhook{}). Complete() } type openStackMachineWebhook struct{} -// Compile-time assertion that openStackMachineWebhook implements webhook.CustomValidator. -var _ webhook.CustomValidator = &openStackMachineWebhook{} +var _ admission.Validator[*infrav1.OpenStackMachine] = &openStackMachineWebhook{} -// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackMachineWebhook) ValidateCreate(_ context.Context, objRaw runtime.Object) (admission.Warnings, error) { +// ValidateCreate implements admission.Validator so a webhook will be registered for the type. +func (*openStackMachineWebhook) ValidateCreate(_ context.Context, newObj *infrav1.OpenStackMachine) (admission.Warnings, error) { var allErrs field.ErrorList - newObj, err := castToOpenStackMachine(objRaw) - if err != nil { - return nil, err - } if newObj.Spec.RootVolume != nil && newObj.Spec.AdditionalBlockDevices != nil { for _, device := range newObj.Spec.AdditionalBlockDevices { - if device.Name == "root" { + if device.Name == rootVolumeName { allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "additionalBlockDevices"), "cannot contain a device named \"root\" when rootVolume is set")) } } @@ -72,20 +65,15 @@ func (*openStackMachineWebhook) ValidateCreate(_ context.Context, objRaw runtime return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackMachineWebhook) ValidateUpdate(_ context.Context, oldObjRaw, newObjRaw runtime.Object) (admission.Warnings, error) { - newObj, err := castToOpenStackMachine(newObjRaw) - if err != nil { - return nil, err - } - +// ValidateUpdate implements admission.Validator so a webhook will be registered for the type. +func (*openStackMachineWebhook) ValidateUpdate(_ context.Context, oldObj, newObj *infrav1.OpenStackMachine) (admission.Warnings, error) { newOpenStackMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(newObj) if err != nil { return nil, apierrors.NewInvalid(infrav1.SchemeGroupVersion.WithKind("OpenStackMachine").GroupKind(), newObj.Name, field.ErrorList{ field.InternalError(nil, fmt.Errorf("failed to convert new OpenStackMachine to unstructured object: %w", err)), }) } - oldOpenStackMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(oldObjRaw) + oldOpenStackMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(oldObj) if err != nil { return nil, apierrors.NewInvalid(infrav1.SchemeGroupVersion.WithKind("OpenStackMachine").GroupKind(), newObj.Name, field.ErrorList{ field.InternalError(nil, fmt.Errorf("failed to convert old OpenStackMachine to unstructured object: %w", err)), @@ -94,8 +82,18 @@ func (*openStackMachineWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new var allErrs field.ErrorList - newOpenStackMachineSpec := newOpenStackMachine["spec"].(map[string]interface{}) - oldOpenStackMachineSpec := oldOpenStackMachine["spec"].(map[string]interface{}) + newOpenStackMachineSpec, ok := newOpenStackMachine["spec"].(map[string]interface{}) + if !ok { + return nil, apierrors.NewInvalid(infrav1.SchemeGroupVersion.WithKind("OpenStackMachine").GroupKind(), newObj.Name, field.ErrorList{ + field.InternalError(nil, fmt.Errorf("new OpenStackMachine spec is not a map")), + }) + } + oldOpenStackMachineSpec, ok := oldOpenStackMachine["spec"].(map[string]interface{}) + if !ok { + return nil, apierrors.NewInvalid(infrav1.SchemeGroupVersion.WithKind("OpenStackMachine").GroupKind(), newObj.Name, field.ErrorList{ + field.InternalError(nil, fmt.Errorf("old OpenStackMachine spec is not a map")), + }) + } // allow changes to providerID once if oldOpenStackMachineSpec["providerID"] == nil { @@ -109,7 +107,7 @@ func (*openStackMachineWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new delete(newOpenStackMachineSpec, "instanceID") } - // allow changes to identifyRef + // allow changes to identityRef delete(oldOpenStackMachineSpec, "identityRef") delete(newOpenStackMachineSpec, "identityRef") @@ -120,15 +118,7 @@ func (*openStackMachineWebhook) ValidateUpdate(_ context.Context, oldObjRaw, new return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackMachineWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) { +// ValidateDelete implements admission.Validator so a webhook will be registered for the type. +func (*openStackMachineWebhook) ValidateDelete(_ context.Context, _ *infrav1.OpenStackMachine) (admission.Warnings, error) { return nil, nil } - -func castToOpenStackMachine(obj runtime.Object) (*infrav1.OpenStackMachine, error) { - cast, ok := obj.(*infrav1.OpenStackMachine) - if !ok { - return nil, fmt.Errorf("expected an OpenStackMachine but got a %T", obj) - } - return cast, nil -} diff --git a/pkg/webhooks/openstackmachine_webhook_test.go b/pkg/webhooks/openstackmachine_webhook_test.go new file mode 100644 index 000000000..a08552862 --- /dev/null +++ b/pkg/webhooks/openstackmachine_webhook_test.go @@ -0,0 +1,218 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package webhooks + +import ( + "context" + "testing" + + . "github.com/onsi/gomega" //nolint:revive + "k8s.io/utils/ptr" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" +) + +func TestOpenStackMachine_ValidateCreate(t *testing.T) { + tests := []struct { + name string + machine *infrav1.OpenStackMachine + wantErr bool + }{ + { + name: "RootVolume and AdditionalBlockDevices with conflicting name", + machine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + RootVolume: &infrav1.RootVolume{ + SizeGiB: 50, + }, + AdditionalBlockDevices: []infrav1.AdditionalBlockDevice{ + { + Name: "root", + SizeGiB: 10, + }, + }, + }, + }, + wantErr: true, + }, + { + name: "Port security disabled with security groups", + machine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + Ports: []infrav1.PortOpts{ + { + SecurityGroups: []infrav1.SecurityGroupParam{{ID: ptr.To("sg-1")}}, + ResolvedPortSpecFields: infrav1.ResolvedPortSpecFields{ + DisablePortSecurity: ptr.To(true), + }, + }, + }, + }, + }, + wantErr: true, + }, + { + name: "Valid machine spec", + machine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + }, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + ctx := context.TODO() + + webhook := &openStackMachineWebhook{} + warn, err := webhook.ValidateCreate(ctx, tt.machine) + if tt.wantErr { + g.Expect(err).To(HaveOccurred()) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + g.Expect(warn).To(BeEmpty()) + }) + } +} + +func TestOpenStackMachine_ValidateUpdate(t *testing.T) { + tests := []struct { + name string + oldMachine *infrav1.OpenStackMachine + newMachine *infrav1.OpenStackMachine + wantErr bool + }{ + { + name: "ProviderID is immutable once set", + oldMachine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + ProviderID: ptr.To("openstack:///old-id"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + }, + }, + newMachine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + ProviderID: ptr.To("openstack:///new-id"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + }, + }, + wantErr: true, + }, + { + name: "ProviderID can be set for the first time", + oldMachine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + }, + }, + newMachine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + ProviderID: ptr.To("openstack:///new-id"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + }, + }, + wantErr: false, + }, + { + name: "IdentityRef change is allowed", + oldMachine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + IdentityRef: &infrav1.OpenStackIdentityReference{ + Name: "old-ref", + CloudName: "old-cloud", + }, + }, + }, + newMachine: &infrav1.OpenStackMachine{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + IdentityRef: &infrav1.OpenStackIdentityReference{ + Name: "new-ref", + CloudName: "new-cloud", + }, + }, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + ctx := context.TODO() + + webhook := &openStackMachineWebhook{} + warn, err := webhook.ValidateUpdate(ctx, tt.oldMachine, tt.newMachine) + if tt.wantErr { + g.Expect(err).To(HaveOccurred()) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + g.Expect(warn).To(BeEmpty()) + }) + } +} diff --git a/pkg/webhooks/openstackmachinetemplate_webhook.go b/pkg/webhooks/openstackmachinetemplate_webhook.go index 0e3b972b5..3f76a2eef 100644 --- a/pkg/webhooks/openstackmachinetemplate_webhook.go +++ b/pkg/webhooks/openstackmachinetemplate_webhook.go @@ -22,38 +22,29 @@ import ( "reflect" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/cluster-api/util/topology" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) -// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-openstackmachinetemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackmachinetemplates,versions=v1beta1,name=validation.openstackmachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-openstackmachinetemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackmachinetemplates,versions=v1beta2,name=validation.openstackmachinetemplate.v1beta2.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1 func SetupOpenStackMachineTemplateWebhook(mgr manager.Manager) error { - return builder.WebhookManagedBy(mgr). - For(&infrav1.OpenStackMachineTemplate{}). + return builder.WebhookManagedBy(mgr, &infrav1.OpenStackMachineTemplate{}). WithValidator(&openStackMachineTemplateWebhook{}). Complete() } type openStackMachineTemplateWebhook struct{} -// Compile-time assertion that openStackMachineTemplateWebhook implements webhook.CustomValidator. -var _ webhook.CustomValidator = &openStackMachineTemplateWebhook{} - -// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackMachineTemplateWebhook) ValidateCreate(_ context.Context, objRaw runtime.Object) (admission.Warnings, error) { - newObj, err := castToOpenStackMachineTemplate(objRaw) - if err != nil { - return nil, err - } +var _ admission.Validator[*infrav1.OpenStackMachineTemplate] = &openStackMachineTemplateWebhook{} +// ValidateCreate implements admission.Validator so a webhook will be registered for the type. +func (*openStackMachineTemplateWebhook) ValidateCreate(_ context.Context, newObj *infrav1.OpenStackMachineTemplate) (admission.Warnings, error) { var allErrs field.ErrorList if newObj.Spec.Template.Spec.ProviderID != nil { @@ -63,18 +54,9 @@ func (*openStackMachineTemplateWebhook) ValidateCreate(_ context.Context, objRaw return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldObjRaw, newObjRaw runtime.Object) (admission.Warnings, error) { +// ValidateUpdate implements admission.Validator so a webhook will be registered for the type. +func (*openStackMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj *infrav1.OpenStackMachineTemplate) (admission.Warnings, error) { var allErrs field.ErrorList - oldObj, err := castToOpenStackMachineTemplate(oldObjRaw) - if err != nil { - return nil, err - } - - newObj, err := castToOpenStackMachineTemplate(newObjRaw) - if err != nil { - return nil, err - } req, err := admission.RequestFromContext(ctx) if err != nil { @@ -91,15 +73,7 @@ func (*openStackMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldO return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackMachineTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) { +// ValidateDelete implements admission.Validator so a webhook will be registered for the type. +func (*openStackMachineTemplateWebhook) ValidateDelete(_ context.Context, _ *infrav1.OpenStackMachineTemplate) (admission.Warnings, error) { return nil, nil } - -func castToOpenStackMachineTemplate(obj runtime.Object) (*infrav1.OpenStackMachineTemplate, error) { - cast, ok := obj.(*infrav1.OpenStackMachineTemplate) - if !ok { - return nil, fmt.Errorf("expected an OpenStackMachineTemplate but got a %T", obj) - } - return cast, nil -} diff --git a/pkg/webhooks/openstackmachinetemplate_webhook_test.go b/pkg/webhooks/openstackmachinetemplate_webhook_test.go index 62ac98318..2bed4fd07 100644 --- a/pkg/webhooks/openstackmachinetemplate_webhook_test.go +++ b/pkg/webhooks/openstackmachinetemplate_webhook_test.go @@ -27,9 +27,70 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) +func TestOpenStackMachineTemplate_ValidateCreate(t *testing.T) { + tests := []struct { + name string + template *infrav1.OpenStackMachineTemplate + wantErr bool + }{ + { + name: "ProviderID is forbidden on create", + template: &infrav1.OpenStackMachineTemplate{ + Spec: infrav1.OpenStackMachineTemplateSpec{ + Template: infrav1.OpenStackMachineTemplateResource{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + ProviderID: ptr.To("openstack:///some-id"), + }, + }, + }, + }, + wantErr: true, + }, + { + name: "Valid template on create", + template: &infrav1.OpenStackMachineTemplate{ + Spec: infrav1.OpenStackMachineTemplateSpec{ + Template: infrav1.OpenStackMachineTemplateResource{ + Spec: infrav1.OpenStackMachineSpec{ + Flavor: ptr.To("m1.small"), + Image: infrav1.ImageParam{ + Filter: &infrav1.ImageFilter{ + Name: ptr.To("ubuntu"), + }, + }, + }, + }, + }, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + ctx := context.TODO() + + webhook := &openStackMachineTemplateWebhook{} + warn, err := webhook.ValidateCreate(ctx, tt.template) + if tt.wantErr { + g.Expect(err).To(HaveOccurred()) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + g.Expect(warn).To(BeEmpty()) + }) + } +} + func TestOpenStackMachineTemplate_ValidateUpdate(t *testing.T) { g := NewWithT(t) diff --git a/pkg/webhooks/openstackserver_webhook.go b/pkg/webhooks/openstackserver_webhook.go index 24bb17ea7..583a072e9 100644 --- a/pkg/webhooks/openstackserver_webhook.go +++ b/pkg/webhooks/openstackserver_webhook.go @@ -28,38 +28,32 @@ import ( "sigs.k8s.io/cluster-api/util/topology" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) // +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-openstackserver,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=openstackservers,versions=v1alpha1,name=validation.openstackserver.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1 func SetupOpenStackServerWebhook(mgr manager.Manager) error { - return builder.WebhookManagedBy(mgr). - For(&infrav1alpha1.OpenStackServer{}). + return builder.WebhookManagedBy(mgr, &infrav1alpha1.OpenStackServer{}). WithValidator(&openStackServerWebhook{}). Complete() } type openStackServerWebhook struct{} -// Compile-time assertion that openStackServerWebhook implements webhook.CustomValidator. -var _ webhook.CustomValidator = &openStackServerWebhook{} +// Compile-time assertion that openStackServerWebhook implements admission.Validator. +var _ admission.Validator[*infrav1alpha1.OpenStackServer] = &openStackServerWebhook{} -// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackServerWebhook) ValidateCreate(_ context.Context, objRaw runtime.Object) (admission.Warnings, error) { +// ValidateCreate implements admission.Validator so a webhook will be registered for the type. +func (*openStackServerWebhook) ValidateCreate(_ context.Context, newObj *infrav1alpha1.OpenStackServer) (admission.Warnings, error) { var allErrs field.ErrorList - newObj, err := castToOpenStackServer(objRaw) - if err != nil { - return nil, err - } if newObj.Spec.RootVolume != nil && newObj.Spec.AdditionalBlockDevices != nil { for _, device := range newObj.Spec.AdditionalBlockDevices { - if device.Name == "root" { + if device.Name == rootVolumeName { allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "additionalBlockDevices"), "cannot contain a device named \"root\" when rootVolume is set")) } } @@ -74,18 +68,8 @@ func (*openStackServerWebhook) ValidateCreate(_ context.Context, objRaw runtime. return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackServerWebhook) ValidateUpdate(ctx context.Context, oldObjRaw, newObjRaw runtime.Object) (admission.Warnings, error) { - oldObj, err := castToOpenStackServer(oldObjRaw) - if err != nil { - return nil, err - } - - newObj, err := castToOpenStackServer(newObjRaw) - if err != nil { - return nil, err - } - +// ValidateUpdate implements admission.Validator so a webhook will be registered for the type. +func (*openStackServerWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj *infrav1alpha1.OpenStackServer) (admission.Warnings, error) { req, err := admission.RequestFromContext(ctx) if err != nil { return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a admission.Request inside context: %v", err)) @@ -97,7 +81,7 @@ func (*openStackServerWebhook) ValidateUpdate(ctx context.Context, oldObjRaw, ne field.InternalError(nil, fmt.Errorf("failed to convert new OpenStackServer to unstructured object: %w", err)), }) } - oldOpenStackServer, err := runtime.DefaultUnstructuredConverter.ToUnstructured(oldObjRaw) + oldOpenStackServer, err := runtime.DefaultUnstructuredConverter.ToUnstructured(oldObj) if err != nil { return nil, apierrors.NewInvalid(infrav1.SchemeGroupVersion.WithKind("OpenStackServer").GroupKind(), newObj.Name, field.ErrorList{ field.InternalError(nil, fmt.Errorf("failed to convert old OpenStackServer to unstructured object: %w", err)), @@ -123,15 +107,7 @@ func (*openStackServerWebhook) ValidateUpdate(ctx context.Context, oldObjRaw, ne return aggregateObjErrors(newObj.GroupVersionKind().GroupKind(), newObj.Name, allErrs) } -// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type. -func (*openStackServerWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) { +// ValidateDelete implements admission.Validator so a webhook will be registered for the type. +func (*openStackServerWebhook) ValidateDelete(_ context.Context, _ *infrav1alpha1.OpenStackServer) (admission.Warnings, error) { return nil, nil } - -func castToOpenStackServer(obj runtime.Object) (*infrav1alpha1.OpenStackServer, error) { - cast, ok := obj.(*infrav1alpha1.OpenStackServer) - if !ok { - return nil, fmt.Errorf("expected an OpenStackServer but got a %T", obj) - } - return cast, nil -} diff --git a/pkg/webhooks/register.go b/pkg/webhooks/register.go index b2b7fd13d..13fadea40 100644 --- a/pkg/webhooks/register.go +++ b/pkg/webhooks/register.go @@ -20,17 +20,12 @@ import ( "fmt" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/builder" - "sigs.k8s.io/controller-runtime/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/manager" - - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" ) func RegisterAllWithManager(mgr manager.Manager) []error { var errs []error - // Register webhooks for all types with custom validators. for _, webhook := range []struct { name string setup func(ctrl.Manager) error @@ -46,19 +41,5 @@ func RegisterAllWithManager(mgr manager.Manager) []error { } } - // Additionally register webhooks for other types so they get conversion webhooks. - for _, conversionOnlyType := range []conversion.Hub{ - &infrav1.OpenStackClusterList{}, - &infrav1.OpenStackClusterTemplateList{}, - &infrav1.OpenStackMachineList{}, - &infrav1.OpenStackMachineTemplateList{}, - } { - if err := builder.WebhookManagedBy(mgr). - For(conversionOnlyType). - Complete(); err != nil { - errs = append(errs, fmt.Errorf("creating webhook for %T: %v", conversionOnlyType, err)) - } - } - return errs } diff --git a/pkg/webhooks/validation_helpers.go b/pkg/webhooks/validation_helpers.go new file mode 100644 index 000000000..c03881802 --- /dev/null +++ b/pkg/webhooks/validation_helpers.go @@ -0,0 +1,51 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package webhooks + +import ( + "k8s.io/apimachinery/pkg/util/validation/field" +) + +const rootVolumeName = "root" + +// validateSecurityGroupRulesRemoteMutualExclusion validates that remote* fields +// are mutually exclusive in security group rules. The getRemoteFields function +// extracts whether each remote field is set from a rule of any version. +func validateSecurityGroupRulesRemoteMutualExclusion[T any]( + rules []T, + fldPath *field.Path, + getRemoteFields func(*T) (hasRemoteManagedGroups, hasRemoteGroupID, hasRemoteIPPrefix bool), +) field.ErrorList { + var allErrs field.ErrorList + for i := range rules { + hasRMG, hasRGID, hasRIP := getRemoteFields(&rules[i]) + count := 0 + if hasRMG { + count++ + } + if hasRGID { + count++ + } + if hasRIP { + count++ + } + if count > 1 { + allErrs = append(allErrs, field.Forbidden(fldPath.Index(i), "only one of remoteManagedGroups, remoteGroupID, or remoteIPPrefix can be set")) + } + } + return allErrs +} diff --git a/releasenotes/v0.12.6.md b/releasenotes/v0.12.6.md new file mode 100644 index 000000000..a1d39164d --- /dev/null +++ b/releasenotes/v0.12.6.md @@ -0,0 +1,54 @@ +## Changes since v0.12.5 +## :chart_with_upwards_trend: Overview +- 16 new commits merged +- 2 bugs fixed 🐛 + +## :bug: Bug Fixes +- Allow changing DNSNameservers in subnet config for OpenstackCluster (#2721) +- Remove invalid kustomizeconfig from config/webhook (#2852) + +## :seedling: Others +- Add bnallapeta to reviewers (#2849) +- Add Moshiur as reviewer (#2771) +- Bump go to 1.24.9 (#2786) +- Migrate CI to stable/2025.2 (#2813) +- Refactor generate-codegen (#2762) +- Remove mdbooth as a maintainer (#2760) + +## Dependencies + +### Added +- github.com/gkampitakis/ciinfo: [v0.3.2](https://github.com/gkampitakis/ciinfo/tree/v0.3.2) +- github.com/gkampitakis/go-diff: [v1.3.2](https://github.com/gkampitakis/go-diff/tree/v1.3.2) +- github.com/gkampitakis/go-snaps: [v0.5.15](https://github.com/gkampitakis/go-snaps/tree/v0.5.15) +- github.com/goccy/go-yaml: [v1.18.0](https://github.com/goccy/go-yaml/tree/v1.18.0) +- github.com/joshdk/go-junit: [v1.0.0](https://github.com/joshdk/go-junit/tree/v1.0.0) +- github.com/maruel/natural: [v1.1.1](https://github.com/maruel/natural/tree/v1.1.1) +- github.com/mfridman/tparse: [v0.18.0](https://github.com/mfridman/tparse/tree/v0.18.0) +- github.com/tidwall/gjson: [v1.18.0](https://github.com/tidwall/gjson/tree/v1.18.0) +- github.com/tidwall/match: [v1.1.1](https://github.com/tidwall/match/tree/v1.1.1) +- github.com/tidwall/pretty: [v1.2.1](https://github.com/tidwall/pretty/tree/v1.2.1) +- github.com/tidwall/sjson: [v1.2.5](https://github.com/tidwall/sjson/tree/v1.2.5) + +### Changed +- github.com/gophercloud/gophercloud/v2: [v2.8.0 → v2.9.0](https://github.com/gophercloud/gophercloud/compare/v2.8.0...v2.9.0) +- github.com/onsi/ginkgo/v2: [v2.25.2 → v2.27.2](https://github.com/onsi/ginkgo/compare/v2.25.2...v2.27.2) +- github.com/prometheus/client_golang: [v1.23.0 → v1.23.2](https://github.com/prometheus/client_golang/compare/v1.23.0...v1.23.2) +- github.com/prometheus/common: [v0.65.0 → v0.66.1](https://github.com/prometheus/common/compare/v0.65.0...v0.66.1) +- github.com/rogpeppe/go-internal: [v1.12.0 → v1.13.1](https://github.com/rogpeppe/go-internal/compare/v1.12.0...v1.13.1) +- github.com/spf13/pflag: [v1.0.9 → v1.0.10](https://github.com/spf13/pflag/compare/v1.0.9...v1.0.10) +- github.com/stretchr/testify: [v1.10.0 → v1.11.1](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1) +- google.golang.org/protobuf: v1.36.7 → v1.36.8 +- k8s.io/api: v0.31.12 → v0.31.14 +- k8s.io/apiextensions-apiserver: v0.31.12 → v0.31.14 +- k8s.io/apimachinery: v0.31.12 → v0.31.14 +- k8s.io/apiserver: v0.31.12 → v0.31.14 +- k8s.io/client-go: v0.31.12 → v0.31.14 +- k8s.io/code-generator: v0.31.12 → v0.31.14 +- k8s.io/component-base: v0.31.12 → v0.31.14 +- k8s.io/kms: v0.31.12 → v0.31.14 + +### Removed +- github.com/prashantv/gostub: [v1.1.0](https://github.com/prashantv/gostub/tree/v1.1.0) + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.12.7.md b/releasenotes/v0.12.7.md new file mode 100644 index 000000000..8e905b246 --- /dev/null +++ b/releasenotes/v0.12.7.md @@ -0,0 +1,20 @@ +# Changes since v0.12.6 + +## :chart_with_upwards_trend: Overview + +- 9 new commits merged + +## :seedling: Others + +- Bump go to 1.24.11 (#2881) +- E2E: Use bucket for flatcar production image (#2928) +- Exclude govulncheck from verify target (#2900) + +### Changed + +- github.com/gophercloud/gophercloud/v2: [v2.9.0 → v2.10.0](https://github.com/gophercloud/gophercloud/compare/v2.9.0...v2.10.0) +- github.com/hashicorp/go-version: [v1.7.0 → v1.8.0](https://github.com/hashicorp/go-version/compare/v1.7.0...v1.8.0) +- github.com/onsi/ginkgo/v2: [v2.27.2 → v2.27.5](https://github.com/onsi/ginkgo/compare/v2.27.2...v2.27.5) +- gopkg.in/ini.v1: v1.67.0 → v1.67.1 + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.13.1.md b/releasenotes/v0.13.1.md new file mode 100644 index 000000000..69728eabd --- /dev/null +++ b/releasenotes/v0.13.1.md @@ -0,0 +1,70 @@ +# Changes since v0.13.0 + +## :chart_with_upwards_trend: Overview + +- 19 new commits merged +- 2 bugs fixed 🐛 + +## :bug: Bug Fixes + +- Remove invalid kustomizeconfig from config/webhook (#2851) +- Uplift go to address CVEs (#2765) + +## :seedling: Others + +- Add bnallapeta to reviewers (#2847) +- Add Moshiur as reviewer (#2769) +- Bump go to 1.24.9 (#2788) +- Bump go version to 1.24.7 (#2719) +- Migrate CI to stable/2025.2 (#2812) +- Remove mdbooth as a maintainer (#2759) + +## Dependencies + +### Added + +- github.com/gkampitakis/ciinfo: [v0.3.2](https://github.com/gkampitakis/ciinfo/tree/v0.3.2) +- github.com/gkampitakis/go-diff: [v1.3.2](https://github.com/gkampitakis/go-diff/tree/v1.3.2) +- github.com/gkampitakis/go-snaps: [v0.5.15](https://github.com/gkampitakis/go-snaps/tree/v0.5.15) +- github.com/goccy/go-yaml: [v1.18.0](https://github.com/goccy/go-yaml/tree/v1.18.0) +- github.com/joshdk/go-junit: [v1.0.0](https://github.com/joshdk/go-junit/tree/v1.0.0) +- github.com/maruel/natural: [v1.1.1](https://github.com/maruel/natural/tree/v1.1.1) +- github.com/mfridman/tparse: [v0.18.0](https://github.com/mfridman/tparse/tree/v0.18.0) +- github.com/tidwall/gjson: [v1.18.0](https://github.com/tidwall/gjson/tree/v1.18.0) +- github.com/tidwall/match: [v1.1.1](https://github.com/tidwall/match/tree/v1.1.1) +- github.com/tidwall/pretty: [v1.2.1](https://github.com/tidwall/pretty/tree/v1.2.1) +- github.com/tidwall/sjson: [v1.2.5](https://github.com/tidwall/sjson/tree/v1.2.5) + +### Changed + +- github.com/coredns/corefile-migration: [v1.0.27 → v1.0.29](https://github.com/coredns/corefile-migration/compare/v1.0.27...v1.0.29) +- github.com/gophercloud/gophercloud/v2: [v2.8.0 → v2.9.0](https://github.com/gophercloud/gophercloud/compare/v2.8.0...v2.9.0) +- github.com/hashicorp/go-version: [v1.7.0 → v1.8.0](https://github.com/hashicorp/go-version/compare/v1.7.0...v1.8.0) +- github.com/k-orc/openstack-resource-controller/v2: [v2.2.0 → v2.3.0](https://github.com/k-orc/openstack-resource-controller/compare/v2.2.0...v2.3.0) +- github.com/onsi/ginkgo/v2: [v2.25.3 → v2.27.2](https://github.com/onsi/ginkgo/compare/v2.25.3...v2.27.2) +- github.com/ulikunitz/xz: [v0.5.12 → v0.5.15](https://github.com/ulikunitz/xz/compare/v0.5.12...v0.5.15) +- golang.org/x/crypto: v0.42.0 → v0.45.0 +- golang.org/x/mod: v0.27.0 → v0.29.0 +- golang.org/x/net: v0.43.0 → v0.47.0 +- golang.org/x/sync: v0.17.0 → v0.18.0 +- golang.org/x/sys: v0.36.0 → v0.38.0 +- golang.org/x/telemetry: 1a19826 → 078029d +- golang.org/x/term: v0.35.0 → v0.37.0 +- golang.org/x/text: v0.29.0 → v0.31.0 +- golang.org/x/tools: v0.36.0 → v0.38.0 +- k8s.io/api: v0.33.4 → v0.33.6 +- k8s.io/apiextensions-apiserver: v0.33.4 → v0.33.6 +- k8s.io/apimachinery: v0.33.4 → v0.33.6 +- k8s.io/apiserver: v0.33.4 → v0.33.6 +- k8s.io/client-go: v0.33.4 → v0.33.6 +- k8s.io/code-generator: v0.33.4 → v0.33.6 +- k8s.io/component-base: v0.33.4 → v0.33.6 +- k8s.io/kms: v0.33.4 → v0.33.6 +- sigs.k8s.io/cluster-api/test: v1.11.1 → v1.11.3 +- sigs.k8s.io/cluster-api: v1.11.1 → v1.11.3 + +### Removed + +- github.com/prashantv/gostub: [v1.1.0](https://github.com/prashantv/gostub/tree/v1.1.0) + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.13.2.md b/releasenotes/v0.13.2.md new file mode 100644 index 000000000..2fea9d949 --- /dev/null +++ b/releasenotes/v0.13.2.md @@ -0,0 +1,34 @@ +## Highlights + +**NOTE:** Pervious releases of v0.13 (v0.13.0 and v0.13.1) incorrectly +advertised v1beta2 contract support in the metadata.yaml. This has been fixed in +this version. CAPO v0.13 does NOT fully implement v1beta2 and CAPI will in fact +use v1beta1 with it. We do however test CAPI's v1beta2 API and it works well +together with CAPO since there is still backwards compatibility with the v1beta1 +contract. + +## Changes since v0.13.1 +## :chart_with_upwards_trend: Overview +- 6 new commits merged +- 2 bugs fixed 🐛 + +## :bug: Bug Fixes +- Codegen: Remove sigs.k8s.io/cluster-api/api/ipam/v1beta1 (#2884) +- Revert v1beta2 contract (#2905) + +## :seedling: Others +- Bump go version to 1.24.11 (#2879) +- Do not run golanci-lint update on PRs (#2904) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.13.3.md b/releasenotes/v0.13.3.md new file mode 100644 index 000000000..1e95b4be7 --- /dev/null +++ b/releasenotes/v0.13.3.md @@ -0,0 +1,31 @@ +# Changes since v0.13.2 + +## :chart_with_upwards_trend: Overview + +- 4 new commits merged + +## :seedling: Others + +- Bump golang version to 1.24.12 (#2956) +- E2E: Use bucket for flatcar production image (#2926) + +### Changed + +- github.com/gophercloud/gophercloud/v2: [v2.9.0 → v2.10.0](https://github.com/gophercloud/gophercloud/compare/v2.9.0...v2.10.0) +- github.com/onsi/ginkgo/v2: [v2.27.3 → v2.27.5](https://github.com/onsi/ginkgo/compare/v2.27.3...v2.27.5) +- github.com/onsi/gomega: [v1.38.3 → v1.39.0](https://github.com/onsi/gomega/compare/v1.38.3...v1.39.0) +- golang.org/x/crypto: v0.46.0 → v0.47.0 +- golang.org/x/mod: v0.30.0 → v0.31.0 +- golang.org/x/net: v0.47.0 → v0.48.0 +- golang.org/x/sys: v0.39.0 → v0.40.0 +- golang.org/x/telemetry: bc8e575 → 8fff8a5 +- golang.org/x/term: v0.38.0 → v0.39.0 +- golang.org/x/text: v0.32.0 → v0.33.0 +- golang.org/x/tools: v0.39.0 → v0.40.0 +- gopkg.in/ini.v1: v1.67.0 → v1.67.1 + +### Removed + +_Nothing has changed._ + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.13.4.md b/releasenotes/v0.13.4.md new file mode 100644 index 000000000..27350088a --- /dev/null +++ b/releasenotes/v0.13.4.md @@ -0,0 +1,71 @@ +## Changes since v0.13.3 +## :chart_with_upwards_trend: Overview +- 11 new commits merged + +## :seedling: Others +- Add nikParasyr to reviewers (#2972) +- Bump golang version to 1.24.13 (#2998) +- Bump opentelemetry dependencies (#3017) + +## Dependencies + +### Added +- github.com/cenkalti/backoff/v5: [v5.0.3](https://github.com/cenkalti/backoff/tree/v5.0.3) +- github.com/go-jose/go-jose/v4: [v4.1.3](https://github.com/go-jose/go-jose/tree/v4.1.3) +- github.com/spiffe/go-spiffe/v2: [v2.6.0](https://github.com/spiffe/go-spiffe/tree/v2.6.0) +- gonum.org/v1/gonum: v0.16.0 + +### Changed +- cel.dev/expr: v0.19.1 → v0.24.0 +- cloud.google.com/go/compute/metadata: v0.6.0 → v0.9.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.25.0 → v1.30.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.25.0...detectors/gcp/v1.30.0) +- github.com/cncf/xds/go: [cff3c89 → 0feb691](https://github.com/cncf/xds/compare/cff3c89...0feb691) +- github.com/coredns/corefile-migration: [v1.0.29 → v1.0.30](https://github.com/coredns/corefile-migration/compare/v1.0.29...v1.0.30) +- github.com/envoyproxy/go-control-plane/envoy: [v1.32.4 → v1.35.0](https://github.com/envoyproxy/go-control-plane/compare/envoy/v1.32.4...envoy/v1.35.0) +- github.com/envoyproxy/go-control-plane: [v0.13.4 → 75eaa19](https://github.com/envoyproxy/go-control-plane/compare/v0.13.4...75eaa19) +- github.com/golang/glog: [v1.2.4 → v1.2.5](https://github.com/golang/glog/compare/v1.2.4...v1.2.5) +- github.com/google/pprof: [27863c8 → 294ebfa](https://github.com/google/pprof/compare/27863c8...294ebfa) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.24.0 → v2.27.7](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.24.0...v2.27.7) +- github.com/ianlancetaylor/demangle: [bd984b5 → f615e6b](https://github.com/ianlancetaylor/demangle/compare/bd984b5...f615e6b) +- github.com/onsi/ginkgo/v2: [v2.27.5 → v2.28.1](https://github.com/onsi/ginkgo/compare/v2.27.5...v2.28.1) +- github.com/onsi/gomega: [v1.39.0 → v1.39.1](https://github.com/onsi/gomega/compare/v1.39.0...v1.39.1) +- github.com/rogpeppe/go-internal: [v1.13.1 → v1.14.1](https://github.com/rogpeppe/go-internal/compare/v1.13.1...v1.14.1) +- go.opentelemetry.io/auto/sdk: v1.1.0 → v1.2.1 +- go.opentelemetry.io/contrib/detectors/gcp: v1.34.0 → v1.38.0 +- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: v0.58.0 → v0.65.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.33.0 → v1.40.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.33.0 → v1.40.0 +- go.opentelemetry.io/otel/metric: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel/sdk/metric: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel/sdk: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel/trace: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel: v1.34.0 → v1.40.0 +- go.opentelemetry.io/proto/otlp: v1.4.0 → v1.9.0 +- golang.org/x/crypto: v0.47.0 → v0.48.0 +- golang.org/x/mod: v0.31.0 → v0.32.0 +- golang.org/x/net: v0.48.0 → v0.49.0 +- golang.org/x/oauth2: v0.30.0 → v0.34.0 +- golang.org/x/sys: v0.40.0 → v0.41.0 +- golang.org/x/telemetry: 8fff8a5 → bd525da +- golang.org/x/term: v0.39.0 → v0.40.0 +- golang.org/x/text: v0.33.0 → v0.34.0 +- golang.org/x/tools: v0.40.0 → v0.41.0 +- google.golang.org/genproto/googleapis/api: 5f5ef82 → 8636f87 +- google.golang.org/genproto/googleapis/rpc: 1a7da9e → 8636f87 +- google.golang.org/grpc: v1.71.3 → v1.78.0 +- google.golang.org/protobuf: v1.36.8 → v1.36.11 +- k8s.io/api: v0.33.7 → v0.33.8 +- k8s.io/apiextensions-apiserver: v0.33.7 → v0.33.8 +- k8s.io/apimachinery: v0.33.7 → v0.33.8 +- k8s.io/apiserver: v0.33.7 → v0.33.8 +- k8s.io/client-go: v0.33.7 → v0.33.8 +- k8s.io/code-generator: v0.33.7 → v0.33.8 +- k8s.io/component-base: v0.33.7 → v0.33.8 +- k8s.io/kms: v0.33.7 → v0.33.8 +- sigs.k8s.io/cluster-api/test: v1.11.4 → v1.11.6 +- sigs.k8s.io/cluster-api: v1.11.4 → v1.11.6 + +### Removed +_Nothing has changed._ + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.13.5.md b/releasenotes/v0.13.5.md new file mode 100644 index 000000000..ea3e959df --- /dev/null +++ b/releasenotes/v0.13.5.md @@ -0,0 +1,48 @@ +# Highlights + +## Changes since v0.13.4 + +## :chart_with_upwards_trend: Overview + +- 8 new commits merged + +## :seedling: Others + +- Bump google.golang.org/grpc to v1.79.3 (#3072) +- Set GOTOOLCHAIN in Makefile (#3069) +- Update Trivy version to 0.69.3 (#3070) +- Uplift go 1.25.8 (#3052) + +## Dependencies + +### Added + +- sigs.k8s.io/structured-merge-diff/v6: v6.3.2 + +### Changed + +- cel.dev/expr: v0.24.0 → v0.25.1 +- github.com/cloudflare/circl: [v1.6.1 → v1.6.3](https://github.com/cloudflare/circl/compare/v1.6.1...v1.6.3) +- github.com/cncf/xds/go: [0feb691 → ee656c7](https://github.com/cncf/xds/compare/0feb691...ee656c7) +- github.com/envoyproxy/go-control-plane/envoy: [v1.35.0 → v1.36.0](https://github.com/envoyproxy/go-control-plane/compare/envoy/v1.35.0...envoy/v1.36.0) +- github.com/envoyproxy/go-control-plane: [75eaa19 → v0.14.0](https://github.com/envoyproxy/go-control-plane/compare/75eaa19...v0.14.0) +- github.com/envoyproxy/protoc-gen-validate: [v1.2.1 → v1.3.0](https://github.com/envoyproxy/protoc-gen-validate/compare/v1.2.1...v1.3.0) +- go.opentelemetry.io/contrib/detectors/gcp: v1.38.0 → v1.39.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp: v1.22.0 → v1.40.0 +- google.golang.org/grpc: v1.78.0 → v1.79.3 +- k8s.io/api: v0.33.8 → v0.33.9 +- k8s.io/apiextensions-apiserver: v0.33.8 → v0.33.9 +- k8s.io/apimachinery: v0.33.8 → v0.33.10 +- k8s.io/apiserver: v0.33.8 → v0.33.9 +- k8s.io/client-go: v0.33.8 → v0.33.9 +- k8s.io/code-generator: v0.33.8 → v0.33.9 +- k8s.io/component-base: v0.33.8 → v0.33.9 +- k8s.io/kms: v0.33.8 → v0.33.9 +- sigs.k8s.io/cluster-api/test: v1.11.6 → v1.11.7 +- sigs.k8s.io/cluster-api: v1.11.6 → v1.11.7 + +### Removed + +_Nothing has changed._ + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.14.0-alpha.0.md b/releasenotes/v0.14.0-alpha.0.md new file mode 100644 index 000000000..fbbb6a6a7 --- /dev/null +++ b/releasenotes/v0.14.0-alpha.0.md @@ -0,0 +1,201 @@ +🚨 This is a ALPHA RELEASE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/new). +

+More details about the release + +:warning: **ALPHA RELEASE NOTES** :warning: + +## Deprecation Warning + +The following fields are deprecated and will be removed in a future release: +- OpenStackMachine and OpenStackCluster `status.ready`. +- OpenStackMachine and OpenStackCluster `status.failureReason` and `status.failureMessage`. + +See these issues for more information: +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2374 +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2375 + +## Changes since v0.13.1 +## :chart_with_upwards_trend: Overview +- 97 new commits merged +- 7 feature additions ✨ +- 8 bugs fixed 🐛 + +## :sparkles: New Features +- Add OpenStackClusterIdentity for centralized credential management (#2682) +- Add PriorityQueue feature flag (#2823) +- CAPI v1beta2 conditions and deprecations for OSC (#2832) +- CAPI v1beta2 conditions and deprecations for OSM (#2872) +- Implement CRD migration (#2810) +- Switch to CAPI v1beta2 for manifests (#2717) +- Update Cluster API to v1.12.0 (#2873) + +## :bug: Bug Fixes +- Allow setting disablePortSecurity on OSM port (#2784) +- Correction of issue #2617 selected fixed subnet not applied (#2639) +- Define subnetID on LB member when networks differ (#2799) +- Ensure pool member reach active state (#2815) +- Fixes out-of-range bug when multiple ports are passed to getSGControlPlaneAdditionalPorts (#2677) +- Remove invalid kustomizeconfig from config/webhook (#2850) +- Revert v1beta2 contract (#2883) +- Uplift go 1.24.8 to address security issue (#2764) + +## :seedling: Others +- Add AGENTS.md (#2807) +- Add bastion and allowedCIDR to dev-test clusterclass (#2725) +- Add bnallapeta to reviewers (#2794) +- Add entry of new release branch for security scan (#2703) +- Add entry of new release branch to depandabot (#2692) +- Add github workflow for pull request to have github approval (#2743) +- Add link check in PR to improve docs (#2741) +- Add missing hash in github workflow (#2731) +- Add Moshiur as reviewer (#2768) +- Add new config to pr-link check (#2876) +- Add PR title verify workflow for CAPO (#2728) +- Add yamlling workflow to check yaml files in pull request (#2845) +- Bump cloudbuild image (#2691) +- Bump e2e to use k8s v1.34.2 (#2836) +- Bump go to 1.24.9 (#2787) +- Bump go version to 1.24.11 (#2877) +- Bump go version to 1.24.7 (#2718) +- Bump golanci-lint to v2.7.2 (#2894) +- Bump golangci-lint to v2.6.1 (#2825) +- Bump golangci-lint to v2.6.2 (#2858) +- Cmd: strip out symbol table & DWARF debugging info (#2750) +- Dependabot: Hold crypto on release-0.12, unify spacing (#2709) +- Dockerfile: add the ARG defaulting within the Dockerfile (#2751) +- Don't run golanci-lint update on PRs (#2659) +- E2E: Add quick-start test using ClusterClass (#2793) +- E2E: Cleanup upgrade patches (#2831) +- E2E: Fix log collection for machines (#2795) +- E2E: Fix the CCM patch for the v1beta1 cluster-template (#2766) +- E2E: Run clusterctl upgrade from v0.13 (#2714) +- E2E: Use kind cluster for clusterctl upgrade tests (#2792) +- E2E: Use secret instead of host path for CCM config (#2744) +- Exclude `openshift` dir from boilerplate (#2901) +- Fix calcualtion of previous tag for release note generation (#2860) +- Fix release note generation (#2688) +- Fix release notes generation (#2846) +- Fix update-golangci-lint permissions (#2748) +- Fix URL for downloading gotestsum based on OS (#2684) +- Hold x/text since it requires go1.24 (#2740) +- Migrate CI to stable/2025.2 (#2809) +- Pin kustomize on release-0.12 (#2772) +- Refactor generate-codegen (#2761) +- Release automation workflow (#2791) +- Remove dependabot config and workflows for release-0.11 (#2779) +- Remove mdbooth as a maintainer (#2727) +- Set osc lb status when default networks are used (#2798) +- Update depandabot ignore list for release-0.12 (#2882) +- Update golangci lint v2.5.0 (#2752) +- Update log verbosity level according to CAPI (#2785) +- Uplift go 1.24.6 to address security issue (#2708) +- Release v0.13.1 (#2871) + +:book: Additionally, there have been 5 contributions to our documentation and book. (#2720, #2802, #2878, #2906, #2908) + +## Dependencies + +### Added +- github.com/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4) +- github.com/golang-jwt/jwt/v5: [v5.2.2](https://github.com/golang-jwt/jwt/tree/v5.2.2) +- github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus: [v1.0.1](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/providers/prometheus/v1.0.1) +- github.com/grpc-ecosystem/go-grpc-middleware/v2: [v2.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v2.3.0) +- github.com/olekukonko/cat: [50322a0](https://github.com/olekukonko/cat/tree/50322a0) +- github.com/olekukonko/errors: [v1.1.0](https://github.com/olekukonko/errors/tree/v1.1.0) +- github.com/olekukonko/ll: [v0.1.1](https://github.com/olekukonko/ll/tree/v0.1.1) +- github.com/olekukonko/ts: [78ecb04](https://github.com/olekukonko/ts/tree/78ecb04) +- github.com/spiffe/go-spiffe/v2: [v2.5.0](https://github.com/spiffe/go-spiffe/tree/v2.5.0) +- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0) +- go.etcd.io/raft/v3: v3.6.0 +- sigs.k8s.io/structured-merge-diff/v6: v6.3.0 + +### Changed +- cel.dev/expr: v0.19.1 → v0.24.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.25.0 → v1.26.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.25.0...detectors/gcp/v1.26.0) +- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578) +- github.com/docker/docker: [v28.3.3+incompatible → v28.5.2+incompatible](https://github.com/docker/docker/compare/v28.3.3...v28.5.2) +- github.com/docker/go-connections: [v0.5.0 → v0.6.0](https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0) +- github.com/emicklei/go-restful/v3: [v3.12.2 → v3.13.0](https://github.com/emicklei/go-restful/compare/v3.12.2...v3.13.0) +- github.com/fsnotify/fsnotify: [v1.8.0 → v1.9.0](https://github.com/fsnotify/fsnotify/compare/v1.8.0...v1.9.0) +- github.com/fxamacker/cbor/v2: [v2.7.0 → v2.9.0](https://github.com/fxamacker/cbor/compare/v2.7.0...v2.9.0) +- github.com/google/cel-go: [v0.23.2 → v0.26.0](https://github.com/google/cel-go/compare/v0.23.2...v0.26.0) +- github.com/google/gnostic-models: [v0.6.9 → v0.7.0](https://github.com/google/gnostic-models/compare/v0.6.9...v0.7.0) +- github.com/google/pprof: [27863c8 → f64d9cf](https://github.com/google/pprof/compare/27863c8...f64d9cf) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.24.0 → v2.26.3](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.24.0...v2.26.3) +- github.com/ianlancetaylor/demangle: [bd984b5 → f615e6b](https://github.com/ianlancetaylor/demangle/compare/bd984b5...f615e6b) +- github.com/jonboulle/clockwork: [v0.4.0 → v0.5.0](https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0) +- github.com/mattn/go-colorable: [v0.1.13 → v0.1.14](https://github.com/mattn/go-colorable/compare/v0.1.13...v0.1.14) +- github.com/mattn/go-runewidth: [v0.0.14 → v0.0.16](https://github.com/mattn/go-runewidth/compare/v0.0.14...v0.0.16) +- github.com/modern-go/reflect2: [v1.0.2 → 35a7c28](https://github.com/modern-go/reflect2/compare/v1.0.2...35a7c28) +- github.com/olekukonko/tablewriter: [v0.0.5 → v1.0.9](https://github.com/olekukonko/tablewriter/compare/v0.0.5...v1.0.9) +- github.com/pelletier/go-toml/v2: [v2.2.3 → v2.2.4](https://github.com/pelletier/go-toml/compare/v2.2.3...v2.2.4) +- github.com/rivo/uniseg: [v0.4.2 → v0.4.7](https://github.com/rivo/uniseg/compare/v0.4.2...v0.4.7) +- github.com/sagikazarmark/locafero: [v0.7.0 → v0.11.0](https://github.com/sagikazarmark/locafero/compare/v0.7.0...v0.11.0) +- github.com/sourcegraph/conc: [v0.3.0 → 5f936ab](https://github.com/sourcegraph/conc/compare/v0.3.0...5f936ab) +- github.com/spf13/afero: [v1.12.0 → v1.15.0](https://github.com/spf13/afero/compare/v1.12.0...v1.15.0) +- github.com/spf13/cast: [v1.7.1 → v1.10.0](https://github.com/spf13/cast/compare/v1.7.1...v1.10.0) +- github.com/spf13/cobra: [v1.9.1 → v1.10.1](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1) +- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0) +- go.etcd.io/bbolt: v1.3.11 → v1.4.2 +- go.etcd.io/etcd/api/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/pkg/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/pkg/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/server/v3: v3.5.21 → v3.6.4 +- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.58.0 → v0.60.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/metric: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel/trace: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel: v1.34.0 → v1.35.0 +- go.opentelemetry.io/proto/otlp: v1.4.0 → v1.5.0 +- go.uber.org/zap: v1.27.0 → v1.27.1 +- golang.org/x/oauth2: v0.30.0 → v0.33.0 +- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef +- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef +- google.golang.org/grpc: v1.71.3 → v1.72.3 +- k8s.io/api: v0.33.6 → v0.34.2 +- k8s.io/apiextensions-apiserver: v0.33.6 → v0.34.2 +- k8s.io/apimachinery: v0.33.6 → v0.34.2 +- k8s.io/apiserver: v0.33.6 → v0.34.2 +- k8s.io/client-go: v0.33.6 → v0.34.2 +- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.2 +- k8s.io/code-generator: v0.33.6 → v0.34.2 +- k8s.io/component-base: v0.33.6 → v0.34.2 +- k8s.io/gengo/v2: 1244d31 → 85fd79d +- k8s.io/kms: v0.33.6 → v0.34.2 +- k8s.io/kube-openapi: 8b98d1e → f3f2b99 +- sigs.k8s.io/cluster-api/test: v1.11.3 → v1.12.0 +- sigs.k8s.io/cluster-api: v1.11.3 → v1.12.0 +- sigs.k8s.io/controller-runtime: v0.21.0 → v0.22.4 +- sigs.k8s.io/json: 9aa6b5e → cfa47c3 + +### Removed +- cloud.google.com/go/auth/oauth2adapt: v0.2.6 +- cloud.google.com/go/auth: v0.13.0 +- cloud.google.com/go/iam: v1.2.2 +- cloud.google.com/go/monitoring: v1.21.2 +- cloud.google.com/go/storage: v1.49.0 +- cloud.google.com/go: v0.116.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/exporter/metric/v0.48.1) +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/internal/resourcemapping/v0.48.1) +- github.com/census-instrumentation/opencensus-proto: [v0.4.1](https://github.com/census-instrumentation/opencensus-proto/tree/v0.4.1) +- github.com/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2) +- github.com/golang/groupcache: [41bb18b](https://github.com/golang/groupcache/tree/41bb18b) +- github.com/google/s2a-go: [v0.1.8](https://github.com/google/s2a-go/tree/v0.1.8) +- github.com/googleapis/enterprise-certificate-proxy: [v0.3.4](https://github.com/googleapis/enterprise-certificate-proxy/tree/v0.3.4) +- github.com/googleapis/gax-go/v2: [v2.14.1](https://github.com/googleapis/gax-go/tree/v2.14.1) +- github.com/grpc-ecosystem/go-grpc-middleware: [v1.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v1.3.0) +- github.com/grpc-ecosystem/grpc-gateway: [v1.16.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0) +- github.com/kr/fs: [v0.1.0](https://github.com/kr/fs/tree/v0.1.0) +- github.com/pkg/sftp: [v1.13.7](https://github.com/pkg/sftp/tree/v1.13.7) +- go.etcd.io/etcd/client/v2: v2.305.21 +- go.etcd.io/etcd/raft/v3: v3.5.21 +- go.opencensus.io: v0.24.0 +- go.uber.org/atomic: v1.9.0 +- google.golang.org/api: v0.215.0 +- google.golang.org/genproto: e639e21 + +
+
+_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.14.0-alpha.1.md b/releasenotes/v0.14.0-alpha.1.md new file mode 100644 index 000000000..4ba007806 --- /dev/null +++ b/releasenotes/v0.14.0-alpha.1.md @@ -0,0 +1,207 @@ +🚨 This is a ALPHA RELEASE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/new). +
+More details about the release + +:warning: **ALPHA RELEASE NOTES** :warning: + +## Deprecation Warning + +The following fields are deprecated and will be removed in a future release: +- OpenStackMachine and OpenStackCluster `status.ready`. +- OpenStackMachine and OpenStackCluster `status.failureReason` and `status.failureMessage`. + +See these issues for more information: +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2374 +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2375 + +## Changes since v0.13.2 +## :chart_with_upwards_trend: Overview +- 104 new commits merged +- 7 feature additions ✨ +- 9 bugs fixed 🐛 + +## :sparkles: New Features +- Add OpenStackClusterIdentity for centralized credential management (#2682) +- Add PriorityQueue feature flag (#2823) +- CAPI v1beta2 conditions and deprecations for OSC (#2832) +- CAPI v1beta2 conditions and deprecations for OSM (#2872) +- Implement CRD migration (#2810) +- Switch to CAPI v1beta2 for manifests (#2717) +- Update Cluster API to v1.12.0 (#2873) + +## :bug: Bug Fixes +- Allow setting disablePortSecurity on OSM port (#2784) +- Correction of issue #2617 selected fixed subnet not applied (#2639) +- Define subnetID on LB member when networks differ (#2799) +- Ensure pool member reach active state (#2815) +- Fixes out-of-range bug when multiple ports are passed to getSGControlPlaneAdditionalPorts (#2677) +- Handle SOFT_DELETED and DELETED states in server deletion (#2834) +- Remove invalid kustomizeconfig from config/webhook (#2850) +- Revert v1beta2 contract (#2883) +- Uplift go 1.24.8 to address security issue (#2764) + +## :seedling: Others +- Add AGENTS.md (#2807) +- Add bastion and allowedCIDR to dev-test clusterclass (#2725) +- Add bnallapeta to reviewers (#2794) +- Add entry of new release branch for security scan (#2703) +- Add entry of new release branch to depandabot (#2692) +- Add github workflow for pull request to have github approval (#2743) +- Add link check in PR to improve docs (#2741) +- Add missing hash in github workflow (#2731) +- Add Moshiur as reviewer (#2768) +- Add new config to pr-link check (#2876) +- Add PR title verify workflow for CAPO (#2728) +- Add yamlling workflow to check yaml files in pull request (#2845) +- Bump cloudbuild image (#2691) +- Bump e2e to use k8s v1.34.2 (#2836) +- Bump go to 1.24.9 (#2787) +- Bump go version to 1.24.11 (#2877) +- Bump go version to 1.24.7 (#2718) +- Bump golanci-lint to v2.7.2 (#2894) +- Bump golangci-lint to v2.6.1 (#2825) +- Bump golangci-lint to v2.6.2 (#2858) +- Cmd: strip out symbol table & DWARF debugging info (#2750) +- Dependabot: Hold crypto on release-0.12, unify spacing (#2709) +- Dockerfile: add the ARG defaulting within the Dockerfile (#2751) +- Don't run golanci-lint update on PRs (#2659) +- E2E: Add quick-start test using ClusterClass (#2793) +- E2E: Cleanup upgrade patches (#2831) +- E2E: Fix log collection for machines (#2795) +- E2E: Fix the CCM patch for the v1beta1 cluster-template (#2766) +- E2E: Run clusterctl upgrade from v0.13 (#2714) +- E2E: Use kind cluster for clusterctl upgrade tests (#2792) +- E2E: Use secret instead of host path for CCM config (#2744) +- Exclude `openshift` dir from boilerplate (#2901) +- Fix calcualtion of previous tag for release note generation (#2860) +- Fix DWARF debugging info (#2915) +- Fix release note generation (#2688) +- Fix release notes generation (#2846) +- Fix update-golangci-lint permissions (#2748) +- Fix URL for downloading gotestsum based on OS (#2684) +- Hold x/text since it requires go1.24 (#2740) +- Migrate CI to stable/2025.2 (#2809) +- Pin kustomize on release-0.12 (#2772) +- Refactor generate-codegen (#2761) +- Release automation workflow (#2791) +- Remove dependabot config and workflows for release-0.11 (#2779) +- Remove mdbooth as a maintainer (#2727) +- Set osc lb status when default networks are used (#2798) +- Update depandabot ignore list for release-0.12 (#2882) +- Update golangci lint v2.5.0 (#2752) +- Update log verbosity level according to CAPI (#2785) +- Update metadata for v0.14 (#2917) +- Uplift go 1.24.6 to address security issue (#2708) + +:book: Additionally, there have been 6 contributions to our documentation and book. (#2720, #2802, #2874, #2878, #2906, #2908) + +## :question: Sort these by hand +- :rocket: Release v0.13.1 (#2871) + +## Dependencies + +### Added +- github.com/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4) +- github.com/golang-jwt/jwt/v5: [v5.2.2](https://github.com/golang-jwt/jwt/tree/v5.2.2) +- github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus: [v1.0.1](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/providers/prometheus/v1.0.1) +- github.com/grpc-ecosystem/go-grpc-middleware/v2: [v2.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v2.3.0) +- github.com/olekukonko/cat: [50322a0](https://github.com/olekukonko/cat/tree/50322a0) +- github.com/olekukonko/errors: [v1.1.0](https://github.com/olekukonko/errors/tree/v1.1.0) +- github.com/olekukonko/ll: [v0.1.1](https://github.com/olekukonko/ll/tree/v0.1.1) +- github.com/olekukonko/ts: [78ecb04](https://github.com/olekukonko/ts/tree/78ecb04) +- github.com/spiffe/go-spiffe/v2: [v2.5.0](https://github.com/spiffe/go-spiffe/tree/v2.5.0) +- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0) +- go.etcd.io/raft/v3: v3.6.0 +- sigs.k8s.io/structured-merge-diff/v6: v6.3.1 + +### Changed +- cel.dev/expr: v0.19.1 → v0.24.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.25.0 → v1.26.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.25.0...detectors/gcp/v1.26.0) +- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578) +- github.com/docker/docker: [v28.3.3+incompatible → v28.5.2+incompatible](https://github.com/docker/docker/compare/v28.3.3...v28.5.2) +- github.com/docker/go-connections: [v0.5.0 → v0.6.0](https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0) +- github.com/emicklei/go-restful/v3: [v3.12.2 → v3.13.0](https://github.com/emicklei/go-restful/compare/v3.12.2...v3.13.0) +- github.com/fsnotify/fsnotify: [v1.8.0 → v1.9.0](https://github.com/fsnotify/fsnotify/compare/v1.8.0...v1.9.0) +- github.com/fxamacker/cbor/v2: [v2.7.0 → v2.9.0](https://github.com/fxamacker/cbor/compare/v2.7.0...v2.9.0) +- github.com/google/cel-go: [v0.23.2 → v0.26.0](https://github.com/google/cel-go/compare/v0.23.2...v0.26.0) +- github.com/google/gnostic-models: [v0.6.9 → v0.7.0](https://github.com/google/gnostic-models/compare/v0.6.9...v0.7.0) +- github.com/google/pprof: [27863c8 → f64d9cf](https://github.com/google/pprof/compare/27863c8...f64d9cf) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.24.0 → v2.26.3](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.24.0...v2.26.3) +- github.com/ianlancetaylor/demangle: [bd984b5 → f615e6b](https://github.com/ianlancetaylor/demangle/compare/bd984b5...f615e6b) +- github.com/jonboulle/clockwork: [v0.4.0 → v0.5.0](https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0) +- github.com/mattn/go-colorable: [v0.1.13 → v0.1.14](https://github.com/mattn/go-colorable/compare/v0.1.13...v0.1.14) +- github.com/mattn/go-runewidth: [v0.0.14 → v0.0.16](https://github.com/mattn/go-runewidth/compare/v0.0.14...v0.0.16) +- github.com/modern-go/reflect2: [v1.0.2 → 35a7c28](https://github.com/modern-go/reflect2/compare/v1.0.2...35a7c28) +- github.com/olekukonko/tablewriter: [v0.0.5 → v1.0.9](https://github.com/olekukonko/tablewriter/compare/v0.0.5...v1.0.9) +- github.com/pelletier/go-toml/v2: [v2.2.3 → v2.2.4](https://github.com/pelletier/go-toml/compare/v2.2.3...v2.2.4) +- github.com/rivo/uniseg: [v0.4.2 → v0.4.7](https://github.com/rivo/uniseg/compare/v0.4.2...v0.4.7) +- github.com/rogpeppe/go-internal: [v1.13.1 → v1.14.1](https://github.com/rogpeppe/go-internal/compare/v1.13.1...v1.14.1) +- github.com/sagikazarmark/locafero: [v0.7.0 → v0.11.0](https://github.com/sagikazarmark/locafero/compare/v0.7.0...v0.11.0) +- github.com/sourcegraph/conc: [v0.3.0 → 5f936ab](https://github.com/sourcegraph/conc/compare/v0.3.0...5f936ab) +- github.com/spf13/afero: [v1.12.0 → v1.15.0](https://github.com/spf13/afero/compare/v1.12.0...v1.15.0) +- github.com/spf13/cast: [v1.7.1 → v1.10.0](https://github.com/spf13/cast/compare/v1.7.1...v1.10.0) +- github.com/spf13/cobra: [v1.9.1 → v1.10.1](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1) +- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0) +- go.etcd.io/bbolt: v1.3.11 → v1.4.2 +- go.etcd.io/etcd/api/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/pkg/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/pkg/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/server/v3: v3.5.21 → v3.6.4 +- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.58.0 → v0.60.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/metric: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel/trace: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel: v1.34.0 → v1.35.0 +- go.opentelemetry.io/proto/otlp: v1.4.0 → v1.5.0 +- go.uber.org/zap: v1.27.0 → v1.27.1 +- golang.org/x/oauth2: v0.30.0 → v0.33.0 +- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef +- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef +- google.golang.org/grpc: v1.71.3 → v1.72.3 +- k8s.io/api: v0.33.7 → v0.34.3 +- k8s.io/apiextensions-apiserver: v0.33.7 → v0.34.3 +- k8s.io/apimachinery: v0.33.7 → v0.34.3 +- k8s.io/apiserver: v0.33.7 → v0.34.3 +- k8s.io/client-go: v0.33.7 → v0.34.3 +- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.2 +- k8s.io/code-generator: v0.33.7 → v0.34.3 +- k8s.io/component-base: v0.33.7 → v0.34.3 +- k8s.io/gengo/v2: 1244d31 → 85fd79d +- k8s.io/kms: v0.33.7 → v0.34.3 +- k8s.io/kube-openapi: 8b98d1e → f3f2b99 +- sigs.k8s.io/cluster-api/test: v1.11.4 → v1.12.0 +- sigs.k8s.io/cluster-api: v1.11.4 → v1.12.0 +- sigs.k8s.io/controller-runtime: v0.21.0 → v0.22.4 +- sigs.k8s.io/json: 9aa6b5e → cfa47c3 + +### Removed +- cloud.google.com/go/auth/oauth2adapt: v0.2.6 +- cloud.google.com/go/auth: v0.13.0 +- cloud.google.com/go/iam: v1.2.2 +- cloud.google.com/go/monitoring: v1.21.2 +- cloud.google.com/go/storage: v1.49.0 +- cloud.google.com/go: v0.116.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/exporter/metric/v0.48.1) +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/internal/resourcemapping/v0.48.1) +- github.com/census-instrumentation/opencensus-proto: [v0.4.1](https://github.com/census-instrumentation/opencensus-proto/tree/v0.4.1) +- github.com/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2) +- github.com/golang/groupcache: [41bb18b](https://github.com/golang/groupcache/tree/41bb18b) +- github.com/google/s2a-go: [v0.1.8](https://github.com/google/s2a-go/tree/v0.1.8) +- github.com/googleapis/enterprise-certificate-proxy: [v0.3.4](https://github.com/googleapis/enterprise-certificate-proxy/tree/v0.3.4) +- github.com/googleapis/gax-go/v2: [v2.14.1](https://github.com/googleapis/gax-go/tree/v2.14.1) +- github.com/grpc-ecosystem/go-grpc-middleware: [v1.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v1.3.0) +- github.com/grpc-ecosystem/grpc-gateway: [v1.16.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0) +- github.com/kr/fs: [v0.1.0](https://github.com/kr/fs/tree/v0.1.0) +- github.com/pkg/sftp: [v1.13.7](https://github.com/pkg/sftp/tree/v1.13.7) +- go.etcd.io/etcd/client/v2: v2.305.21 +- go.etcd.io/etcd/raft/v3: v3.5.21 +- go.opencensus.io: v0.24.0 +- go.uber.org/atomic: v1.9.0 +- google.golang.org/api: v0.215.0 +- google.golang.org/genproto: e639e21 + +
+
+_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.14.0-beta.0.md b/releasenotes/v0.14.0-beta.0.md new file mode 100644 index 000000000..9692aac2e --- /dev/null +++ b/releasenotes/v0.14.0-beta.0.md @@ -0,0 +1,215 @@ +🚨 This is a BETA RELEASE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/new). +
+More details about the release + +:warning: **BETA RELEASE NOTES** :warning: + +## Deprecation Warning + +The following fields are deprecated and will be removed in a future release: +- OpenStackMachine and OpenStackCluster `status.ready`. +- OpenStackMachine and OpenStackCluster `status.failureReason` and `status.failureMessage`. + +See these issues for more information: +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2374 +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2375 + +## Changes since v0.13.2 +## :chart_with_upwards_trend: Overview +- 111 new commits merged +- 7 feature additions ✨ +- 9 bugs fixed 🐛 + +## :sparkles: New Features +- Add OpenStackClusterIdentity for centralized credential management (#2682) +- Add PriorityQueue feature flag (#2823) +- CAPI v1beta2 conditions and deprecations for OSC (#2832) +- CAPI v1beta2 conditions and deprecations for OSM (#2872) +- Implement CRD migration (#2810) +- Switch to CAPI v1beta2 for manifests (#2717) +- Update Cluster API to v1.12.0 (#2873) + +## :bug: Bug Fixes +- Allow setting disablePortSecurity on OSM port (#2784) +- Correction of issue #2617 selected fixed subnet not applied (#2639) +- Define subnetID on LB member when networks differ (#2799) +- Ensure pool member reach active state (#2815) +- Fixes out-of-range bug when multiple ports are passed to getSGControlPlaneAdditionalPorts (#2677) +- Handle SOFT_DELETED and DELETED states in server deletion (#2834) +- Remove invalid kustomizeconfig from config/webhook (#2850) +- Revert v1beta2 contract (#2883) +- Uplift go 1.24.8 to address security issue (#2764) + +## :seedling: Others +- Add AGENTS.md (#2807) +- Add bastion and allowedCIDR to dev-test clusterclass (#2725) +- Add bnallapeta to reviewers (#2794) +- Add entry of new release branch for security scan (#2703) +- Add entry of new release branch to depandabot (#2692) +- Add github workflow for pull request to have github approval (#2743) +- Add link check in PR to improve docs (#2741) +- Add missing hash in github workflow (#2731) +- Add Moshiur as reviewer (#2768) +- Add new config to pr-link check (#2876) +- Add PR title verify workflow for CAPO (#2728) +- Add yamlling workflow to check yaml files in pull request (#2845) +- Bump cloudbuild image (#2691) +- Bump e2e to use k8s v1.34.2 (#2836) +- Bump go to 1.24.9 (#2787) +- Bump go version to 1.24.11 (#2877) +- Bump go version to 1.24.7 (#2718) +- Bump golanci-lint to v2.7.2 (#2894) +- Bump golangci-lint to v2.6.1 (#2825) +- Bump golangci-lint to v2.6.2 (#2858) +- Cmd: strip out symbol table & DWARF debugging info (#2750) +- Dependabot: Hold crypto on release-0.12, unify spacing (#2709) +- Dockerfile: add the ARG defaulting within the Dockerfile (#2751) +- Don't run golanci-lint update on PRs (#2659) +- E2E: Add quick-start test using ClusterClass (#2793) +- E2e: bump ORC to v2.4.0 (#2925) +- E2E: Cleanup upgrade patches (#2831) +- E2E: Fix log collection for machines (#2795) +- E2E: Fix the CCM patch for the v1beta1 cluster-template (#2766) +- E2E: Run clusterctl upgrade from v0.13 (#2714) +- E2E: Use bucket for flatcar production image (#2923) +- E2E: Use kind cluster for clusterctl upgrade tests (#2792) +- E2E: Use Kubernetes v1.35.0 in tests (#2929) +- E2E: Use secret instead of host path for CCM config (#2744) +- Exclude `openshift` dir from boilerplate (#2901) +- Fix calcualtion of previous tag for release note generation (#2860) +- Fix DWARF debugging info (#2915) +- Fix release note generation (#2688) +- Fix release notes generation (#2846) +- Fix update-golangci-lint permissions (#2748) +- Fix URL for downloading gotestsum based on OS (#2684) +- Hold x/text since it requires go1.24 (#2740) +- Ignore ORC major/minor bumps on release branches (#2930) +- Migrate CI to stable/2025.2 (#2809) +- Pin kustomize on release-0.12 (#2772) +- Refactor generate-codegen (#2761) +- Release automation workflow (#2791) +- Remove dependabot config and workflows for release-0.11 (#2779) +- Remove mdbooth as a maintainer (#2727) +- Set osc lb status when default networks are used (#2798) +- Update depandabot ignore list for release-0.12 (#2882) +- Update golangci lint v2.5.0 (#2752) +- Update issue template for new release (#2919) +- Update log verbosity level according to CAPI (#2785) +- Update metadata for v0.14 (#2917) +- Uplift go 1.24.6 to address security issue (#2708) +- :rocket: Release v0.13.1 (#2871) + +:book: Additionally, there have been 6 contributions to our documentation and book. (#2720, #2802, #2874, #2878, #2906, #2908) + +## Dependencies + +### Added +- github.com/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4) +- github.com/golang-jwt/jwt/v5: [v5.2.2](https://github.com/golang-jwt/jwt/tree/v5.2.2) +- github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus: [v1.0.1](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/providers/prometheus/v1.0.1) +- github.com/grpc-ecosystem/go-grpc-middleware/v2: [v2.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v2.3.0) +- github.com/olekukonko/cat: [50322a0](https://github.com/olekukonko/cat/tree/50322a0) +- github.com/olekukonko/errors: [v1.1.0](https://github.com/olekukonko/errors/tree/v1.1.0) +- github.com/olekukonko/ll: [v0.1.1](https://github.com/olekukonko/ll/tree/v0.1.1) +- github.com/olekukonko/ts: [78ecb04](https://github.com/olekukonko/ts/tree/78ecb04) +- github.com/spiffe/go-spiffe/v2: [v2.5.0](https://github.com/spiffe/go-spiffe/tree/v2.5.0) +- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0) +- go.etcd.io/raft/v3: v3.6.0 +- sigs.k8s.io/structured-merge-diff/v6: v6.3.1 + +### Changed +- cel.dev/expr: v0.19.1 → v0.24.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.25.0 → v1.26.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.25.0...detectors/gcp/v1.26.0) +- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578) +- github.com/docker/docker: [v28.3.3+incompatible → v28.5.2+incompatible](https://github.com/docker/docker/compare/v28.3.3...v28.5.2) +- github.com/docker/go-connections: [v0.5.0 → v0.6.0](https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0) +- github.com/emicklei/go-restful/v3: [v3.12.2 → v3.13.0](https://github.com/emicklei/go-restful/compare/v3.12.2...v3.13.0) +- github.com/fsnotify/fsnotify: [v1.8.0 → v1.9.0](https://github.com/fsnotify/fsnotify/compare/v1.8.0...v1.9.0) +- github.com/fxamacker/cbor/v2: [v2.7.0 → v2.9.0](https://github.com/fxamacker/cbor/compare/v2.7.0...v2.9.0) +- github.com/google/cel-go: [v0.23.2 → v0.26.0](https://github.com/google/cel-go/compare/v0.23.2...v0.26.0) +- github.com/google/gnostic-models: [v0.6.9 → v0.7.0](https://github.com/google/gnostic-models/compare/v0.6.9...v0.7.0) +- github.com/google/pprof: [27863c8 → f64d9cf](https://github.com/google/pprof/compare/27863c8...f64d9cf) +- github.com/gophercloud/gophercloud/v2: [v2.9.0 → v2.10.0](https://github.com/gophercloud/gophercloud/compare/v2.9.0...v2.10.0) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.24.0 → v2.26.3](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.24.0...v2.26.3) +- github.com/ianlancetaylor/demangle: [bd984b5 → f615e6b](https://github.com/ianlancetaylor/demangle/compare/bd984b5...f615e6b) +- github.com/jonboulle/clockwork: [v0.4.0 → v0.5.0](https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0) +- github.com/k-orc/openstack-resource-controller/v2: [v2.3.0 → v2.4.0](https://github.com/k-orc/openstack-resource-controller/compare/v2.3.0...v2.4.0) +- github.com/mattn/go-colorable: [v0.1.13 → v0.1.14](https://github.com/mattn/go-colorable/compare/v0.1.13...v0.1.14) +- github.com/mattn/go-runewidth: [v0.0.14 → v0.0.16](https://github.com/mattn/go-runewidth/compare/v0.0.14...v0.0.16) +- github.com/modern-go/reflect2: [v1.0.2 → 35a7c28](https://github.com/modern-go/reflect2/compare/v1.0.2...35a7c28) +- github.com/olekukonko/tablewriter: [v0.0.5 → v1.0.9](https://github.com/olekukonko/tablewriter/compare/v0.0.5...v1.0.9) +- github.com/pelletier/go-toml/v2: [v2.2.3 → v2.2.4](https://github.com/pelletier/go-toml/compare/v2.2.3...v2.2.4) +- github.com/pmezard/go-difflib: [v1.0.0 → 5d4384e](https://github.com/pmezard/go-difflib/compare/v1.0.0...5d4384e) +- github.com/rivo/uniseg: [v0.4.2 → v0.4.7](https://github.com/rivo/uniseg/compare/v0.4.2...v0.4.7) +- github.com/rogpeppe/go-internal: [v1.13.1 → v1.14.1](https://github.com/rogpeppe/go-internal/compare/v1.13.1...v1.14.1) +- github.com/sagikazarmark/locafero: [v0.7.0 → v0.11.0](https://github.com/sagikazarmark/locafero/compare/v0.7.0...v0.11.0) +- github.com/sourcegraph/conc: [v0.3.0 → 5f936ab](https://github.com/sourcegraph/conc/compare/v0.3.0...5f936ab) +- github.com/spf13/afero: [v1.12.0 → v1.15.0](https://github.com/spf13/afero/compare/v1.12.0...v1.15.0) +- github.com/spf13/cast: [v1.7.1 → v1.10.0](https://github.com/spf13/cast/compare/v1.7.1...v1.10.0) +- github.com/spf13/cobra: [v1.9.1 → v1.10.1](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1) +- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0) +- go.etcd.io/bbolt: v1.3.11 → v1.4.2 +- go.etcd.io/etcd/api/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/pkg/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/pkg/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/server/v3: v3.5.21 → v3.6.4 +- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.58.0 → v0.60.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/metric: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel/trace: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel: v1.34.0 → v1.35.0 +- go.opentelemetry.io/proto/otlp: v1.4.0 → v1.5.0 +- go.uber.org/zap: v1.27.0 → v1.27.1 +- golang.org/x/oauth2: v0.30.0 → v0.33.0 +- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef +- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef +- google.golang.org/grpc: v1.71.3 → v1.72.3 +- k8s.io/api: v0.33.7 → v0.34.3 +- k8s.io/apiextensions-apiserver: v0.33.7 → v0.34.3 +- k8s.io/apimachinery: v0.33.7 → v0.34.3 +- k8s.io/apiserver: v0.33.7 → v0.34.3 +- k8s.io/client-go: v0.33.7 → v0.34.3 +- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.2 +- k8s.io/code-generator: v0.33.7 → v0.34.3 +- k8s.io/component-base: v0.33.7 → v0.34.3 +- k8s.io/gengo/v2: 1244d31 → 85fd79d +- k8s.io/kms: v0.33.7 → v0.34.3 +- k8s.io/kube-openapi: 8b98d1e → f3f2b99 +- sigs.k8s.io/cluster-api/test: v1.11.4 → v1.12.0 +- sigs.k8s.io/cluster-api: v1.11.4 → v1.12.1 +- sigs.k8s.io/controller-runtime: v0.21.0 → v0.22.4 +- sigs.k8s.io/json: 9aa6b5e → cfa47c3 + +### Removed +- cloud.google.com/go/auth/oauth2adapt: v0.2.6 +- cloud.google.com/go/auth: v0.13.0 +- cloud.google.com/go/iam: v1.2.2 +- cloud.google.com/go/monitoring: v1.21.2 +- cloud.google.com/go/storage: v1.49.0 +- cloud.google.com/go: v0.116.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/exporter/metric/v0.48.1) +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/internal/resourcemapping/v0.48.1) +- github.com/asaskevich/govalidator: [f61b66f](https://github.com/asaskevich/govalidator/tree/f61b66f) +- github.com/census-instrumentation/opencensus-proto: [v0.4.1](https://github.com/census-instrumentation/opencensus-proto/tree/v0.4.1) +- github.com/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2) +- github.com/golang/groupcache: [41bb18b](https://github.com/golang/groupcache/tree/41bb18b) +- github.com/google/s2a-go: [v0.1.8](https://github.com/google/s2a-go/tree/v0.1.8) +- github.com/googleapis/enterprise-certificate-proxy: [v0.3.4](https://github.com/googleapis/enterprise-certificate-proxy/tree/v0.3.4) +- github.com/googleapis/gax-go/v2: [v2.14.1](https://github.com/googleapis/gax-go/tree/v2.14.1) +- github.com/grpc-ecosystem/go-grpc-middleware: [v1.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v1.3.0) +- github.com/grpc-ecosystem/grpc-gateway: [v1.16.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0) +- github.com/kr/fs: [v0.1.0](https://github.com/kr/fs/tree/v0.1.0) +- github.com/pkg/sftp: [v1.13.7](https://github.com/pkg/sftp/tree/v1.13.7) +- go.etcd.io/etcd/client/v2: v2.305.21 +- go.etcd.io/etcd/raft/v3: v3.5.21 +- go.opencensus.io: v0.24.0 +- go.uber.org/atomic: v1.9.0 +- google.golang.org/api: v0.215.0 +- google.golang.org/genproto: e639e21 +- sigs.k8s.io/structured-merge-diff/v4: v4.7.0 + +
+
+_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.14.0-rc.0.md b/releasenotes/v0.14.0-rc.0.md new file mode 100644 index 000000000..959c977a2 --- /dev/null +++ b/releasenotes/v0.14.0-rc.0.md @@ -0,0 +1,228 @@ +🚨 This is a RELEASE CANDIDATE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/new). +
+More details about the release + +:warning: **RELEASE CANDIDATE NOTES** :warning: + +## Deprecation Warning + +The following fields are deprecated and will be removed in a future release: +- OpenStackMachine and OpenStackCluster `status.ready`. +- OpenStackMachine and OpenStackCluster `status.failureReason` and `status.failureMessage`. + +See these issues for more information: +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2374 +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2375 + +## Changes since v0.13.2 +## :chart_with_upwards_trend: Overview +- 116 new commits merged +- 8 feature additions ✨ +- 10 bugs fixed 🐛 + +## :sparkles: New Features +- Add OpenStackClusterIdentity for centralized credential management (#2682) +- Add PriorityQueue feature flag (#2823) +- Add support for autoscaling to/from 0 (#2880) +- CAPI v1beta2 conditions and deprecations for OSC (#2832) +- CAPI v1beta2 conditions and deprecations for OSM (#2872) +- Implement CRD migration (#2810) +- Switch to CAPI v1beta2 for manifests (#2717) +- Update Cluster API to v1.12.0 (#2873) + +## :bug: Bug Fixes +- Allow setting disablePortSecurity on OSM port (#2784) +- Correction of issue #2617 selected fixed subnet not applied (#2639) +- Define subnetID on LB member when networks differ (#2799) +- Ensure pool member reach active state (#2815) +- Fix OpenStackServer reconciliation stuck when cluster is unpaused (#2833) +- Fixes out-of-range bug when multiple ports are passed to getSGControlPlaneAdditionalPorts (#2677) +- Handle SOFT_DELETED and DELETED states in server deletion (#2834) +- Remove invalid kustomizeconfig from config/webhook (#2850) +- Revert v1beta2 contract (#2883) +- Uplift go 1.24.8 to address security issue (#2764) + +## :seedling: Others +- Add AGENTS.md (#2807) +- Add bastion and allowedCIDR to dev-test clusterclass (#2725) +- Add bnallapeta to reviewers (#2794) +- Add entry of new release branch for security scan (#2703) +- Add entry of new release branch to depandabot (#2692) +- Add github workflow for pull request to have github approval (#2743) +- Add link check in PR to improve docs (#2741) +- Add missing hash in github workflow (#2731) +- Add Moshiur as reviewer (#2768) +- Add new config to pr-link check (#2876) +- Add PR title verify workflow for CAPO (#2728) +- Add yamlling workflow to check yaml files in pull request (#2845) +- Bump cloudbuild image (#2691) +- Bump e2e to use k8s v1.34.2 (#2836) +- Bump go to 1.24.9 (#2787) +- Bump go version to 1.24.11 (#2877) +- Bump go version to 1.24.7 (#2718) +- Bump golanci-lint to v2.7.2 (#2894) +- Bump golangci-lint to v2.6.1 (#2825) +- Bump golangci-lint to v2.6.2 (#2858) +- Cmd: strip out symbol table & DWARF debugging info (#2750) +- Dependabot: Hold crypto on release-0.12, unify spacing (#2709) +- Dockerfile: add the ARG defaulting within the Dockerfile (#2751) +- Don't run golanci-lint update on PRs (#2659) +- E2E: Add quick-start test using ClusterClass (#2793) +- E2e: bump ORC to v2.4.0 (#2925) +- E2E: Cleanup upgrade patches (#2831) +- E2E: Fix log collection for machines (#2795) +- E2E: Fix the CCM patch for the v1beta1 cluster-template (#2766) +- E2E: Run clusterctl upgrade from v0.13 (#2714) +- E2E: Use bucket for flatcar production image (#2923) +- E2E: Use kind cluster for clusterctl upgrade tests (#2792) +- E2E: Use Kubernetes v1.35.0 in tests (#2929) +- E2E: Use secret instead of host path for CCM config (#2744) +- Exclude `openshift` dir from boilerplate (#2901) +- Fix calcualtion of previous tag for release note generation (#2860) +- Fix DWARF debugging info (#2915) +- Fix release note generation (#2688) +- Fix release notes generation (#2846) +- Fix update-golangci-lint permissions (#2748) +- Fix URL for downloading gotestsum based on OS (#2684) +- Hold x/text since it requires go1.24 (#2740) +- Ignore ORC major/minor bumps on release branches (#2930) +- Migrate CI to stable/2025.2 (#2809) +- Pin kustomize on release-0.12 (#2772) +- Refactor generate-codegen (#2761) +- Release automation workflow (#2791) +- Remove dependabot config and workflows for release-0.11 (#2779) +- Remove mdbooth as a maintainer (#2727) +- Set osc lb status when default networks are used (#2798) +- Update depandabot ignore list for release-0.12 (#2882) +- Update golangci lint v2.5.0 (#2752) +- Update issue template for new release (#2919) +- Update log verbosity level according to CAPI (#2785) +- Update metadata for v0.14 (#2917) +- Uplift go 1.24.6 to address security issue (#2708) +- :rocket: Release v0.13.1 (#2871) + +:book: Additionally, there have been 7 contributions to our documentation and book. (#2720, #2802, #2874, #2878, #2906, #2908, #2946) + +## Dependencies + +### Added +- github.com/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4) +- github.com/golang-jwt/jwt/v5: [v5.2.2](https://github.com/golang-jwt/jwt/tree/v5.2.2) +- github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus: [v1.0.1](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/providers/prometheus/v1.0.1) +- github.com/grpc-ecosystem/go-grpc-middleware/v2: [v2.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v2.3.0) +- github.com/olekukonko/cat: [50322a0](https://github.com/olekukonko/cat/tree/50322a0) +- github.com/olekukonko/errors: [v1.1.0](https://github.com/olekukonko/errors/tree/v1.1.0) +- github.com/olekukonko/ll: [v0.1.1](https://github.com/olekukonko/ll/tree/v0.1.1) +- github.com/olekukonko/ts: [78ecb04](https://github.com/olekukonko/ts/tree/78ecb04) +- github.com/spiffe/go-spiffe/v2: [v2.5.0](https://github.com/spiffe/go-spiffe/tree/v2.5.0) +- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0) +- go.etcd.io/raft/v3: v3.6.0 +- sigs.k8s.io/structured-merge-diff/v6: v6.3.1 + +### Changed +- cel.dev/expr: v0.19.1 → v0.24.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.25.0 → v1.26.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.25.0...detectors/gcp/v1.26.0) +- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578) +- github.com/docker/docker: [v28.3.3+incompatible → v28.5.2+incompatible](https://github.com/docker/docker/compare/v28.3.3...v28.5.2) +- github.com/docker/go-connections: [v0.5.0 → v0.6.0](https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0) +- github.com/emicklei/go-restful/v3: [v3.12.2 → v3.13.0](https://github.com/emicklei/go-restful/compare/v3.12.2...v3.13.0) +- github.com/fsnotify/fsnotify: [v1.8.0 → v1.9.0](https://github.com/fsnotify/fsnotify/compare/v1.8.0...v1.9.0) +- github.com/fxamacker/cbor/v2: [v2.7.0 → v2.9.0](https://github.com/fxamacker/cbor/compare/v2.7.0...v2.9.0) +- github.com/google/cel-go: [v0.23.2 → v0.26.0](https://github.com/google/cel-go/compare/v0.23.2...v0.26.0) +- github.com/google/gnostic-models: [v0.6.9 → v0.7.0](https://github.com/google/gnostic-models/compare/v0.6.9...v0.7.0) +- github.com/google/pprof: [27863c8 → f64d9cf](https://github.com/google/pprof/compare/27863c8...f64d9cf) +- github.com/gophercloud/gophercloud/v2: [v2.9.0 → v2.10.0](https://github.com/gophercloud/gophercloud/compare/v2.9.0...v2.10.0) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.24.0 → v2.26.3](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.24.0...v2.26.3) +- github.com/ianlancetaylor/demangle: [bd984b5 → f615e6b](https://github.com/ianlancetaylor/demangle/compare/bd984b5...f615e6b) +- github.com/jonboulle/clockwork: [v0.4.0 → v0.5.0](https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0) +- github.com/k-orc/openstack-resource-controller/v2: [v2.3.0 → v2.4.0](https://github.com/k-orc/openstack-resource-controller/compare/v2.3.0...v2.4.0) +- github.com/mattn/go-colorable: [v0.1.13 → v0.1.14](https://github.com/mattn/go-colorable/compare/v0.1.13...v0.1.14) +- github.com/mattn/go-runewidth: [v0.0.14 → v0.0.16](https://github.com/mattn/go-runewidth/compare/v0.0.14...v0.0.16) +- github.com/modern-go/reflect2: [v1.0.2 → 35a7c28](https://github.com/modern-go/reflect2/compare/v1.0.2...35a7c28) +- github.com/olekukonko/tablewriter: [v0.0.5 → v1.0.9](https://github.com/olekukonko/tablewriter/compare/v0.0.5...v1.0.9) +- github.com/onsi/ginkgo/v2: [v2.27.3 → v2.27.5](https://github.com/onsi/ginkgo/compare/v2.27.3...v2.27.5) +- github.com/onsi/gomega: [v1.38.3 → v1.39.0](https://github.com/onsi/gomega/compare/v1.38.3...v1.39.0) +- github.com/pelletier/go-toml/v2: [v2.2.3 → v2.2.4](https://github.com/pelletier/go-toml/compare/v2.2.3...v2.2.4) +- github.com/pmezard/go-difflib: [v1.0.0 → 5d4384e](https://github.com/pmezard/go-difflib/compare/v1.0.0...5d4384e) +- github.com/rivo/uniseg: [v0.4.2 → v0.4.7](https://github.com/rivo/uniseg/compare/v0.4.2...v0.4.7) +- github.com/rogpeppe/go-internal: [v1.13.1 → v1.14.1](https://github.com/rogpeppe/go-internal/compare/v1.13.1...v1.14.1) +- github.com/sagikazarmark/locafero: [v0.7.0 → v0.11.0](https://github.com/sagikazarmark/locafero/compare/v0.7.0...v0.11.0) +- github.com/sourcegraph/conc: [v0.3.0 → 5f936ab](https://github.com/sourcegraph/conc/compare/v0.3.0...5f936ab) +- github.com/spf13/afero: [v1.12.0 → v1.15.0](https://github.com/spf13/afero/compare/v1.12.0...v1.15.0) +- github.com/spf13/cast: [v1.7.1 → v1.10.0](https://github.com/spf13/cast/compare/v1.7.1...v1.10.0) +- github.com/spf13/cobra: [v1.9.1 → v1.10.1](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1) +- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0) +- go.etcd.io/bbolt: v1.3.11 → v1.4.2 +- go.etcd.io/etcd/api/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/pkg/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/pkg/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/server/v3: v3.5.21 → v3.6.4 +- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.58.0 → v0.60.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/metric: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel/trace: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel: v1.34.0 → v1.35.0 +- go.opentelemetry.io/proto/otlp: v1.4.0 → v1.5.0 +- go.uber.org/zap: v1.27.0 → v1.27.1 +- golang.org/x/crypto: v0.46.0 → v0.47.0 +- golang.org/x/mod: v0.30.0 → v0.31.0 +- golang.org/x/net: v0.47.0 → v0.48.0 +- golang.org/x/oauth2: v0.30.0 → v0.33.0 +- golang.org/x/sys: v0.39.0 → v0.40.0 +- golang.org/x/telemetry: bc8e575 → 8fff8a5 +- golang.org/x/term: v0.38.0 → v0.39.0 +- golang.org/x/text: v0.32.0 → v0.33.0 +- golang.org/x/tools: v0.39.0 → v0.40.0 +- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef +- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef +- google.golang.org/grpc: v1.71.3 → v1.72.3 +- gopkg.in/ini.v1: v1.67.0 → v1.67.1 +- k8s.io/api: v0.33.7 → v0.34.3 +- k8s.io/apiextensions-apiserver: v0.33.7 → v0.34.3 +- k8s.io/apimachinery: v0.33.7 → v0.34.3 +- k8s.io/apiserver: v0.33.7 → v0.34.3 +- k8s.io/client-go: v0.33.7 → v0.34.3 +- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.2 +- k8s.io/code-generator: v0.33.7 → v0.34.3 +- k8s.io/component-base: v0.33.7 → v0.34.3 +- k8s.io/gengo/v2: 1244d31 → 85fd79d +- k8s.io/kms: v0.33.7 → v0.34.3 +- k8s.io/kube-openapi: 8b98d1e → f3f2b99 +- sigs.k8s.io/cluster-api/test: v1.11.4 → v1.12.0 +- sigs.k8s.io/cluster-api: v1.11.4 → v1.12.1 +- sigs.k8s.io/controller-runtime: v0.21.0 → v0.22.4 +- sigs.k8s.io/json: 9aa6b5e → cfa47c3 + +### Removed +- cloud.google.com/go/auth/oauth2adapt: v0.2.6 +- cloud.google.com/go/auth: v0.13.0 +- cloud.google.com/go/iam: v1.2.2 +- cloud.google.com/go/monitoring: v1.21.2 +- cloud.google.com/go/storage: v1.49.0 +- cloud.google.com/go: v0.116.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/exporter/metric/v0.48.1) +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/internal/resourcemapping/v0.48.1) +- github.com/asaskevich/govalidator: [f61b66f](https://github.com/asaskevich/govalidator/tree/f61b66f) +- github.com/census-instrumentation/opencensus-proto: [v0.4.1](https://github.com/census-instrumentation/opencensus-proto/tree/v0.4.1) +- github.com/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2) +- github.com/golang/groupcache: [41bb18b](https://github.com/golang/groupcache/tree/41bb18b) +- github.com/google/s2a-go: [v0.1.8](https://github.com/google/s2a-go/tree/v0.1.8) +- github.com/googleapis/enterprise-certificate-proxy: [v0.3.4](https://github.com/googleapis/enterprise-certificate-proxy/tree/v0.3.4) +- github.com/googleapis/gax-go/v2: [v2.14.1](https://github.com/googleapis/gax-go/tree/v2.14.1) +- github.com/grpc-ecosystem/go-grpc-middleware: [v1.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v1.3.0) +- github.com/grpc-ecosystem/grpc-gateway: [v1.16.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0) +- github.com/kr/fs: [v0.1.0](https://github.com/kr/fs/tree/v0.1.0) +- github.com/pkg/sftp: [v1.13.7](https://github.com/pkg/sftp/tree/v1.13.7) +- go.etcd.io/etcd/client/v2: v2.305.21 +- go.etcd.io/etcd/raft/v3: v3.5.21 +- go.opencensus.io: v0.24.0 +- go.uber.org/atomic: v1.9.0 +- google.golang.org/api: v0.215.0 +- google.golang.org/genproto: e639e21 +- sigs.k8s.io/structured-merge-diff/v4: v4.7.0 + +
+
+_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.14.0.md b/releasenotes/v0.14.0.md new file mode 100644 index 000000000..348953434 --- /dev/null +++ b/releasenotes/v0.14.0.md @@ -0,0 +1,236 @@ +## Highlights + +This release marks the start of the work towards a new API version for CAPO. +We have deprecated some status fields (see below), with the goal of removing them in a future release. +These changes are coming from the new CAPI v1beta2 contract that we expect to implement fully, later this year. +At the same time, we will take the chance to update our own API, but this is for the future. + +In this release we introduce a few new features that deserve a highlight: + +1. [OpenStackClusterIdentity for centralized credential management](https://cluster-api-openstack.sigs.k8s.io/topics/openstack-cluster-identity) +2. [Support for the controller-runtime PriorityQueue feature](https://cluster-api-openstack.sigs.k8s.io/experimental-features/priority-queue) +3. [Support for autoscaling to/from zero](https://cluster-api-openstack.sigs.k8s.io/experimental-features/autoscale-from-zero) + +Note that the PriorityQueue and autoscaling features are experimental and by default disabled. + +## Deprecation Warning + +The following fields are deprecated and will be removed in a future release: +- OpenStackMachine and OpenStackCluster `status.ready`. +- OpenStackMachine and OpenStackCluster `status.failureReason` and `status.failureMessage`. + +See these issues for more information: +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2374 +- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/2375 + +## Changes since v0.13.2 +## :chart_with_upwards_trend: Overview +- 118 new commits merged +- 8 feature additions ✨ +- 10 bugs fixed 🐛 + +## :sparkles: New Features +- Add OpenStackClusterIdentity for centralized credential management (#2682) +- Add PriorityQueue feature flag (#2823) +- Add support for autoscaling to/from 0 (#2880) +- CAPI v1beta2 conditions and deprecations for OSC (#2832) +- CAPI v1beta2 conditions and deprecations for OSM (#2872) +- Implement CRD migration (#2810) +- Switch to CAPI v1beta2 for manifests (#2717) +- Update Cluster API to v1.12.0 (#2873) + +## :bug: Bug Fixes +- Allow setting disablePortSecurity on OSM port (#2784) +- Correction of issue #2617 selected fixed subnet not applied (#2639) +- Define subnetID on LB member when networks differ (#2799) +- Ensure pool member reach active state (#2815) +- Fix OpenStackServer reconciliation stuck when cluster is unpaused (#2833) +- Fixes out-of-range bug when multiple ports are passed to getSGControlPlaneAdditionalPorts (#2677) +- Handle SOFT_DELETED and DELETED states in server deletion (#2834) +- Remove invalid kustomizeconfig from config/webhook (#2850) +- Revert v1beta2 contract (#2883) + +## :seedling: Others +- Add AGENTS.md (#2807) +- Add bastion and allowedCIDR to dev-test clusterclass (#2725) +- Add bnallapeta to reviewers (#2794) +- Add entry of new release branch for security scan (#2703) +- Add entry of new release branch to depandabot (#2692) +- Add github workflow for pull request to have github approval (#2743) +- Add link check in PR to improve docs (#2741) +- Add missing hash in github workflow (#2731) +- Add Moshiur as reviewer (#2768) +- Add new config to pr-link check (#2876) +- Add PR title verify workflow for CAPO (#2728) +- Add yamlling workflow to check yaml files in pull request (#2845) +- Bump cloudbuild image (#2691) +- Bump e2e to use k8s v1.34.2 (#2836) +- Bump go to 1.24.9 (#2787) +- Bump go version to 1.24.11 (#2877) +- Bump go version to 1.24.7 (#2718) +- Bump golanci-lint to v2.7.2 (#2894) +- Bump golang version to 1.24.12 (#2957) +- Bump golangci-lint to v2.6.1 (#2825) +- Bump golangci-lint to v2.6.2 (#2858) +- Cmd: strip out symbol table & DWARF debugging info (#2750) +- Dependabot: Hold crypto on release-0.12, unify spacing (#2709) +- Dockerfile: add the ARG defaulting within the Dockerfile (#2751) +- Don't run golanci-lint update on PRs (#2659) +- E2E: Add quick-start test using ClusterClass (#2793) +- E2e: bump ORC to v2.4.0 (#2925) +- E2E: Cleanup upgrade patches (#2831) +- E2E: Fix log collection for machines (#2795) +- E2E: Fix the CCM patch for the v1beta1 cluster-template (#2766) +- E2E: Run clusterctl upgrade from v0.13 (#2714) +- E2E: Use bucket for flatcar production image (#2923) +- E2E: Use kind cluster for clusterctl upgrade tests (#2792) +- E2E: Use Kubernetes v1.35.0 in tests (#2929) +- E2E: Use secret instead of host path for CCM config (#2744) +- Exclude `openshift` dir from boilerplate (#2901) +- Fix calcualtion of previous tag for release note generation (#2860) +- Fix DWARF debugging info (#2915) +- Fix release note generation (#2688) +- Fix release notes generation (#2846) +- Fix update-golangci-lint permissions (#2748) +- Fix URL for downloading gotestsum based on OS (#2684) +- Hold x/text since it requires go1.24 (#2740) +- Ignore ORC major/minor bumps on release branches (#2930) +- Migrate CI to stable/2025.2 (#2809) +- Pin kustomize on release-0.12 (#2772) +- Refactor generate-codegen (#2761) +- Release automation workflow (#2791) +- Release v0.13.1 (#2871) +- Remove dependabot config and workflows for release-0.11 (#2779) +- Remove mdbooth as a maintainer (#2727) +- Set osc lb status when default networks are used (#2798) +- Update depandabot ignore list for release-0.12 (#2882) +- Update golangci lint v2.5.0 (#2752) +- Update issue template for new release (#2919) +- Update log verbosity level according to CAPI (#2785) +- Update metadata for v0.14 (#2917) +- Uplift go 1.24.6 to address security issue (#2708) +- Uplift go 1.24.8 to address security issue (#2764) + +:book: Additionally, there have been 7 contributions to our documentation and book. (#2720, #2802, #2874, #2878, #2906, #2908, #2946) + +## Dependencies + +### Added +- github.com/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4) +- github.com/golang-jwt/jwt/v5: [v5.2.2](https://github.com/golang-jwt/jwt/tree/v5.2.2) +- github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus: [v1.0.1](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/providers/prometheus/v1.0.1) +- github.com/grpc-ecosystem/go-grpc-middleware/v2: [v2.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v2.3.0) +- github.com/olekukonko/cat: [50322a0](https://github.com/olekukonko/cat/tree/50322a0) +- github.com/olekukonko/errors: [v1.1.0](https://github.com/olekukonko/errors/tree/v1.1.0) +- github.com/olekukonko/ll: [v0.1.1](https://github.com/olekukonko/ll/tree/v0.1.1) +- github.com/olekukonko/ts: [78ecb04](https://github.com/olekukonko/ts/tree/78ecb04) +- github.com/spiffe/go-spiffe/v2: [v2.5.0](https://github.com/spiffe/go-spiffe/tree/v2.5.0) +- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0) +- go.etcd.io/raft/v3: v3.6.0 +- sigs.k8s.io/structured-merge-diff/v6: v6.3.1 + +### Changed +- cel.dev/expr: v0.19.1 → v0.24.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.25.0 → v1.26.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.25.0...detectors/gcp/v1.26.0) +- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578) +- github.com/docker/docker: [v28.3.3+incompatible → v28.5.2+incompatible](https://github.com/docker/docker/compare/v28.3.3...v28.5.2) +- github.com/docker/go-connections: [v0.5.0 → v0.6.0](https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0) +- github.com/emicklei/go-restful/v3: [v3.12.2 → v3.13.0](https://github.com/emicklei/go-restful/compare/v3.12.2...v3.13.0) +- github.com/fsnotify/fsnotify: [v1.8.0 → v1.9.0](https://github.com/fsnotify/fsnotify/compare/v1.8.0...v1.9.0) +- github.com/fxamacker/cbor/v2: [v2.7.0 → v2.9.0](https://github.com/fxamacker/cbor/compare/v2.7.0...v2.9.0) +- github.com/google/cel-go: [v0.23.2 → v0.26.0](https://github.com/google/cel-go/compare/v0.23.2...v0.26.0) +- github.com/google/gnostic-models: [v0.6.9 → v0.7.0](https://github.com/google/gnostic-models/compare/v0.6.9...v0.7.0) +- github.com/google/pprof: [27863c8 → f64d9cf](https://github.com/google/pprof/compare/27863c8...f64d9cf) +- github.com/gophercloud/gophercloud/v2: [v2.9.0 → v2.10.0](https://github.com/gophercloud/gophercloud/compare/v2.9.0...v2.10.0) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.24.0 → v2.26.3](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.24.0...v2.26.3) +- github.com/ianlancetaylor/demangle: [bd984b5 → f615e6b](https://github.com/ianlancetaylor/demangle/compare/bd984b5...f615e6b) +- github.com/jonboulle/clockwork: [v0.4.0 → v0.5.0](https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0) +- github.com/k-orc/openstack-resource-controller/v2: [v2.3.0 → v2.4.0](https://github.com/k-orc/openstack-resource-controller/compare/v2.3.0...v2.4.0) +- github.com/mattn/go-colorable: [v0.1.13 → v0.1.14](https://github.com/mattn/go-colorable/compare/v0.1.13...v0.1.14) +- github.com/mattn/go-runewidth: [v0.0.14 → v0.0.16](https://github.com/mattn/go-runewidth/compare/v0.0.14...v0.0.16) +- github.com/modern-go/reflect2: [v1.0.2 → 35a7c28](https://github.com/modern-go/reflect2/compare/v1.0.2...35a7c28) +- github.com/olekukonko/tablewriter: [v0.0.5 → v1.0.9](https://github.com/olekukonko/tablewriter/compare/v0.0.5...v1.0.9) +- github.com/onsi/ginkgo/v2: [v2.27.3 → v2.27.5](https://github.com/onsi/ginkgo/compare/v2.27.3...v2.27.5) +- github.com/onsi/gomega: [v1.38.3 → v1.39.0](https://github.com/onsi/gomega/compare/v1.38.3...v1.39.0) +- github.com/pelletier/go-toml/v2: [v2.2.3 → v2.2.4](https://github.com/pelletier/go-toml/compare/v2.2.3...v2.2.4) +- github.com/pmezard/go-difflib: [v1.0.0 → 5d4384e](https://github.com/pmezard/go-difflib/compare/v1.0.0...5d4384e) +- github.com/rivo/uniseg: [v0.4.2 → v0.4.7](https://github.com/rivo/uniseg/compare/v0.4.2...v0.4.7) +- github.com/rogpeppe/go-internal: [v1.13.1 → v1.14.1](https://github.com/rogpeppe/go-internal/compare/v1.13.1...v1.14.1) +- github.com/sagikazarmark/locafero: [v0.7.0 → v0.11.0](https://github.com/sagikazarmark/locafero/compare/v0.7.0...v0.11.0) +- github.com/sourcegraph/conc: [v0.3.0 → 5f936ab](https://github.com/sourcegraph/conc/compare/v0.3.0...5f936ab) +- github.com/spf13/afero: [v1.12.0 → v1.15.0](https://github.com/spf13/afero/compare/v1.12.0...v1.15.0) +- github.com/spf13/cast: [v1.7.1 → v1.10.0](https://github.com/spf13/cast/compare/v1.7.1...v1.10.0) +- github.com/spf13/cobra: [v1.9.1 → v1.10.1](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1) +- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0) +- go.etcd.io/bbolt: v1.3.11 → v1.4.2 +- go.etcd.io/etcd/api/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/pkg/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/client/v3: v3.5.22 → v3.6.6 +- go.etcd.io/etcd/pkg/v3: v3.5.21 → v3.6.4 +- go.etcd.io/etcd/server/v3: v3.5.21 → v3.6.4 +- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.58.0 → v0.60.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.33.0 → v1.34.0 +- go.opentelemetry.io/otel/metric: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel/trace: v1.34.0 → v1.35.0 +- go.opentelemetry.io/otel: v1.34.0 → v1.35.0 +- go.opentelemetry.io/proto/otlp: v1.4.0 → v1.5.0 +- go.uber.org/zap: v1.27.0 → v1.27.1 +- golang.org/x/crypto: v0.46.0 → v0.47.0 +- golang.org/x/mod: v0.30.0 → v0.31.0 +- golang.org/x/net: v0.47.0 → v0.48.0 +- golang.org/x/oauth2: v0.30.0 → v0.33.0 +- golang.org/x/sys: v0.39.0 → v0.40.0 +- golang.org/x/telemetry: bc8e575 → 8fff8a5 +- golang.org/x/term: v0.38.0 → v0.39.0 +- golang.org/x/text: v0.32.0 → v0.33.0 +- golang.org/x/tools: v0.39.0 → v0.40.0 +- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef +- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef +- google.golang.org/grpc: v1.71.3 → v1.72.3 +- gopkg.in/ini.v1: v1.67.0 → v1.67.1 +- k8s.io/api: v0.33.7 → v0.34.3 +- k8s.io/apiextensions-apiserver: v0.33.7 → v0.34.3 +- k8s.io/apimachinery: v0.33.7 → v0.34.3 +- k8s.io/apiserver: v0.33.7 → v0.34.3 +- k8s.io/client-go: v0.33.7 → v0.34.3 +- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.2 +- k8s.io/code-generator: v0.33.7 → v0.34.3 +- k8s.io/component-base: v0.33.7 → v0.34.3 +- k8s.io/gengo/v2: 1244d31 → 85fd79d +- k8s.io/kms: v0.33.7 → v0.34.3 +- k8s.io/kube-openapi: 8b98d1e → f3f2b99 +- sigs.k8s.io/cluster-api/test: v1.11.4 → v1.12.0 +- sigs.k8s.io/cluster-api: v1.11.4 → v1.12.1 +- sigs.k8s.io/controller-runtime: v0.21.0 → v0.22.4 +- sigs.k8s.io/json: 9aa6b5e → cfa47c3 + +### Removed +- cloud.google.com/go/auth/oauth2adapt: v0.2.6 +- cloud.google.com/go/auth: v0.13.0 +- cloud.google.com/go/iam: v1.2.2 +- cloud.google.com/go/monitoring: v1.21.2 +- cloud.google.com/go/storage: v1.49.0 +- cloud.google.com/go: v0.116.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/exporter/metric/v0.48.1) +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping: [v0.48.1](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/internal/resourcemapping/v0.48.1) +- github.com/asaskevich/govalidator: [f61b66f](https://github.com/asaskevich/govalidator/tree/f61b66f) +- github.com/census-instrumentation/opencensus-proto: [v0.4.1](https://github.com/census-instrumentation/opencensus-proto/tree/v0.4.1) +- github.com/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2) +- github.com/golang/groupcache: [41bb18b](https://github.com/golang/groupcache/tree/41bb18b) +- github.com/google/s2a-go: [v0.1.8](https://github.com/google/s2a-go/tree/v0.1.8) +- github.com/googleapis/enterprise-certificate-proxy: [v0.3.4](https://github.com/googleapis/enterprise-certificate-proxy/tree/v0.3.4) +- github.com/googleapis/gax-go/v2: [v2.14.1](https://github.com/googleapis/gax-go/tree/v2.14.1) +- github.com/grpc-ecosystem/go-grpc-middleware: [v1.3.0](https://github.com/grpc-ecosystem/go-grpc-middleware/tree/v1.3.0) +- github.com/grpc-ecosystem/grpc-gateway: [v1.16.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0) +- github.com/kr/fs: [v0.1.0](https://github.com/kr/fs/tree/v0.1.0) +- github.com/pkg/sftp: [v1.13.7](https://github.com/pkg/sftp/tree/v1.13.7) +- go.etcd.io/etcd/client/v2: v2.305.21 +- go.etcd.io/etcd/raft/v3: v3.5.21 +- go.opencensus.io: v0.24.0 +- go.uber.org/atomic: v1.9.0 +- google.golang.org/api: v0.215.0 +- google.golang.org/genproto: e639e21 +- sigs.k8s.io/structured-merge-diff/v4: v4.7.0 + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.14.1.md b/releasenotes/v0.14.1.md new file mode 100644 index 000000000..ba07fd53c --- /dev/null +++ b/releasenotes/v0.14.1.md @@ -0,0 +1,72 @@ +## Changes since v0.14.0 +## :chart_with_upwards_trend: Overview +- 15 new commits merged + +## :seedling: Others +- Add nikParasyr to reviewers (#2971) +- Bump golang version to 1.24.13 (#2997) +- Bump opentelemetry dependencies (#3016) + +## Dependencies + +### Added +- github.com/cenkalti/backoff/v5: [v5.0.3](https://github.com/cenkalti/backoff/tree/v5.0.3) +- gonum.org/v1/gonum: v0.16.0 + +### Changed +- cloud.google.com/go/compute/metadata: v0.6.0 → v0.9.0 +- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.26.0 → v1.30.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.26.0...detectors/gcp/v1.30.0) +- github.com/cncf/xds/go: [2f00578 → 0feb691](https://github.com/cncf/xds/compare/2f00578...0feb691) +- github.com/coredns/corefile-migration: [v1.0.29 → v1.0.30](https://github.com/coredns/corefile-migration/compare/v1.0.29...v1.0.30) +- github.com/envoyproxy/go-control-plane/envoy: [v1.32.4 → v1.35.0](https://github.com/envoyproxy/go-control-plane/compare/envoy/v1.32.4...envoy/v1.35.0) +- github.com/envoyproxy/go-control-plane: [v0.13.4 → 75eaa19](https://github.com/envoyproxy/go-control-plane/compare/v0.13.4...75eaa19) +- github.com/go-jose/go-jose/v4: [v4.0.4 → v4.1.3](https://github.com/go-jose/go-jose/compare/v4.0.4...v4.1.3) +- github.com/golang/glog: [v1.2.4 → v1.2.5](https://github.com/golang/glog/compare/v1.2.4...v1.2.5) +- github.com/google/pprof: [f64d9cf → 294ebfa](https://github.com/google/pprof/compare/f64d9cf...294ebfa) +- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.26.3 → v2.27.7](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.26.3...v2.27.7) +- github.com/onsi/ginkgo/v2: [v2.27.5 → v2.28.1](https://github.com/onsi/ginkgo/compare/v2.27.5...v2.28.1) +- github.com/onsi/gomega: [v1.39.0 → v1.39.1](https://github.com/onsi/gomega/compare/v1.39.0...v1.39.1) +- github.com/spiffe/go-spiffe/v2: [v2.5.0 → v2.6.0](https://github.com/spiffe/go-spiffe/compare/v2.5.0...v2.6.0) +- go.opentelemetry.io/auto/sdk: v1.1.0 → v1.2.1 +- go.opentelemetry.io/contrib/detectors/gcp: v1.34.0 → v1.38.0 +- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: v0.58.0 → v0.65.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel/metric: v1.35.0 → v1.40.0 +- go.opentelemetry.io/otel/sdk/metric: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel/sdk: v1.34.0 → v1.40.0 +- go.opentelemetry.io/otel/trace: v1.35.0 → v1.40.0 +- go.opentelemetry.io/otel: v1.35.0 → v1.40.0 +- go.opentelemetry.io/proto/otlp: v1.5.0 → v1.9.0 +- golang.org/x/crypto: v0.47.0 → v0.48.0 +- golang.org/x/mod: v0.31.0 → v0.32.0 +- golang.org/x/net: v0.48.0 → v0.49.0 +- golang.org/x/oauth2: v0.33.0 → v0.34.0 +- golang.org/x/sys: v0.40.0 → v0.41.0 +- golang.org/x/telemetry: 8fff8a5 → bd525da +- golang.org/x/term: v0.39.0 → v0.40.0 +- golang.org/x/text: v0.33.0 → v0.34.0 +- golang.org/x/tools: v0.40.0 → v0.41.0 +- google.golang.org/genproto/googleapis/api: a0af3ef → 8636f87 +- google.golang.org/genproto/googleapis/rpc: a0af3ef → 8636f87 +- google.golang.org/grpc: v1.72.3 → v1.78.0 +- google.golang.org/protobuf: v1.36.8 → v1.36.11 +- k8s.io/api: v0.34.3 → v0.34.4 +- k8s.io/apiextensions-apiserver: v0.34.3 → v0.34.4 +- k8s.io/apimachinery: v0.34.3 → v0.34.4 +- k8s.io/apiserver: v0.34.3 → v0.34.4 +- k8s.io/client-go: v0.34.3 → v0.34.4 +- k8s.io/code-generator: v0.34.3 → v0.34.4 +- k8s.io/component-base: v0.34.3 → v0.34.4 +- k8s.io/kms: v0.34.3 → v0.34.4 +- sigs.k8s.io/cluster-api/test: v1.12.0 → v1.12.3 +- sigs.k8s.io/cluster-api: v1.12.1 → v1.12.3 +- sigs.k8s.io/controller-runtime: v0.22.4 → v0.22.5 +- sigs.k8s.io/kind: v0.30.0 → v0.31.0 +- sigs.k8s.io/structured-merge-diff/v6: v6.3.1 → v6.3.2 + +### Removed +- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0) +- go.uber.org/automaxprocs: v1.6.0 + +_Thanks to all our contributors!_ 😊 diff --git a/releasenotes/v0.14.2.md b/releasenotes/v0.14.2.md new file mode 100644 index 000000000..896d3b95b --- /dev/null +++ b/releasenotes/v0.14.2.md @@ -0,0 +1,44 @@ +# Highlights + +## Changes since v0.14.1 + +## :chart_with_upwards_trend: Overview + +- 9 new commits merged + +## :seedling: Others + +- Bump google.golang.org/grpc to v1.79.3 (#3071) +- Set GOTOOLCHAIN in Makefile (#3068) +- Update Trivy version to 0.69.3 (#3066) +- Uplift go to 1.25.8 (#3051) + +## Dependencies + +### Added + +_Nothing has changed._ + +### Changed + +- cel.dev/expr: v0.24.0 → v0.25.1 +- github.com/cncf/xds/go: [0feb691 → ee656c7](https://github.com/cncf/xds/compare/0feb691...ee656c7) +- github.com/envoyproxy/go-control-plane/envoy: [v1.35.0 → v1.36.0](https://github.com/envoyproxy/go-control-plane/compare/envoy/v1.35.0...envoy/v1.36.0) +- github.com/envoyproxy/go-control-plane: [75eaa19 → v0.14.0](https://github.com/envoyproxy/go-control-plane/compare/75eaa19...v0.14.0) +- github.com/envoyproxy/protoc-gen-validate: [v1.2.1 → v1.3.0](https://github.com/envoyproxy/protoc-gen-validate/compare/v1.2.1...v1.3.0) +- go.opentelemetry.io/contrib/detectors/gcp: v1.38.0 → v1.39.0 +- google.golang.org/grpc: v1.78.0 → v1.79.3 +- k8s.io/api: v0.34.4 → v0.34.5 +- k8s.io/apiextensions-apiserver: v0.34.4 → v0.34.5 +- k8s.io/apimachinery: v0.34.4 → v0.34.6 +- k8s.io/apiserver: v0.34.4 → v0.34.5 +- k8s.io/client-go: v0.34.4 → v0.34.5 +- k8s.io/code-generator: v0.34.4 → v0.34.5 +- k8s.io/component-base: v0.34.4 → v0.34.5 +- k8s.io/kms: v0.34.4 → v0.34.5 + +### Removed + +_Nothing has changed._ + +_Thanks to all our contributors!_ 😊 diff --git a/templates/cluster-template-flatcar-sysext.yaml b/templates/cluster-template-flatcar-sysext.yaml index 1cf966bb9..0143ad25f 100644 --- a/templates/cluster-template-flatcar-sysext.yaml +++ b/templates/cluster-template-flatcar-sysext.yaml @@ -227,7 +227,7 @@ spec: replicas: ${CONTROL_PLANE_MACHINE_COUNT} version: ${KUBERNETES_VERSION} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackCluster metadata: name: ${CLUSTER_NAME} @@ -262,7 +262,7 @@ spec: dnsNameservers: - ${OPENSTACK_DNS_NAMESERVERS} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-control-plane @@ -275,7 +275,7 @@ spec: name: ${FLATCAR_IMAGE_NAME} sshKeyName: ${OPENSTACK_SSH_KEY_NAME} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-md-0 diff --git a/templates/cluster-template-flatcar.yaml b/templates/cluster-template-flatcar.yaml index 6f685eaf3..64b0c767f 100644 --- a/templates/cluster-template-flatcar.yaml +++ b/templates/cluster-template-flatcar.yaml @@ -151,7 +151,7 @@ spec: replicas: ${CONTROL_PLANE_MACHINE_COUNT} version: ${KUBERNETES_VERSION} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackCluster metadata: name: ${CLUSTER_NAME} @@ -186,7 +186,7 @@ spec: dnsNameservers: - ${OPENSTACK_DNS_NAMESERVERS} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-control-plane @@ -199,7 +199,7 @@ spec: name: ${OPENSTACK_FLATCAR_IMAGE_NAME} sshKeyName: ${OPENSTACK_SSH_KEY_NAME} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-md-0 diff --git a/templates/cluster-template-development.yaml b/templates/cluster-template-topology.yaml similarity index 86% rename from templates/cluster-template-development.yaml rename to templates/cluster-template-topology.yaml index df62668d3..d83ca03ea 100644 --- a/templates/cluster-template-development.yaml +++ b/templates/cluster-template-topology.yaml @@ -1,25 +1,20 @@ -apiVersion: cluster.x-k8s.io/v1beta1 +apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: name: ${CLUSTER_NAME} spec: topology: - class: dev-test - version: ${KUBERNETES_VERSION} + classRef: + name: dev-test controlPlane: replicas: ${CONTROL_PLANE_MACHINE_COUNT} - workers: - machineDeployments: - - class: default-worker - name: md-0 - replicas: ${WORKER_MACHINE_COUNT} variables: - name: identityRef value: - name: ${CLOUD_CONFIG_SECRET:=dev-test-cloud-config} cloudName: ${OPENSTACK_CLOUD:=capo-e2e} - - name: imageName - value: ${IMAGE_NAME:=flatcar_production} + name: ${CLOUD_CONFIG_SECRET:=dev-test-cloud-config} + - name: imageRef + value: ${IMAGE_REF:=node-image} - name: addImageVersion value: ${ADD_IMAGE_VERSION:=false} - name: injectIgnitionSysext @@ -32,6 +27,12 @@ spec: spec: flavor: ${OPENSTACK_BASTION_FLAVOR:=m1.small} image: - filter: + imageRef: name: ${OPENSTACK_BASTION_IMAGE_NAME:=ubuntu-24.04} sshKeyName: ${OPENSTACK_SSH_KEY_NAME:=""} + version: ${KUBERNETES_VERSION} + workers: + machineDeployments: + - class: default-worker + name: md-0 + replicas: ${WORKER_MACHINE_COUNT} diff --git a/templates/cluster-template-without-lb.yaml b/templates/cluster-template-without-lb.yaml index 5ff44c564..996f6eb64 100644 --- a/templates/cluster-template-without-lb.yaml +++ b/templates/cluster-template-without-lb.yaml @@ -103,7 +103,7 @@ spec: replicas: 1 version: ${KUBERNETES_VERSION} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackCluster metadata: name: ${CLUSTER_NAME} @@ -138,7 +138,7 @@ spec: dnsNameservers: - ${OPENSTACK_DNS_NAMESERVERS} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-control-plane @@ -151,7 +151,7 @@ spec: name: ${OPENSTACK_IMAGE_NAME} sshKeyName: ${OPENSTACK_SSH_KEY_NAME} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-md-0 diff --git a/templates/cluster-template.yaml b/templates/cluster-template.yaml index fd3c11c8c..b69a49175 100644 --- a/templates/cluster-template.yaml +++ b/templates/cluster-template.yaml @@ -103,7 +103,7 @@ spec: replicas: ${CONTROL_PLANE_MACHINE_COUNT} version: ${KUBERNETES_VERSION} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackCluster metadata: name: ${CLUSTER_NAME} @@ -140,7 +140,7 @@ spec: dnsNameservers: - ${OPENSTACK_DNS_NAMESERVERS} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-control-plane @@ -153,7 +153,7 @@ spec: name: ${OPENSTACK_IMAGE_NAME} sshKeyName: ${OPENSTACK_SSH_KEY_NAME} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-md-0 diff --git a/templates/clusterclass-dev-test.yaml b/templates/clusterclass-dev-test.yaml index eff4f62ae..c3a9c6078 100644 --- a/templates/clusterclass-dev-test.yaml +++ b/templates/clusterclass-dev-test.yaml @@ -5,17 +5,17 @@ metadata: spec: controlPlane: templateRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlaneTemplate name: dev-test-control-plane machineInfrastructure: templateRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate name: dev-test-control-plane-machine infrastructure: templateRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackClusterTemplate name: dev-test-openstackcluster workers: @@ -23,12 +23,12 @@ spec: - class: default-worker bootstrap: templateRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate name: dev-test-default-worker-bootstraptemplate infrastructure: templateRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate name: dev-test-default-worker-machine variables: @@ -53,16 +53,22 @@ spec: type: string description: | The base name of the OpenStack image that is used for creating the servers. - This will be combined with the k8s version to create the full name. E.g. imageName-v1.31.2. - default: "ubuntu-2404-kube" - name: addImageVersion required: false schema: openAPIV3Schema: type: boolean description: | - Add a suffix with the Kubernetes version to the imageName. E.g. imageName-v1.32.2. + Add a suffix with the Kubernetes version to the imageName or imageRef. E.g. imageName-v1.32.2. default: true + - name: imageRef + required: false + schema: + openAPIV3Schema: + type: string + description: | + The name of the ORC Image object that is used for creating the servers. + default: "node-image" - name: injectIgnitionSysext required: false schema: @@ -109,6 +115,12 @@ spec: name: type: string description: "Name of the image to use for bastion" + imageRef: + type: object + properties: + name: + type: string + description: "Name of the ORC Image to use for bastion" sshKeyName: type: string description: "SSH key pair name for bastion access" @@ -120,38 +132,71 @@ spec: type: string description: "Availability zone for the bastion host" patches: - - name: image - description: "Sets the OpenStack image that is used for creating the servers." + - name: imageName + description: "Sets the OpenStack image that is used for creating the servers using a name filter." + enabledIf: "{{ if .imageName }}true{{ end }}" definitions: - selector: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate matchResources: controlPlane: true jsonPatches: + - op: remove + path: /spec/template/spec/image/imageRef - op: add - path: /spec/template/spec/image/filter/name + path: /spec/template/spec/image/filter valueFrom: template: | - {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }} + name: {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }} - selector: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate matchResources: machineDeploymentClass: names: - default-worker jsonPatches: + - op: remove + path: /spec/template/spec/image/imageRef - op: add - path: /spec/template/spec/image/filter/name + path: /spec/template/spec/image/filter valueFrom: template: | - {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.machineDeployment.version }}{{ end }} + name: {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.machineDeployment.version }}{{ end }} + - name: imageRef + description: "Sets the OpenStack image that is used for creating the servers using an ORC Image reference." + enabledIf: "{{ if .imageRef }}true{{ end }}" + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: replace + path: /spec/template/spec/image/imageRef/name + valueFrom: + template: | + {{ .imageRef }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }} + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 + kind: OpenStackMachineTemplate + matchResources: + machineDeploymentClass: + names: + - default-worker + jsonPatches: + - op: replace + path: /spec/template/spec/image/imageRef/name + valueFrom: + template: | + {{ .imageRef }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }} - name: identityRef description: "Sets the OpenStack identity reference." definitions: - selector: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackClusterTemplate matchResources: infrastructureCluster: true @@ -165,7 +210,7 @@ spec: enabledIf: "{{ if .allowedCIDRs }}{{ gt (len .allowedCIDRs) 0 }}{{ end }}" definitions: - selector: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackClusterTemplate matchResources: infrastructureCluster: true @@ -179,7 +224,7 @@ spec: enabledIf: "{{ if .bastion }}{{ .bastion.enabled }}{{ end }}" definitions: - selector: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackClusterTemplate matchResources: infrastructureCluster: true @@ -193,7 +238,7 @@ spec: enabledIf: "{{ .injectIgnitionSysext }}" definitions: - selector: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta2 kind: KubeadmControlPlaneTemplate matchResources: controlPlane: true @@ -211,12 +256,18 @@ spec: nodeRegistration: name: $${COREOS_OPENSTACK_HOSTNAME} kubeletExtraArgs: - provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID} + - name: cloud-provider + value: external + - name: provider-id + value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID} joinConfiguration: nodeRegistration: name: $${COREOS_OPENSTACK_HOSTNAME} kubeletExtraArgs: - provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID} + - name: cloud-provider + value: external + - name: provider-id + value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID} format: ignition ignition: containerLinuxConfig: @@ -233,16 +284,16 @@ spec: mode: 0644 contents: remote: - url: https://github.com/flatcar/sysext-bakery/releases/download/latest/kubernetes-{{ $minor }}.conf + url: https://extensions.flatcar.org/extensions/kubernetes/kubernetes-{{ $minor }}.conf - path: /etc/sysupdate.d/noop.conf mode: 0644 contents: remote: - url: https://github.com/flatcar/sysext-bakery/releases/download/latest/noop.conf + url: https://extensions.flatcar.org/extensions/noop.conf - path: /opt/extensions/kubernetes/kubernetes-{{ .builtin.controlPlane.version }}-x86-64.raw contents: remote: - url: https://github.com/flatcar/sysext-bakery/releases/download/latest/kubernetes-{{ .builtin.controlPlane.version }}-x86-64.raw + url: https://extensions.flatcar.org/extensions/kubernetes-{{ .builtin.controlPlane.version }}-x86-64.raw systemd: units: - name: systemd-sysupdate.service @@ -277,7 +328,7 @@ spec: [Service] EnvironmentFile=/run/metadata/flatcar - selector: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta2 kind: KubeadmConfigTemplate matchResources: machineDeploymentClass: @@ -297,7 +348,10 @@ spec: nodeRegistration: name: $${COREOS_OPENSTACK_HOSTNAME} kubeletExtraArgs: - provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID} + - name: cloud-provider + value: external + - name: provider-id + value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID} format: ignition ignition: containerLinuxConfig: @@ -314,16 +368,16 @@ spec: mode: 0644 contents: remote: - url: https://github.com/flatcar/sysext-bakery/releases/download/latest/kubernetes-{{ $minor }}.conf + url: https://extensions.flatcar.org/extensions/kubernetes/kubernetes-{{ $minor }}.conf - path: /etc/sysupdate.d/noop.conf mode: 0644 contents: remote: - url: https://github.com/flatcar/sysext-bakery/releases/download/latest/noop.conf + url: https://extensions.flatcar.org/extensions/noop.conf - path: /opt/extensions/kubernetes/kubernetes-{{ .builtin.machineDeployment.version }}-x86-64.raw contents: remote: - url: https://github.com/flatcar/sysext-bakery/releases/download/latest/kubernetes-{{ .builtin.machineDeployment.version }}-x86-64.raw + url: https://extensions.flatcar.org/extensions/kubernetes-{{ .builtin.machineDeployment.version }}-x86-64.raw systemd: units: - name: systemd-sysupdate.service @@ -365,7 +419,6 @@ metadata: spec: template: spec: - files: [] joinConfiguration: nodeRegistration: kubeletExtraArgs: @@ -382,6 +435,11 @@ metadata: spec: template: spec: + rollout: + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 kubeadmConfigSpec: clusterConfiguration: controllerManager: @@ -405,7 +463,7 @@ spec: value: "openstack:///{{ v1.instance_id }}" name: "{{ v1.local_hostname }}" --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackClusterTemplate metadata: name: dev-test-openstackcluster @@ -445,7 +503,7 @@ spec: dnsNameservers: - 8.8.8.8 --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: dev-test-control-plane-machine @@ -454,11 +512,11 @@ spec: spec: flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR:=m1.medium} image: - filter: - name: overridden-by-patch + imageRef: + name: node-image sshKeyName: ${OPENSTACK_SSH_KEY_NAME:=""} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: dev-test-default-worker-machine @@ -467,6 +525,6 @@ spec: spec: flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR:=m1.small} image: - filter: - name: overridden-by-patch + imageRef: + name: node-image sshKeyName: ${OPENSTACK_SSH_KEY_NAME:=""} diff --git a/test/e2e/data/autoscaler/autoscaler-to-workload-workload.yaml b/test/e2e/data/autoscaler/autoscaler-to-workload-workload.yaml new file mode 100644 index 000000000..31418cc41 --- /dev/null +++ b/test/e2e/data/autoscaler/autoscaler-to-workload-workload.yaml @@ -0,0 +1,175 @@ +# This yaml deploys the autoscaler on a management cluster and configures it to match +# against the corresponding Cluster API workload cluster. + +# Defines the service used by the cluster autoscaler and gives it +# RBAC permissions to look at all the capi/capo resources in the namespace. +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cluster-autoscaler + namespace: ${CLUSTER_NAMESPACE} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: cluster-autoscaler + namespace: ${CLUSTER_NAMESPACE} +rules: +- apiGroups: + - cluster.x-k8s.io + resources: + - clusters + - machinedeployments + - machinedeployments/scale + - machinesets + - machines + - machinepools + verbs: + - get + - list + - watch +- apiGroups: + - cluster.x-k8s.io + resources: + - machinedeployments + - machinedeployments/scale + - machinesets + - machinepools + - machines + verbs: + - patch + - update +- apiGroups: + - bootstrap.cluster.x-k8s.io + resources: + - kubeadmconfigtemplates + verbs: + - get + - list + - watch +- apiGroups: + - controlplane.cluster.x-k8s.io + resources: + - kubeadmcontrolplanes + - kubeadmcontrolplanetemplates + verbs: + - get + - list + - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - openstackmachinetemplates + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - watch + - update + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: cluster-autoscaler + namespace: ${CLUSTER_NAMESPACE} +subjects: +- kind: ServiceAccount + name: cluster-autoscaler + namespace: ${CLUSTER_NAMESPACE} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: cluster-autoscaler +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cluster-autoscaler + namespace: ${CLUSTER_NAMESPACE} + labels: + app: cluster-autoscaler +spec: + selector: + matchLabels: + app: cluster-autoscaler + replicas: 1 + template: + metadata: + labels: + app: cluster-autoscaler + spec: + containers: + - image: registry.k8s.io/autoscaling/cluster-autoscaler:${AUTOSCALER_VERSION} + name: cluster-autoscaler + command: + - /cluster-autoscaler + args: + - --cloud-provider=clusterapi + # Specify kubeconfig for workload cluster + - --kubeconfig=/workload-cluster/value + - --clusterapi-cloud-config-authoritative + # Limit cluster autoscaler to only match against resources belonging to a single Cluster API cluster + - --node-group-auto-discovery=clusterapi:namespace=${CLUSTER_NAMESPACE},clusterName=${CLUSTER_NAME} + # Set a short scale down unneeded time, so we don't have to wait too long during e2e testing + - --scale-down-unneeded-time=1m + # Set a short scale down delay after add time, so we don't have to wait too long during e2e testing + - --scale-down-delay-after-add=1m + # Set a short scale down delay after delete time, so we don't have to wait too long during e2e testing + - --scale-down-delay-after-delete=1m + # Set a short scale down delay after failure time, so we don't have to wait too long during e2e testing + - --scale-down-delay-after-failure=1m + # Disable special handling for pods in kube-system to prevent flakes when one of the core-dns pod is scheduled + # on one of the MachineDeployment machines and the test is trying to scale down to zero. + - --skip-nodes-with-system-pods=false + # Set a max nodes limit as safeguard so that the test does not scale up unbounded. + # Note: The E2E test should only go up to 4 (assuming it starts with a min node group size of 2). + # Using 6 for additional some buffer and to allow different starting min node group sizes. + - --max-nodes-total=6 + # CABPK sets this taint on startup, so we should configure it here accordingly + - --startup-taint=node.cluster.x-k8s.io/uninitialized + # Set the log verbosity + - --v=4 + - --kube-client-qps=50 + - --kube-client-burst=100 + volumeMounts: + - name: kubeconfig-workload-cluster + mountPath: /workload-cluster + readOnly: true + # Run the autoscaler on control plane Machines to avoid disruptions when scaling to 0. + nodeSelector: + node-role.kubernetes.io/control-plane: "" + tolerations: + - key: node-role.kubernetes.io/control-plane + effect: NoSchedule + operator: Exists + serviceAccountName: cluster-autoscaler + terminationGracePeriodSeconds: 10 + volumes: + - name: kubeconfig-workload-cluster + secret: + secretName: ${CLUSTER_NAME}-kubeconfig + optional: false diff --git a/test/e2e/data/ccm/cloud-controller-manager.yaml b/test/e2e/data/ccm/cloud-controller-manager.yaml index 7fb50d483..60c03ff32 100644 --- a/test/e2e/data/ccm/cloud-controller-manager.yaml +++ b/test/e2e/data/ccm/cloud-controller-manager.yaml @@ -1,5 +1,4 @@ -# From: https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/master/manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml -# NOTE! We modify the node-selector to have empty value (""). This matches what kubeadm does. +# From: https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/tags/v1.35.0/manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml apiVersion: v1 kind: ServiceAccount metadata: @@ -24,8 +23,13 @@ spec: labels: k8s-app: openstack-cloud-controller-manager spec: - nodeSelector: - node-role.kubernetes.io/control-plane: "" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io/control-plane + operator: Exists securityContext: runAsUser: 1001 tolerations: @@ -43,7 +47,7 @@ spec: serviceAccountName: cloud-controller-manager containers: - name: openstack-cloud-controller-manager - image: registry.k8s.io/provider-os/openstack-cloud-controller-manager:v1.33.0 + image: registry.k8s.io/provider-os/openstack-cloud-controller-manager:v1.35.0 args: - /bin/openstack-cloud-controller-manager - --v=1 @@ -85,7 +89,7 @@ spec: secret: secretName: cloud-config --- -# https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/heads/master/manifests/controller-manager/cloud-controller-manager-role-bindings.yaml +# https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/tags/v1.35.0/manifests/controller-manager/cloud-controller-manager-role-bindings.yaml # NOTE! We need to "extract" the List or the CRS will fail to apply. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -113,7 +117,7 @@ subjects: name: cloud-controller-manager namespace: kube-system --- -# https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/heads/master/manifests/controller-manager/cloud-controller-manager-roles.yaml +# https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/tags/v1.35.0/manifests/controller-manager/cloud-controller-manager-roles.yaml # NOTE! We need to "extract" the List or the CRS will fail to apply. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/test/e2e/data/cni/calico.yaml b/test/e2e/data/cni/calico.yaml index e983e61f1..8a0c1969e 100644 --- a/test/e2e/data/cni/calico.yaml +++ b/test/e2e/data/cni/calico.yaml @@ -1,5 +1,5 @@ -# This is taken from https://github.com/projectcalico/calico/blob/v3.30.2/manifests/calico.yaml - +# This is taken from https://github.com/projectcalico/calico/blob/v3.31.3/manifests/calico.yaml +--- # Source: calico/templates/calico-kube-controllers.yaml # This manifest creates a Pod Disruption Budget for Controller to allow K8s Cluster Autoscaler to evict @@ -107,107 +107,56 @@ spec: - name: v1 schema: openAPIV3Schema: - description: BGPConfiguration contains the configuration for any BGP routing. 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: BGPConfigurationSpec contains the values of the BGP configuration. properties: asNumber: - description: 'ASNumber is the default AS number used by a node. [Default: 64512]' format: int32 type: integer bindMode: - description: |- - BindMode indicates whether to listen for BGP connections on all addresses (None) - or only on the node's canonical IP address Node.Spec.BGP.IPvXAddress (NodeIP). - Default behaviour is to listen for BGP connections on all addresses. type: string communities: - description: Communities is a list of BGP community values and their arbitrary names for tagging routes. items: - description: Community contains standard or large community value and its name. properties: name: - description: Name given to community value. type: string value: - description: |- - Value must be of format `aa:nn` or `aa:nn:mm`. - For standard community use `aa:nn` format, where `aa` and `nn` are 16 bit number. - For large community use `aa:nn:mm` format, where `aa`, `nn` and `mm` are 32 bit number. - Where, `aa` is an AS Number, `nn` and `mm` are per-AS identifier. pattern: ^(\d+):(\d+)$|^(\d+):(\d+):(\d+)$ type: string type: object type: array ignoredInterfaces: - description: IgnoredInterfaces indicates the network interfaces that needs to be excluded when reading device routes. items: type: string type: array listenPort: - description: ListenPort is the port where BGP protocol should listen. Defaults to 179 maximum: 65535 minimum: 1 type: integer localWorkloadPeeringIPV4: - description: |- - The virtual IPv4 address of the node with which its local workload is expected to peer. - It is recommended to use a link-local address. type: string localWorkloadPeeringIPV6: - description: |- - The virtual IPv6 address of the node with which its local workload is expected to peer. - It is recommended to use a link-local address. type: string logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: INFO]' type: string nodeMeshMaxRestartTime: - description: |- - Time to allow for software restart for node-to-mesh peerings. When specified, this is configured - as the graceful restart timeout. When not specified, the BIRD default of 120s is used. - This field can only be set on the default BGPConfiguration instance and requires that NodeMesh is enabled type: string nodeMeshPassword: - description: |- - Optional BGP password for full node-to-mesh peerings. - This field can only be set on the default BGPConfiguration instance and requires that NodeMesh is enabled properties: secretKeyRef: - description: Selects a key of a secret in the node 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 @@ -215,55 +164,40 @@ spec: x-kubernetes-map-type: atomic type: object nodeToNodeMeshEnabled: - description: 'NodeToNodeMeshEnabled sets whether full node to node BGP mesh is enabled. [Default: true]' type: boolean prefixAdvertisements: - description: PrefixAdvertisements contains per-prefix advertisement configuration. items: - description: PrefixAdvertisement configures advertisement properties for the specified CIDR. properties: cidr: - description: CIDR for which properties should be advertised. type: string communities: - description: |- - Communities can be list of either community names already defined in `Specs.Communities` or community value of format `aa:nn` or `aa:nn:mm`. - For standard community use `aa:nn` format, where `aa` and `nn` are 16 bit number. - For large community use `aa:nn:mm` format, where `aa`, `nn` and `mm` are 32 bit number. - Where,`aa` is an AS Number, `nn` and `mm` are per-AS identifier. items: type: string type: array type: object type: array serviceClusterIPs: - description: |- - ServiceClusterIPs are the CIDR blocks from which service cluster IPs are allocated. - If specified, Calico will advertise these blocks, as well as any cluster IPs within them. items: - description: ServiceClusterIPBlock represents a single allowed ClusterIP CIDR block. properties: cidr: type: string type: object type: array serviceExternalIPs: - description: |- - ServiceExternalIPs are the CIDR blocks for Kubernetes Service External IPs. - Kubernetes Service ExternalIPs will only be advertised if they are within one of these blocks. items: - description: ServiceExternalIPBlock represents a single allowed External IP CIDR block. properties: cidr: type: string type: object type: array + serviceLoadBalancerAggregation: + default: Enabled + enum: + - Enabled + - Disabled + type: string serviceLoadBalancerIPs: - description: |- - ServiceLoadBalancerIPs are the CIDR blocks for Kubernetes Service LoadBalancer IPs. - Kubernetes Service status.LoadBalancer.Ingress IPs will only be advertised if they are within one of these blocks. items: - description: ServiceLoadBalancerIPBlock represents a single allowed LoadBalancer IP CIDR block. properties: cidr: type: string @@ -296,29 +230,15 @@ spec: openAPIV3Schema: 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: BGPFilterSpec contains the IPv4 and IPv6 filter rules of the BGP Filter. properties: exportV4: - description: The ordered set of IPv4 BGPFilter rules acting on exporting routes to a peer. items: - description: BGPFilterRuleV4 defines a BGP filter rule consisting a single IPv4 CIDR block and a filter action for this CIDR. properties: action: type: string @@ -348,9 +268,7 @@ spec: type: object type: array exportV6: - description: The ordered set of IPv6 BGPFilter rules acting on exporting routes to a peer. items: - description: BGPFilterRuleV6 defines a BGP filter rule consisting a single IPv6 CIDR block and a filter action for this CIDR. properties: action: type: string @@ -380,9 +298,7 @@ spec: type: object type: array importV4: - description: The ordered set of IPv4 BGPFilter rules acting on importing routes from a peer. items: - description: BGPFilterRuleV4 defines a BGP filter rule consisting a single IPv4 CIDR block and a filter action for this CIDR. properties: action: type: string @@ -412,9 +328,7 @@ spec: type: object type: array importV6: - description: The ordered set of IPv6 BGPFilter rules acting on importing routes from a peer. items: - description: BGPFilterRuleV6 defines a BGP filter rule consisting a single IPv6 CIDR block and a filter action for this CIDR. properties: action: type: string @@ -470,51 +384,28 @@ spec: openAPIV3Schema: 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: BGPPeerSpec contains the specification for a BGPPeer resource. properties: asNumber: - description: The AS Number of the peer. format: int32 type: integer filters: - description: The ordered set of BGPFilters applied on this BGP peer. items: type: string type: array keepOriginalNextHop: - description: |- - Option to keep the original nexthop field when routes are sent to a BGP Peer. - Setting "true" configures the selected BGP Peers node to use the "next hop keep;" - instead of "next hop self;"(default) in the specific branch of the Node on "bird.cfg". - Note: that this field is deprecated. Users should use the NextHopMode field to control - the next hop attribute for a BGP peer. type: boolean + localASNumber: + format: int32 + type: integer localWorkloadSelector: - description: |- - Selector for the local workload that the node should peer with. When this is set, the peerSelector and peerIP fields must be empty, - and the ASNumber must not be empty. type: string maxRestartTime: - description: |- - Time to allow for software restart. When specified, this is configured as the graceful - restart timeout. When not specified, the BIRD default of 120s is used. type: string nextHopMode: allOf: @@ -526,53 +417,24 @@ spec: - Auto - Self - Keep - description: |- - NextHopMode defines the method of calculating the next hop attribute for received routes. - This replaces and expands the deprecated KeepOriginalNextHop field. - Users should use this setting to control the next hop attribute for a BGP peer. - When this is set, the value of the KeepOriginalNextHop field is ignored. - if neither keepOriginalNextHop or nextHopMode is specified, BGP's default behaviour is used. - Set it to “Auto” to apply BGP’s default behaviour. - Set it to "Self" to configure "next hop self;" in "bird.cfg". - Set it to "Keep" to configure "next hop keep;" in "bird.cfg". type: string node: - description: |- - The node name identifying the Calico node instance that is targeted by this peer. - If this is not set, and no nodeSelector is specified, then this BGP peer selects all - nodes in the cluster. type: string nodeSelector: - description: |- - Selector for the nodes that should have this peering. When this is set, the Node - field must be empty. type: string numAllowedLocalASNumbers: - description: |- - Maximum number of local AS numbers that are allowed in the AS path for received routes. - This removes BGP loop prevention and should only be used if absolutely necessary. format: int32 type: integer password: - description: Optional BGP password for the peerings generated by this BGPPeer resource. properties: secretKeyRef: - description: Selects a key of a secret in the node 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 @@ -580,37 +442,19 @@ spec: x-kubernetes-map-type: atomic type: object peerIP: - description: |- - The IP address of the peer followed by an optional port number to peer with. - If port number is given, format should be `[]:port` or `:` for IPv4. - If optional port number is not set, and this peer IP and ASNumber belongs to a calico/node - with ListenPort set in BGPConfiguration, then we use that port to peer. type: string peerSelector: - description: |- - Selector for the remote nodes to peer with. When this is set, the PeerIP and - ASNumber fields must be empty. For each peering between the local node and - selected remote nodes, we configure an IPv4 peering if both ends have - NodeBGPSpec.IPv4Address specified, and an IPv6 peering if both ends have - NodeBGPSpec.IPv6Address specified. The remote AS number comes from the remote - node's NodeBGPSpec.ASNumber, or the global default if that is not set. type: string reachableBy: - description: |- - Add an exact, i.e. /32, static route toward peer IP in order to prevent route flapping. - ReachableBy contains the address of the gateway which peer can be reached by. + type: string + reversePeering: + enum: + - Auto + - Manual type: string sourceAddress: - description: |- - Specifies whether and how to configure a source address for the peerings generated by - this BGPPeer resource. Default value "UseNodeIP" means to configure the node IP as the - source address. "None" means not to configure a source address. type: string ttlSecurity: - description: |- - TTLSecurity enables the generalized TTL security mechanism (GTSM) which protects against spoofed packets by - ignoring received packets with a smaller than expected TTL value. The provided value is the number of hops - (edges) between the peers. type: integer type: object type: object @@ -639,32 +483,16 @@ spec: openAPIV3Schema: 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: BlockAffinitySpec contains the specification for a BlockAffinity resource. properties: cidr: type: string deleted: - description: |- - Deleted indicates that this block affinity is being deleted. - This field is a string for compatibility with older releases that - mistakenly treat this field as a string. type: string node: type: string @@ -704,143 +532,87 @@ spec: openAPIV3Schema: 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: CalicoNodeStatusSpec contains the specification for a CalicoNodeStatus resource. properties: classes: - description: |- - Classes declares the types of information to monitor for this calico/node, - and allows for selective status reporting about certain subsets of information. items: type: string type: array node: - description: The node name identifies the Calico node instance for node status. type: string updatePeriodSeconds: - description: |- - UpdatePeriodSeconds is the period at which CalicoNodeStatus should be updated. - Set to 0 to disable CalicoNodeStatus refresh. Maximum update period is one day. format: int32 type: integer type: object status: - description: |- - CalicoNodeStatusStatus defines the observed state of CalicoNodeStatus. - No validation needed for status since it is updated by Calico. properties: agent: - description: Agent holds agent status on the node. properties: birdV4: - description: BIRDV4 represents the latest observed status of bird4. properties: lastBootTime: - description: LastBootTime holds the value of lastBootTime from bird.ctl output. type: string lastReconfigurationTime: - description: LastReconfigurationTime holds the value of lastReconfigTime from bird.ctl output. type: string routerID: - description: Router ID used by bird. type: string state: - description: The state of the BGP Daemon. type: string version: - description: Version of the BGP daemon type: string type: object birdV6: - description: BIRDV6 represents the latest observed status of bird6. properties: lastBootTime: - description: LastBootTime holds the value of lastBootTime from bird.ctl output. type: string lastReconfigurationTime: - description: LastReconfigurationTime holds the value of lastReconfigTime from bird.ctl output. type: string routerID: - description: Router ID used by bird. type: string state: - description: The state of the BGP Daemon. type: string version: - description: Version of the BGP daemon type: string type: object type: object bgp: - description: BGP holds node BGP status. properties: numberEstablishedV4: - description: The total number of IPv4 established bgp sessions. type: integer numberEstablishedV6: - description: The total number of IPv6 established bgp sessions. type: integer numberNotEstablishedV4: - description: The total number of IPv4 non-established bgp sessions. type: integer numberNotEstablishedV6: - description: The total number of IPv6 non-established bgp sessions. type: integer peersV4: - description: PeersV4 represents IPv4 BGP peers status on the node. items: - description: CalicoNodePeer contains the status of BGP peers on the node. properties: peerIP: - description: IP address of the peer whose condition we are reporting. type: string since: - description: Since the state or reason last changed. type: string state: - description: State is the BGP session state. type: string type: - description: |- - Type indicates whether this peer is configured via the node-to-node mesh, - or via en explicit global or per-node BGPPeer object. type: string type: object type: array peersV6: - description: PeersV6 represents IPv6 BGP peers status on the node. items: - description: CalicoNodePeer contains the status of BGP peers on the node. properties: peerIP: - description: IP address of the peer whose condition we are reporting. type: string since: - description: Since the state or reason last changed. type: string state: - description: State is the BGP session state. type: string type: - description: |- - Type indicates whether this peer is configured via the node-to-node mesh, - or via en explicit global or per-node BGPPeer object. type: string type: object type: array @@ -851,70 +623,48 @@ spec: - numberNotEstablishedV6 type: object lastUpdated: - description: |- - LastUpdated is a timestamp representing the server time when CalicoNodeStatus object - last updated. It is represented in RFC3339 form and is in UTC. format: date-time nullable: true type: string routes: - description: Routes reports routes known to the Calico BGP daemon on the node. properties: routesV4: - description: RoutesV4 represents IPv4 routes on the node. items: - description: CalicoNodeRoute contains the status of BGP routes on the node. properties: destination: - description: Destination of the route. type: string gateway: - description: Gateway for the destination. type: string interface: - description: Interface for the destination type: string learnedFrom: - description: LearnedFrom contains information regarding where this route originated. properties: peerIP: - description: If sourceType is NodeMesh or BGPPeer, IP address of the router that sent us this route. type: string sourceType: - description: Type of the source where a route is learned from. type: string type: object type: - description: Type indicates if the route is being used for forwarding or not. type: string type: object type: array routesV6: - description: RoutesV6 represents IPv6 routes on the node. items: - description: CalicoNodeRoute contains the status of BGP routes on the node. properties: destination: - description: Destination of the route. type: string gateway: - description: Gateway for the destination. type: string interface: - description: Interface for the destination type: string learnedFrom: - description: LearnedFrom contains information regarding where this route originated. properties: peerIP: - description: If sourceType is NodeMesh or BGPPeer, IP address of the router that sent us this route. type: string sourceType: - description: Type of the source where a route is learned from. type: string type: object type: - description: Type indicates if the route is being used for forwarding or not. type: string type: object type: array @@ -944,44 +694,24 @@ spec: - name: v1 schema: openAPIV3Schema: - description: ClusterInformation contains the cluster specific information. 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: ClusterInformationSpec contains the values of describing the cluster. properties: calicoVersion: - description: CalicoVersion is the version of Calico that the cluster is running type: string clusterGUID: - description: ClusterGUID is the GUID of the cluster type: string clusterType: - description: ClusterType describes the type of the cluster type: string datastoreReady: - description: |- - DatastoreReady is used during significant datastore migrations to signal to components - such as Felix that it should wait before accessing the datastore. type: boolean variant: - description: Variant declares which variant of Calico should be active. type: string type: object type: object @@ -1051,6 +781,16 @@ spec: - Enable - Disable type: string + bpfAttachType: + description: |- + BPFAttachType controls how are the BPF programs at the network interfaces attached. + By default `TCX` is used where available to enable easier coexistence with 3rd party programs. + `TC` can force the legacy method of attaching via a qdisc. `TCX` falls back to `TC` if `TCX` is not available. + [Default: TCX] + enum: + - TC + - TCX + type: string bpfCTLBLogFilter: description: |- BPFCTLBLogFilter specifies, what is logged by connect time load balancer when BPFLogLevel is @@ -1092,7 +832,10 @@ spec: BPFConntrackCleanupMode controls how BPF conntrack entries are cleaned up. `Auto` will use a BPF program if supported, falling back to userspace if not. `Userspace` will always use the userspace cleanup code. `BPFProgram` will always use the BPF program (failing if not supported). - [Default: Auto] + + /To be deprecated in future versions as conntrack map type changed to + lru_hash and userspace cleanup is the only mode that is supported. + [Default: Userspace] enum: - Auto - Userspace @@ -1112,9 +855,9 @@ spec: incorrect values. properties: creationGracePeriod: - description: |2- - CreationGracePeriod gives a generic grace period to new connection - before they are considered for cleanup [Default: 10s]. + description: |- + CreationGracePeriod gives a generic grace period to new connections + before they are considered for cleanup [Default: 10s]. pattern: ^(([0-9]*(\.[0-9]*)?(ms|s|h|m|us)+)+|Auto)$ type: string genericTimeout: @@ -1200,7 +943,7 @@ spec: cannot insert their own BPF programs to interfere with Calico's. [Default: true] type: boolean bpfEnabled: - description: 'BPFEnabled, if enabled Felix will use the BPF dataplane. [Default: false]' + description: "BPFEnabled, if enabled Felix will use the BPF dataplane. [Default: false]" type: boolean bpfEnforceRPF: description: |- @@ -1260,12 +1003,30 @@ spec: - Enabled - Disabled type: string + bpfJITHardening: + allOf: + - enum: + - Auto + - Strict + - enum: + - Auto + - Strict + description: |- + BPFJITHardening controls BPF JIT hardening. When set to "Auto", Felix will set JIT hardening to 1 + if it detects the current value is 2 (strict mode that hurts performance). When set to "Strict", + Felix will not modify the JIT hardening setting. [Default: Auto] + type: string bpfKubeProxyEndpointSlicesEnabled: description: |- BPFKubeProxyEndpointSlicesEnabled is deprecated and has no effect. BPF kube-proxy always accepts endpoint slices. This option will be removed in the next release. type: boolean + bpfKubeProxyHealthzPort: + description: |- + BPFKubeProxyHealthzPort, in BPF mode, controls the port that Felix's embedded kube-proxy health check server binds to. + The health check server is used by external load balancers to determine if this node should receive traffic. [Default: 10256] + type: integer bpfKubeProxyIptablesCleanupEnabled: description: |- BPFKubeProxyIptablesCleanupEnabled, if enabled in BPF mode, Felix will proactively clean up the upstream @@ -1404,6 +1165,9 @@ spec: - Disabled - L2Only type: string + cgroupV2Path: + description: CgroupV2Path overrides the default location where to find the cgroup hierarchy. + type: string chainInsertMode: description: |- ChainInsertMode controls whether Felix hooks the kernel's top-level iptables chains by inserting a rule @@ -1596,7 +1360,7 @@ spec: description: FlowLogGoldmaneServer is the flow server endpoint to which flow data should be published. type: string flowLogsLocalReporter: - description: 'FlowLogsLocalReporter configures local unix socket for reporting flow data from each node. [Default: Disabled]' + description: "FlowLogsLocalReporter configures local unix socket for reporting flow data from each node. [Default: Disabled]" enum: - Disabled - Enabled @@ -1657,10 +1421,10 @@ spec: [Default: false] type: boolean healthHost: - description: 'HealthHost is the host that the health server should bind to. [Default: localhost]' + description: "HealthHost is the host that the health server should bind to. [Default: localhost]" type: string healthPort: - description: 'HealthPort is the TCP port that the health server should bind to. [Default: 9099]' + description: "HealthPort is the TCP port that the health server should bind to. [Default: 9099]" type: integer healthTimeoutOverrides: description: |- @@ -1831,17 +1595,17 @@ spec: to Debug level logs. type: string logFilePath: - description: 'LogFilePath is the full path to the Felix log. Set to none to disable file logging. [Default: /var/log/calico/felix.log]' + description: "LogFilePath is the full path to the Felix log. Set to none to disable file logging. [Default: /var/log/calico/felix.log]" type: string logPrefix: - description: 'LogPrefix is the log prefix that Felix uses when rendering LOG rules. [Default: calico-packet]' + description: "LogPrefix is the log prefix that Felix uses when rendering LOG rules. [Default: calico-packet]" type: string logSeverityFile: - description: 'LogSeverityFile is the log severity above which logs are sent to the log file. [Default: Info]' + description: "LogSeverityFile is the log severity above which logs are sent to the log file. [Default: Info]" pattern: ^(?i)(Trace|Debug|Info|Warning|Error|Fatal)?$ type: string logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info]' + description: "LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info]" pattern: ^(?i)(Trace|Debug|Info|Warning|Error|Fatal)?$ type: string logSeveritySys: @@ -1880,6 +1644,17 @@ spec: is leaving the network. By default the address used is an address on the interface the traffic is leaving on (i.e. it uses the iptables MASQUERADE target). type: string + natOutgoingExclusions: + description: |- + When a IP pool setting `natOutgoing` is true, packets sent from Calico networked containers in this IP pool to destinations will be masqueraded. + Configure which type of destinations is excluded from being masqueraded. + - IPPoolsOnly: destinations outside of this IP pool will be masqueraded. + - IPPoolsAndHostIPs: destinations outside of this IP pool and all hosts will be masqueraded. + [Default: IPPoolsOnly] + enum: + - IPPoolsOnly + - IPPoolsAndHostIPs + type: string natPortRange: anyOf: - type: integer @@ -1923,14 +1698,14 @@ spec: format: int32 type: integer nftablesMode: - description: 'NFTablesMode configures nftables support in Felix. [Default: Disabled]' + description: "NFTablesMode configures nftables support in Felix. [Default: Disabled]" enum: - Disabled - Enabled - Auto type: string nftablesRefreshInterval: - description: 'NftablesRefreshInterval controls the interval at which Felix periodically refreshes the nftables rules. [Default: 90s]' + description: "NftablesRefreshInterval controls the interval at which Felix periodically refreshes the nftables rules. [Default: 90s]" type: string openstackRegion: description: |- @@ -1944,19 +1719,27 @@ spec: PolicySyncPathPrefix is used to by Felix to communicate policy changes to external services, like Application layer policy. [Default: Empty] type: string + programClusterRoutes: + description: |- + ProgramClusterRoutes specifies whether Felix should program IPIP routes instead of BIRD. + Felix always programs VXLAN routes. [Default: Disabled] + enum: + - Enabled + - Disabled + type: string prometheusGoMetricsEnabled: description: |- PrometheusGoMetricsEnabled disables Go runtime metrics collection, which the Prometheus client does by default, when set to false. This reduces the number of metrics reported, reducing Prometheus load. [Default: true] type: boolean prometheusMetricsEnabled: - description: 'PrometheusMetricsEnabled enables the Prometheus metrics server in Felix if set to true. [Default: false]' + description: "PrometheusMetricsEnabled enables the Prometheus metrics server in Felix if set to true. [Default: false]" type: boolean prometheusMetricsHost: - description: 'PrometheusMetricsHost is the host that the Prometheus metrics server should bind to. [Default: empty]' + description: "PrometheusMetricsHost is the host that the Prometheus metrics server should bind to. [Default: empty]" type: string prometheusMetricsPort: - description: 'PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. [Default: 9091]' + description: "PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. [Default: 9091]" type: integer prometheusProcessMetricsEnabled: description: |- @@ -1981,9 +1764,14 @@ spec: pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$ type: string reportingTTL: - description: 'ReportingTTL is the time-to-live setting for process-wide status reports. [Default: 90s]' + description: "ReportingTTL is the time-to-live setting for process-wide status reports. [Default: 90s]" pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$ type: string + requireMTUFile: + description: |- + RequireMTUFile specifies whether mtu file is required to start the felix. + Optional as to keep the same as previous behavior. [Default: false] + type: boolean routeRefreshInterval: description: |- RouteRefreshInterval is the period at which Felix re-checks the routes @@ -2042,7 +1830,7 @@ spec: pattern: ^(?i)(Drop|Reject|Disabled)?$ type: string sidecarAccelerationEnabled: - description: 'SidecarAccelerationEnabled enables experimental sidecar acceleration [Default: false]' + description: "SidecarAccelerationEnabled enables experimental sidecar acceleration [Default: false]" type: boolean usageReportingEnabled: description: |- @@ -2050,11 +1838,11 @@ spec: server. For example, if a significant security vulnerability has been discovered in the version of Calico being used. [Default: true] type: boolean usageReportingInitialDelay: - description: 'UsageReportingInitialDelay controls the minimum delay before Felix makes a report. [Default: 300s]' + description: "UsageReportingInitialDelay controls the minimum delay before Felix makes a report. [Default: 300s]" pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$ type: string usageReportingInterval: - description: 'UsageReportingInterval controls the interval at which Felix makes reports. [Default: 86400s]' + description: "UsageReportingInterval controls the interval at which Felix makes reports. [Default: 86400s]" pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$ type: string useInternalDataplaneDriver: @@ -2078,7 +1866,7 @@ spec: MTU of the host's interfaces. [Default: 0 (auto-detect)] type: integer vxlanPort: - description: 'VXLANPort is the UDP port number to use for VXLAN traffic. [Default: 4789]' + description: "VXLANPort is the UDP port number to use for VXLAN traffic. [Default: 4789]" type: integer vxlanVNI: description: |- @@ -2086,44 +1874,44 @@ spec: in use on your system. [Default: 4096] type: integer windowsManageFirewallRules: - description: 'WindowsManageFirewallRules configures whether or not Felix will program Windows Firewall rules (to allow inbound access to its own metrics ports). [Default: Disabled]' + description: "WindowsManageFirewallRules configures whether or not Felix will program Windows Firewall rules (to allow inbound access to its own metrics ports). [Default: Disabled]" enum: - Enabled - Disabled type: string wireguardEnabled: - description: 'WireguardEnabled controls whether Wireguard is enabled for IPv4 (encapsulating IPv4 traffic over an IPv4 underlay network). [Default: false]' + description: "WireguardEnabled controls whether Wireguard is enabled for IPv4 (encapsulating IPv4 traffic over an IPv4 underlay network). [Default: false]" type: boolean wireguardEnabledV6: - description: 'WireguardEnabledV6 controls whether Wireguard is enabled for IPv6 (encapsulating IPv6 traffic over an IPv6 underlay network). [Default: false]' + description: "WireguardEnabledV6 controls whether Wireguard is enabled for IPv6 (encapsulating IPv6 traffic over an IPv6 underlay network). [Default: false]" type: boolean wireguardHostEncryptionEnabled: - description: 'WireguardHostEncryptionEnabled controls whether Wireguard host-to-host encryption is enabled. [Default: false]' + description: "WireguardHostEncryptionEnabled controls whether Wireguard host-to-host encryption is enabled. [Default: false]" type: boolean wireguardInterfaceName: - description: 'WireguardInterfaceName specifies the name to use for the IPv4 Wireguard interface. [Default: wireguard.cali]' + description: "WireguardInterfaceName specifies the name to use for the IPv4 Wireguard interface. [Default: wireguard.cali]" type: string wireguardInterfaceNameV6: - description: 'WireguardInterfaceNameV6 specifies the name to use for the IPv6 Wireguard interface. [Default: wg-v6.cali]' + description: "WireguardInterfaceNameV6 specifies the name to use for the IPv6 Wireguard interface. [Default: wg-v6.cali]" type: string wireguardKeepAlive: - description: 'WireguardPersistentKeepAlive controls Wireguard PersistentKeepalive option. Set 0 to disable. [Default: 0]' + description: "WireguardPersistentKeepAlive controls Wireguard PersistentKeepalive option. Set 0 to disable. [Default: 0]" pattern: ^([0-9]+(\\.[0-9]+)?(ms|s|m|h))*$ type: string wireguardListeningPort: - description: 'WireguardListeningPort controls the listening port used by IPv4 Wireguard. [Default: 51820]' + description: "WireguardListeningPort controls the listening port used by IPv4 Wireguard. [Default: 51820]" type: integer wireguardListeningPortV6: - description: 'WireguardListeningPortV6 controls the listening port used by IPv6 Wireguard. [Default: 51821]' + description: "WireguardListeningPortV6 controls the listening port used by IPv6 Wireguard. [Default: 51821]" type: integer wireguardMTU: - description: 'WireguardMTU controls the MTU on the IPv4 Wireguard interface. See Configuring MTU [Default: 1440]' + description: "WireguardMTU controls the MTU on the IPv4 Wireguard interface. See Configuring MTU [Default: 1440]" type: integer wireguardMTUV6: - description: 'WireguardMTUV6 controls the MTU on the IPv6 Wireguard interface. See Configuring MTU [Default: 1420]' + description: "WireguardMTUV6 controls the MTU on the IPv6 Wireguard interface. See Configuring MTU [Default: 1420]" type: integer wireguardRoutingRulePriority: - description: 'WireguardRoutingRulePriority controls the priority value to use for the Wireguard routing rule. [Default: 99]' + description: "WireguardRoutingRulePriority controls the priority value to use for the Wireguard routing rule. [Default: 99]" type: integer wireguardThreadingEnabled: description: |- @@ -2141,7 +1929,7 @@ spec: pattern: ^(?i)(Disabled|Any)?$ type: string xdpEnabled: - description: 'XDPEnabled enables XDP acceleration for suitable untracked incoming deny rules. [Default: true]' + description: "XDPEnabled enables XDP acceleration for suitable untracked incoming deny rules. [Default: true]" type: boolean xdpRefreshInterval: description: |- @@ -2177,86 +1965,35 @@ spec: openAPIV3Schema: 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: properties: applyOnForward: - description: ApplyOnForward indicates to apply the rules in this policy on forward traffic. type: boolean doNotTrack: - description: |- - DoNotTrack indicates whether packets matched by the rules in this policy should go through - the data plane's connection tracking, such as Linux conntrack. If True, the rules in - this policy are applied before any data plane connection tracking, and packets allowed by - this policy are marked as not to be tracked. type: boolean egress: - description: |- - The ordered set of egress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2265,18 +2002,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2285,73 +2012,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -2361,108 +2047,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2471,18 +2102,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2491,45 +2112,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -2538,57 +2135,23 @@ spec: type: object type: array ingress: - description: |- - The ordered set of ingress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2597,18 +2160,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2617,73 +2170,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -2693,108 +2205,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2803,18 +2260,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -2823,45 +2270,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -2870,66 +2293,23 @@ spec: type: object type: array namespaceSelector: - description: NamespaceSelector is an optional field for an expression used to select a pod based on namespaces. type: string order: - description: |- - Order is an optional field that specifies the order in which the policy is applied. - Policies with higher "order" are applied after those with lower - order within the same tier. If the order is omitted, it may be considered to be "infinite" - i.e. the - policy will be applied last. Policies with identical order will be applied in - alphanumerical order based on the Policy "Name" within the tier. type: number performanceHints: - description: |- - PerformanceHints contains a list of hints to Calico's policy engine to - help process the policy more efficiently. Hints never change the - enforcement behaviour of the policy. - - Currently, the only available hint is "AssumeNeededOnEveryNode". When - that hint is set on a policy, Felix will act as if the policy matches - a local endpoint even if it does not. This is useful for "preloading" - any large static policies that are known to be used on every node. - If the policy is _not_ used on a particular node then the work - done to preload the policy (and to maintain it) is wasted. items: type: string type: array preDNAT: - description: PreDNAT indicates to apply the rules in this policy before any DNAT. type: boolean selector: - description: "The selector is an expression used to pick out the endpoints that the policy should\nbe applied to.\n\nSelector expressions follow this syntax:\n\n\tlabel == \"string_literal\" -> comparison, e.g. my_label == \"foo bar\"\n\tlabel != \"string_literal\" -> not equal; also matches if label is not present\n\tlabel in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is one of \"a\", \"b\", \"c\"\n\tlabel not in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is not one of \"a\", \"b\", \"c\"\n\thas(label_name) -> True if that label is present\n\t! expr -> negation of expr\n\texpr && expr -> Short-circuit and\n\texpr || expr -> Short-circuit or\n\t( expr ) -> parens for grouping\n\tall() or the empty selector -> matches all endpoints.\n\nLabel names are allowed to contain alphanumerics, -, _ and /. String literals are more permissive\nbut they do not support escape characters.\n\nExamples (with made-up labels):\n\n\ttype == \"webserver\" && deployment == \"prod\"\n\ttype in {\"frontend\", \"backend\"}\n\tdeployment != \"dev\"\n\t! has(label_name)" type: string serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression used to select a pod based on service accounts. type: string tier: - description: |- - The name of the tier that this policy belongs to. If this is omitted, the default - tier (name is "default") is assumed. The specified tier must exist in order to create - security policies within the tier, the "default" tier is created automatically if it - does not exist, this means for deployments requiring only a single Tier, the tier name - may be omitted on all policy management requests. type: string types: - description: |- - Types indicates whether this policy applies to ingress, or to egress, or to both. When - not explicitly specified (and so the value on creation is empty or nil), Calico defaults - Types according to what Ingress and Egress rules are present in the policy. The - default is: - - - [ PolicyTypeIngress ], if there are no Egress rules (including the case where there are - also no Ingress rules) - - - [ PolicyTypeEgress ], if there are Egress rules but no Ingress rules - - - [ PolicyTypeIngress, PolicyTypeEgress ], if there are both Ingress and Egress rules. - - When the policy is read back again, Types will always be one of these values, never empty - or nil. items: - description: PolicyType enumerates the possible values of the PolicySpec Types field. type: string type: array type: object @@ -2957,32 +2337,16 @@ spec: - name: v1 schema: openAPIV3Schema: - description: |- - GlobalNetworkSet contains a set of arbitrary IP sub-networks/CIDRs that share labels to - allow rules to refer to them via selectors. The labels of GlobalNetworkSet are not namespaced. 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: GlobalNetworkSetSpec contains the specification for a NetworkSet resource. properties: nets: - description: The list of IP networks that belong to this set. items: type: string type: array @@ -3013,52 +2377,22 @@ spec: openAPIV3Schema: 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: HostEndpointSpec contains the specification for a HostEndpoint resource. properties: expectedIPs: - description: "The expected IP addresses (IPv4 and IPv6) of the endpoint.\nIf \"InterfaceName\" is not present, Calico will look for an interface matching any\nof the IPs in the list and apply policy to that.\nNote:\n\tWhen using the selector match criteria in an ingress or egress security Policy\n\tor Profile, Calico converts the selector into a set of IP addresses. For host\n\tendpoints, the ExpectedIPs field is used for that purpose. (If only the interface\n\tname is specified, Calico does not learn the IPs of the interface for use in match\n\tcriteria.)" items: type: string type: array interfaceName: - description: |- - Either "*", or the name of a specific Linux interface to apply policy to; or empty. "*" - indicates that this HostEndpoint governs all traffic to, from or through the default - network namespace of the host named by the "Node" field; entering and leaving that - namespace via any interface, including those from/to non-host-networked local workloads. - - If InterfaceName is not "*", this HostEndpoint only governs traffic that enters or leaves - the host through the specific interface named by InterfaceName, or - when InterfaceName - is empty - through the specific interface that has one of the IPs in ExpectedIPs. - Therefore, when InterfaceName is empty, at least one expected IP must be specified. Only - external interfaces (such as "eth0") are supported here; it isn't possible for a - HostEndpoint to protect traffic through a specific local workload interface. - - Note: Only some kinds of policy are implemented for "*" HostEndpoints; initially just - pre-DNAT policy. Please check Calico documentation for the latest position. type: string node: - description: The node name identifying the Calico node instance. type: string ports: - description: Ports contains the endpoint's named ports, which may be referenced in security policy rules. items: properties: name: @@ -3078,10 +2412,6 @@ spec: type: object type: array profiles: - description: |- - A list of identifiers of security Profile objects that apply to this endpoint. Each - profile is applied in the order that they appear in this list. Profile rules are applied - after the selector-based security policy. items: type: string type: array @@ -3112,35 +2442,16 @@ spec: openAPIV3Schema: 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: IPAMBlockSpec contains the specification for an IPAMBlock resource. properties: affinity: - description: |- - Affinity of the block, if this block has one. If set, it will be of the form - "host:". If not set, this block is not affine to a host. type: string allocations: - description: |- - Array of allocations in-use within this block. nil entries mean the allocation is free. - For non-nil entries at index i, the index is the ordinal of the allocation within this block - and the value is the index of the associated attributes in the Attributes array. items: type: integer # TODO: This nullable is manually added in. We should update controller-gen @@ -3148,10 +2459,6 @@ spec: nullable: true type: array attributes: - description: |- - Attributes is an array of arbitrary metadata associated with allocations in the block. To find - attributes for a given allocation, use the value of the allocation's entry in the Allocations array - as the index of the element in this array. items: properties: handle_id: @@ -3163,37 +2470,21 @@ spec: type: object type: array cidr: - description: The block's CIDR. type: string deleted: - description: |- - Deleted is an internal boolean used to workaround a limitation in the Kubernetes API whereby - deletion will not return a conflict error if the block has been updated. It should not be set manually. type: boolean sequenceNumber: default: 0 - description: |- - We store a sequence number that is updated each time the block is written. - Each allocation will also store the sequence number of the block at the time of its creation. - When releasing an IP, passing the sequence number associated with the allocation allows us - to protect against a race condition and ensure the IP hasn't been released and re-allocated - since the release request. format: int64 type: integer sequenceNumberForAllocation: additionalProperties: format: int64 type: integer - description: |- - Map of allocated ordinal within the block to sequence number of the block at - the time of allocation. Kubernetes does not allow numerical keys for maps, so - the key is cast to a string. type: object strictAffinity: - description: StrictAffinity on the IPAMBlock is deprecated and no longer used by the code. Use IPAMConfig StrictAffinity instead. type: boolean unallocated: - description: Unallocated is an ordered list of allocations which are free in the block. items: type: integer type: array @@ -3230,31 +2521,16 @@ spec: openAPIV3Schema: 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: IPAMConfigSpec contains the specification for an IPAMConfig resource. properties: autoAllocateBlocks: type: boolean maxBlocksPerHost: - description: |- - MaxBlocksPerHost, if non-zero, is the max number of blocks that can be - affine to each host. maximum: 2147483647 minimum: 0 type: integer @@ -3290,24 +2566,12 @@ spec: openAPIV3Schema: 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: IPAMHandleSpec contains the specification for an IPAMHandle resource. properties: block: additionalProperties: @@ -3347,91 +2611,48 @@ spec: openAPIV3Schema: 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: IPPoolSpec contains the specification for an IPPool resource. properties: allowedUses: - description: |- - AllowedUse controls what the IP pool will be used for. If not specified or empty, defaults to - ["Tunnel", "Workload"] for back-compatibility items: type: string type: array assignmentMode: - description: Determines the mode how IP addresses should be assigned from this pool enum: - Automatic - Manual type: string blockSize: - description: The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 122 for IPv6. type: integer cidr: - description: The pool CIDR. type: string disableBGPExport: - description: 'Disable exporting routes from this IP Pool''s CIDR over BGP. [Default: false]' type: boolean disabled: - description: When disabled is true, Calico IPAM will not assign addresses from this pool. type: boolean ipip: - description: |- - Deprecated: this field is only used for APIv1 backwards compatibility. - Setting this field is not allowed, this field is for internal use only. properties: enabled: - description: |- - When enabled is true, ipip tunneling will be used to deliver packets to - destinations within this pool. type: boolean mode: - description: |- - The IPIP mode. This can be one of "always" or "cross-subnet". A mode - of "always" will also use IPIP tunneling for routing to destination IP - addresses within this pool. A mode of "cross-subnet" will only use IPIP - tunneling when the destination node is on a different subnet to the - originating node. The default value (if not specified) is "always". type: string type: object ipipMode: - description: |- - Contains configuration for IPIP tunneling for this pool. If not specified, - then this is defaulted to "Never" (i.e. IPIP tunneling is disabled). + type: string + namespaceSelector: type: string nat-outgoing: - description: |- - Deprecated: this field is only used for APIv1 backwards compatibility. - Setting this field is not allowed, this field is for internal use only. type: boolean natOutgoing: - description: |- - When natOutgoing is true, packets sent from Calico networked containers in - this pool to destinations outside of this pool will be masqueraded. type: boolean nodeSelector: - description: Allows IPPool to allocate for a specific node by label selector. type: string vxlanMode: - description: |- - Contains configuration for VXLAN tunneling for this pool. If not specified, - then this is defaulted to "Never" (i.e. VXLAN tunneling is disabled). type: string required: - cidr @@ -3462,27 +2683,14 @@ spec: openAPIV3Schema: 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: IPReservationSpec contains the specification for an IPReservation resource. properties: reservedCIDRs: - description: ReservedCIDRs is a list of CIDRs and/or IP addresses that Calico IPAM will exclude from new allocations. items: type: string type: array @@ -3513,249 +2721,175 @@ spec: openAPIV3Schema: 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: KubeControllersConfigurationSpec contains the values of the Kubernetes controllers configuration. properties: controllers: - description: Controllers enables and configures individual Kubernetes controllers properties: loadBalancer: - description: LoadBalancer enables and configures the LoadBalancer controller. Enabled by default, set to nil to disable. properties: assignIPs: + default: AllServices type: string type: object namespace: - description: Namespace enables and configures the namespace controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object node: - description: Node enables and configures the node controller. Enabled by default, set to nil to disable. properties: hostEndpoint: - description: HostEndpoint controls syncing nodes to host endpoints. Disabled by default, set to nil to disable. properties: autoCreate: - description: 'AutoCreate enables automatic creation of host endpoints for every node. [Default: Disabled]' type: string createDefaultHostEndpoint: type: string templates: - description: Templates contains definition for creating AutoHostEndpoints items: properties: generateName: - description: GenerateName is appended to the end of the generated AutoHostEndpoint name + maxLength: 253 type: string interfaceCIDRs: - description: InterfaceCIDRs contains a list of CIRDs used for matching nodeIPs to the AutoHostEndpoint items: type: string type: array + interfacePattern: + type: string labels: additionalProperties: type: string - description: Labels adds the specified labels to the generated AutoHostEndpoint, labels from node with the same name will be overwritten by values from the template label type: object nodeSelector: - description: NodeSelector allows the AutoHostEndpoint to be created only for specific nodes type: string type: object type: array type: object leakGracePeriod: - description: |- - LeakGracePeriod is the period used by the controller to determine if an IP address has been leaked. - Set to 0 to disable IP garbage collection. [Default: 15m] type: string reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string syncLabels: - description: 'SyncLabels controls whether to copy Kubernetes node labels to Calico nodes. [Default: Enabled]' type: string type: object policy: - description: Policy enables and configures the policy controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object serviceAccount: - description: ServiceAccount enables and configures the service account controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object workloadEndpoint: - description: WorkloadEndpoint enables and configures the workload endpoint controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object type: object debugProfilePort: - description: |- - DebugProfilePort configures the port to serve memory and cpu profiles on. If not specified, profiling - is disabled. format: int32 type: integer etcdV3CompactionPeriod: - description: 'EtcdV3CompactionPeriod is the period between etcdv3 compaction requests. Set to 0 to disable. [Default: 10m]' type: string healthChecks: - description: 'HealthChecks enables or disables support for health checks [Default: Enabled]' type: string logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info]' type: string prometheusMetricsPort: - description: 'PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. Set to 0 to disable. [Default: 9094]' type: integer required: - controllers type: object status: - description: |- - KubeControllersConfigurationStatus represents the status of the configuration. It's useful for admins to - be able to see the actual config that was applied, which can be modified by environment variables on the - kube-controllers process. properties: environmentVars: additionalProperties: type: string - description: |- - EnvironmentVars contains the environment variables on the kube-controllers that influenced - the RunningConfig. type: object runningConfig: - description: |- - RunningConfig contains the effective config that is running in the kube-controllers pod, after - merging the API resource with any environment variables. properties: controllers: - description: Controllers enables and configures individual Kubernetes controllers properties: loadBalancer: - description: LoadBalancer enables and configures the LoadBalancer controller. Enabled by default, set to nil to disable. properties: assignIPs: + default: AllServices type: string type: object namespace: - description: Namespace enables and configures the namespace controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object node: - description: Node enables and configures the node controller. Enabled by default, set to nil to disable. properties: hostEndpoint: - description: HostEndpoint controls syncing nodes to host endpoints. Disabled by default, set to nil to disable. properties: autoCreate: - description: 'AutoCreate enables automatic creation of host endpoints for every node. [Default: Disabled]' type: string createDefaultHostEndpoint: type: string templates: - description: Templates contains definition for creating AutoHostEndpoints items: properties: generateName: - description: GenerateName is appended to the end of the generated AutoHostEndpoint name + maxLength: 253 type: string interfaceCIDRs: - description: InterfaceCIDRs contains a list of CIRDs used for matching nodeIPs to the AutoHostEndpoint items: type: string type: array + interfacePattern: + type: string labels: additionalProperties: type: string - description: Labels adds the specified labels to the generated AutoHostEndpoint, labels from node with the same name will be overwritten by values from the template label type: object nodeSelector: - description: NodeSelector allows the AutoHostEndpoint to be created only for specific nodes type: string type: object type: array type: object leakGracePeriod: - description: |- - LeakGracePeriod is the period used by the controller to determine if an IP address has been leaked. - Set to 0 to disable IP garbage collection. [Default: 15m] type: string reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string syncLabels: - description: 'SyncLabels controls whether to copy Kubernetes node labels to Calico nodes. [Default: Enabled]' type: string type: object policy: - description: Policy enables and configures the policy controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object serviceAccount: - description: ServiceAccount enables and configures the service account controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object workloadEndpoint: - description: WorkloadEndpoint enables and configures the workload endpoint controller. Enabled by default, set to nil to disable. properties: reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m]' type: string type: object type: object debugProfilePort: - description: |- - DebugProfilePort configures the port to serve memory and cpu profiles on. If not specified, profiling - is disabled. format: int32 type: integer etcdV3CompactionPeriod: - description: 'EtcdV3CompactionPeriod is the period between etcdv3 compaction requests. Set to 0 to disable. [Default: 10m]' type: string healthChecks: - description: 'HealthChecks enables or disables support for health checks [Default: Enabled]' type: string logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info]' type: string prometheusMetricsPort: - description: 'PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. Set to 0 to disable. [Default: 9094]' type: integer required: - controllers @@ -3787,76 +2921,31 @@ spec: openAPIV3Schema: 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: properties: egress: - description: |- - The ordered set of egress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -3865,18 +2954,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -3885,73 +2964,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -3961,108 +2999,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4071,18 +3054,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4091,45 +3064,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -4138,57 +3087,23 @@ spec: type: object type: array ingress: - description: |- - The ordered set of ingress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4197,18 +3112,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4217,73 +3122,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -4293,108 +3157,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4403,18 +3212,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4423,45 +3222,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -4470,60 +3245,19 @@ spec: type: object type: array order: - description: |- - Order is an optional field that specifies the order in which the policy is applied. - Policies with higher "order" are applied after those with lower - order within the same tier. If the order is omitted, it may be considered to be "infinite" - i.e. the - policy will be applied last. Policies with identical order will be applied in - alphanumerical order based on the Policy "Name" within the tier. type: number performanceHints: - description: |- - PerformanceHints contains a list of hints to Calico's policy engine to - help process the policy more efficiently. Hints never change the - enforcement behaviour of the policy. - - Currently, the only available hint is "AssumeNeededOnEveryNode". When - that hint is set on a policy, Felix will act as if the policy matches - a local endpoint even if it does not. This is useful for "preloading" - any large static policies that are known to be used on every node. - If the policy is _not_ used on a particular node then the work - done to preload the policy (and to maintain it) is wasted. items: type: string type: array selector: - description: "The selector is an expression used to pick out the endpoints that the policy should\nbe applied to.\n\nSelector expressions follow this syntax:\n\n\tlabel == \"string_literal\" -> comparison, e.g. my_label == \"foo bar\"\n\tlabel != \"string_literal\" -> not equal; also matches if label is not present\n\tlabel in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is one of \"a\", \"b\", \"c\"\n\tlabel not in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is not one of \"a\", \"b\", \"c\"\n\thas(label_name) -> True if that label is present\n\t! expr -> negation of expr\n\texpr && expr -> Short-circuit and\n\texpr || expr -> Short-circuit or\n\t( expr ) -> parens for grouping\n\tall() or the empty selector -> matches all endpoints.\n\nLabel names are allowed to contain alphanumerics, -, _ and /. String literals are more permissive\nbut they do not support escape characters.\n\nExamples (with made-up labels):\n\n\ttype == \"webserver\" && deployment == \"prod\"\n\ttype in {\"frontend\", \"backend\"}\n\tdeployment != \"dev\"\n\t! has(label_name)" type: string serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression used to select a pod based on service accounts. type: string tier: - description: |- - The name of the tier that this policy belongs to. If this is omitted, the default - tier (name is "default") is assumed. The specified tier must exist in order to create - security policies within the tier, the "default" tier is created automatically if it - does not exist, this means for deployments requiring only a single Tier, the tier name - may be omitted on all policy management requests. type: string types: - description: |- - Types indicates whether this policy applies to ingress, or to egress, or to both. When - not explicitly specified (and so the value on creation is empty or nil), Calico defaults - Types according to what Ingress and Egress are present in the policy. The - default is: - - - [ PolicyTypeIngress ], if there are no Egress rules (including the case where there are - also no Ingress rules) - - - [ PolicyTypeEgress ], if there are Egress rules but no Ingress rules - - - [ PolicyTypeIngress, PolicyTypeEgress ], if there are both Ingress and Egress rules. - - When the policy is read back again, Types will always be one of these values, never empty - or nil. items: - description: PolicyType enumerates the possible values of the PolicySpec Types field. type: string type: array type: object @@ -4551,30 +3285,16 @@ spec: - name: v1 schema: openAPIV3Schema: - description: NetworkSet is the Namespaced-equivalent of the GlobalNetworkSet. 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: NetworkSetSpec contains the specification for a NetworkSet resource. properties: nets: - description: The list of IP networks that belong to this set. items: type: string type: array @@ -4605,86 +3325,35 @@ spec: openAPIV3Schema: 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: properties: applyOnForward: - description: ApplyOnForward indicates to apply the rules in this policy on forward traffic. type: boolean doNotTrack: - description: |- - DoNotTrack indicates whether packets matched by the rules in this policy should go through - the data plane's connection tracking, such as Linux conntrack. If True, the rules in - this policy are applied before any data plane connection tracking, and packets allowed by - this policy are marked as not to be tracked. type: boolean egress: - description: |- - The ordered set of egress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4693,18 +3362,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4713,73 +3372,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -4789,108 +3407,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4899,18 +3462,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -4919,45 +3472,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -4966,57 +3495,23 @@ spec: type: object type: array ingress: - description: |- - The ordered set of ingress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -5025,18 +3520,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -5045,73 +3530,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -5121,108 +3565,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -5231,18 +3620,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -5251,45 +3630,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -5298,69 +3653,25 @@ spec: type: object type: array namespaceSelector: - description: NamespaceSelector is an optional field for an expression used to select a pod based on namespaces. type: string order: - description: |- - Order is an optional field that specifies the order in which the policy is applied. - Policies with higher "order" are applied after those with lower - order within the same tier. If the order is omitted, it may be considered to be "infinite" - i.e. the - policy will be applied last. Policies with identical order will be applied in - alphanumerical order based on the Policy "Name" within the tier. type: number performanceHints: - description: |- - PerformanceHints contains a list of hints to Calico's policy engine to - help process the policy more efficiently. Hints never change the - enforcement behaviour of the policy. - - Currently, the only available hint is "AssumeNeededOnEveryNode". When - that hint is set on a policy, Felix will act as if the policy matches - a local endpoint even if it does not. This is useful for "preloading" - any large static policies that are known to be used on every node. - If the policy is _not_ used on a particular node then the work - done to preload the policy (and to maintain it) is wasted. items: type: string type: array preDNAT: - description: PreDNAT indicates to apply the rules in this policy before any DNAT. type: boolean selector: - description: "The selector is an expression used to pick pick out the endpoints that the policy should\nbe applied to.\n\nSelector expressions follow this syntax:\n\n\tlabel == \"string_literal\" -> comparison, e.g. my_label == \"foo bar\"\n\tlabel != \"string_literal\" -> not equal; also matches if label is not present\n\tlabel in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is one of \"a\", \"b\", \"c\"\n\tlabel not in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is not one of \"a\", \"b\", \"c\"\n\thas(label_name) -> True if that label is present\n\t! expr -> negation of expr\n\texpr && expr -> Short-circuit and\n\texpr || expr -> Short-circuit or\n\t( expr ) -> parens for grouping\n\tall() or the empty selector -> matches all endpoints.\n\nLabel names are allowed to contain alphanumerics, -, _ and /. String literals are more permissive\nbut they do not support escape characters.\n\nExamples (with made-up labels):\n\n\ttype == \"webserver\" && deployment == \"prod\"\n\ttype in {\"frontend\", \"backend\"}\n\tdeployment != \"dev\"\n\t! has(label_name)" type: string serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression used to select a pod based on service accounts. type: string stagedAction: - description: The staged action. If this is omitted, the default is Set. type: string tier: - description: |- - The name of the tier that this policy belongs to. If this is omitted, the default - tier (name is "default") is assumed. The specified tier must exist in order to create - security policies within the tier, the "default" tier is created automatically if it - does not exist, this means for deployments requiring only a single Tier, the tier name - may be omitted on all policy management requests. type: string types: - description: |- - Types indicates whether this policy applies to ingress, or to egress, or to both. When - not explicitly specified (and so the value on creation is empty or nil), Calico defaults - Types according to what Ingress and Egress rules are present in the policy. The - default is: - - - [ PolicyTypeIngress ], if there are no Egress rules (including the case where there are - also no Ingress rules) - - - [ PolicyTypeEgress ], if there are Egress rules but no Ingress rules - - - [ PolicyTypeIngress, PolicyTypeEgress ], if there are both Ingress and Egress rules. - - When the policy is read back again, Types will always be one of these values, never empty - or nil. items: - description: PolicyType enumerates the possible values of the PolicySpec Types field. type: string type: array type: object @@ -5390,102 +3701,40 @@ spec: openAPIV3Schema: 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: properties: egress: - description: |- - List of egress rules to be applied to the selected pods. Outgoing traffic is - allowed if there are no NetworkPolicies selecting the pod (and cluster policy - otherwise allows the traffic), OR if the traffic matches at least one egress rule - across all of the NetworkPolicy objects whose podSelector matches the pod. If - this field is empty then this NetworkPolicy limits all outgoing traffic (and serves - solely to ensure that the pods it selects are isolated by default). - This field is beta-level in 1.8 items: - description: |- - NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods - matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. - This type is beta-level in 1.8 properties: ports: - description: |- - ports is a list of destination ports for outgoing traffic. - Each item in this list is combined using a logical OR. If this field is - empty or missing, this rule matches all ports (traffic not restricted by port). - If this field is present and contains at least one item, then this rule allows - traffic only if the traffic matches at least one port in the list. items: - description: NetworkPolicyPort describes a port to allow traffic on properties: endPort: - description: |- - endPort indicates that the range of ports from port to endPort if set, inclusive, - should be allowed by the policy. This field cannot be defined if the port field - is not defined or if the port field is defined as a named (string) port. - The endPort must be equal or greater than port. format: int32 type: integer port: anyOf: - type: integer - type: string - description: |- - port represents the port on the given protocol. This can either be a numerical or named - port on a pod. If this field is not provided, this matches all port names and - numbers. - If present, only traffic on the specified protocol AND port will be matched. x-kubernetes-int-or-string: true protocol: - description: |- - protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. - If not specified, this field defaults to TCP. type: string type: object type: array x-kubernetes-list-type: atomic to: - description: |- - to is a list of destinations for outgoing traffic of pods selected for this rule. - Items in this list are combined using a logical OR operation. If this field is - empty or missing, this rule matches all destinations (traffic not restricted by - destination). If this field is present and contains at least one item, this rule - allows traffic only if the traffic matches at least one item in the to list. items: - description: |- - NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of - fields are allowed properties: ipBlock: - description: |- - ipBlock defines policy on a particular IPBlock. If this field is set then - neither of the other fields can be. properties: cidr: - description: |- - cidr is a string representing the IPBlock - Valid examples are "192.168.1.0/24" or "2001:db8::/64" type: string except: - description: |- - except is a slice of CIDRs that should not be included within an IPBlock - Valid examples are "192.168.1.0/24" or "2001:db8::/64" - Except values will be rejected if they are outside the cidr range items: type: string type: array @@ -5493,36 +3742,16 @@ spec: required: - cidr type: object - namespaceSelector: - description: |- - namespaceSelector selects namespaces using cluster-scoped labels. This field follows - standard label selector semantics; if present but empty, it selects all namespaces. - - If podSelector is also set, then the NetworkPolicyPeer as a whole selects - the pods matching podSelector in the namespaces selected by namespaceSelector. - Otherwise it selects all pods in the namespaces selected by namespaceSelector. + 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 @@ -5536,43 +3765,19 @@ spec: 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 podSelector: - description: |- - podSelector is a label selector which selects pods. This field follows standard label - selector semantics; if present but empty, it selects all pods. - - If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects - the pods matching podSelector in the Namespaces selected by NamespaceSelector. - Otherwise it selects the pods matching podSelector in the policy's own namespace. 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 @@ -5586,10 +3791,6 @@ spec: 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 @@ -5599,46 +3800,16 @@ spec: type: object type: array ingress: - description: |- - List of ingress rules to be applied to the selected pods. Traffic is allowed to - a pod if there are no NetworkPolicies selecting the pod - (and cluster policy otherwise allows the traffic), OR if the traffic source is - the pod's local node, OR if the traffic matches at least one ingress rule - across all of the NetworkPolicy objects whose podSelector matches the pod. If - this field is empty then this NetworkPolicy does not allow any traffic (and serves - solely to ensure that the pods it selects are isolated by default) items: - description: |- - NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods - matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. properties: from: - description: |- - from is a list of sources which should be able to access the pods selected for this rule. - Items in this list are combined using a logical OR operation. If this field is - empty or missing, this rule matches all sources (traffic not restricted by - source). If this field is present and contains at least one item, this rule - allows traffic only if the traffic matches at least one item in the from list. items: - description: |- - NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of - fields are allowed properties: ipBlock: - description: |- - ipBlock defines policy on a particular IPBlock. If this field is set then - neither of the other fields can be. properties: cidr: - description: |- - cidr is a string representing the IPBlock - Valid examples are "192.168.1.0/24" or "2001:db8::/64" type: string except: - description: |- - except is a slice of CIDRs that should not be included within an IPBlock - Valid examples are "192.168.1.0/24" or "2001:db8::/64" - Except values will be rejected if they are outside the cidr range items: type: string type: array @@ -5647,35 +3818,15 @@ spec: - cidr type: object namespaceSelector: - description: |- - namespaceSelector selects namespaces using cluster-scoped labels. This field follows - standard label selector semantics; if present but empty, it selects all namespaces. - - If podSelector is also set, then the NetworkPolicyPeer as a whole selects - the pods matching podSelector in the namespaces selected by namespaceSelector. - Otherwise it selects all pods in the 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 @@ -5689,43 +3840,19 @@ spec: 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 podSelector: - description: |- - podSelector is a label selector which selects pods. This field follows standard label - selector semantics; if present but empty, it selects all pods. - - If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects - the pods matching podSelector in the Namespaces selected by NamespaceSelector. - Otherwise it selects the pods matching podSelector in the policy's own namespace. 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 @@ -5739,10 +3866,6 @@ spec: 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 @@ -5750,37 +3873,17 @@ spec: type: array x-kubernetes-list-type: atomic ports: - description: |- - ports is a list of ports which should be made accessible on the pods selected for - this rule. Each item in this list is combined using a logical OR. If this field is - empty or missing, this rule matches all ports (traffic not restricted by port). - If this field is present and contains at least one item, then this rule allows - traffic only if the traffic matches at least one port in the list. items: - description: NetworkPolicyPort describes a port to allow traffic on properties: endPort: - description: |- - endPort indicates that the range of ports from port to endPort if set, inclusive, - should be allowed by the policy. This field cannot be defined if the port field - is not defined or if the port field is defined as a named (string) port. - The endPort must be equal or greater than port. format: int32 type: integer port: anyOf: - type: integer - type: string - description: |- - port represents the port on the given protocol. This can either be a numerical or named - port on a pod. If this field is not provided, this matches all port names and - numbers. - If present, only traffic on the specified protocol AND port will be matched. x-kubernetes-int-or-string: true protocol: - description: |- - protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. - If not specified, this field defaults to TCP. type: string type: object type: array @@ -5788,35 +3891,15 @@ spec: type: object type: array podSelector: - description: |- - Selects the pods to which this NetworkPolicy object applies. The array of - ingress rules is applied to any pods selected by this field. Multiple network - policies can select the same set of pods. In this case, the ingress rules for - each are combined additively. This field is NOT optional and follows standard - label selector semantics. An empty podSelector matches all pods in this - namespace. 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 @@ -5830,33 +3913,14 @@ spec: 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 policyTypes: - description: |- - List of rule types that the NetworkPolicy relates to. - Valid options are Ingress, Egress, or Ingress,Egress. - If this field is not specified, it will default based on the existence of Ingress or Egress rules; - policies that contain an Egress section are assumed to affect Egress, and all policies - (whether or not they contain an Ingress section) are assumed to affect Ingress. - If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. - Likewise, if you want to write a policy that specifies that no egress is allowed, - you must specify a policyTypes value that include "Egress" (since such a policy would not include - an Egress section and would otherwise default to just [ "Ingress" ]). - This field is beta-level in 1.8 items: - description: |- - PolicyType string describes the NetworkPolicy type - This type is beta-level in 1.8 type: string type: array stagedAction: - description: The staged action. If this is omitted, the default is Set. type: string type: object type: object @@ -5885,76 +3949,31 @@ spec: openAPIV3Schema: 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: properties: egress: - description: |- - The ordered set of egress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -5963,18 +3982,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -5983,73 +3992,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -6059,108 +4027,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -6169,18 +4082,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -6189,45 +4092,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -6236,57 +4115,23 @@ spec: type: object type: array ingress: - description: |- - The ordered set of ingress rules. Each rule contains a set of packet match criteria and - a corresponding action to apply. items: - description: |- - A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy - and security Profiles reference rules - separated out as a list of rules for both - ingress and egress packet matching. - - Each positive match criteria has a negated version, prefixed with "Not". All the match - criteria within a rule must be satisfied for a packet to match. A single rule can contain - the positive and negative version of a match and both must be satisfied for the rule to match. properties: action: type: string destination: - description: Destination contains the match criteria that apply to destination entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -6295,18 +4140,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -6315,73 +4150,32 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object http: - description: HTTP contains match criteria that apply to HTTP requests. properties: methods: - description: |- - Methods is an optional field that restricts the rule to apply only to HTTP requests that use one of the listed - HTTP Methods (e.g. GET, PUT, etc.) - Multiple methods are OR'd together. items: type: string type: array paths: - description: |- - Paths is an optional field that restricts the rule to apply to HTTP requests that use one of the listed - HTTP Paths. - Multiple paths are OR'd together. - e.g: - - exact: /foo - - prefix: /bar - NOTE: Each entry may ONLY specify either a `exact` or a `prefix` match. The validator will check for it. items: - description: |- - HTTPPath specifies an HTTP path to match. It may be either of the form: - exact: : which matches the path exactly or - prefix: : which matches the path prefix properties: exact: type: string @@ -6391,108 +4185,53 @@ spec: type: array type: object icmp: - description: |- - ICMP is an optional field that restricts the rule to apply to a specific type and - code of ICMP traffic. This should only be specified if the Protocol field is set to - "ICMP" or "ICMPv6". properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object ipVersion: - description: |- - IPVersion is an optional field that restricts the rule to only match a specific IP - version. type: integer metadata: - description: Metadata contains additional information for this rule properties: annotations: additionalProperties: type: string - description: Annotations is a set of key value pairs that give extra information about the rule type: object type: object notICMP: - description: NotICMP is the negated version of the ICMP field. properties: code: - description: |- - Match on a specific ICMP code. If specified, the Type value must also be specified. - This is a technical limitation imposed by the kernel's iptables firewall, which - Calico uses to enforce the rule. type: integer type: - description: |- - Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - (i.e. pings). type: integer type: object notProtocol: anyOf: - type: integer - type: string - description: NotProtocol is the negated version of the Protocol field. pattern: ^.* x-kubernetes-int-or-string: true protocol: anyOf: - type: integer - type: string - description: |- - Protocol is an optional field that restricts the rule to only apply to traffic of - a specific IP protocol. Required if any of the EntityRules contain Ports - (because ports only apply to certain protocols). - - Must be one of these string values: "TCP", "UDP", "ICMP", "ICMPv6", "SCTP", "UDPLite" - or an integer in the range 1-255. pattern: ^.* x-kubernetes-int-or-string: true source: - description: Source contains the match criteria that apply to source entity. properties: namespaceSelector: - description: |- - NamespaceSelector is an optional field that contains a selector expression. Only traffic - that originates from (or terminates at) endpoints within the selected namespaces will be - matched. When both NamespaceSelector and another selector are defined on the same rule, then only - workload endpoints that are matched by both selectors will be selected by the rule. - - For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting - only workload endpoints in the same namespace as the NetworkPolicy. - - For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting - only GlobalNetworkSet or HostEndpoint. - - For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces. type: string nets: - description: |- - Nets is an optional field that restricts the rule to only apply to traffic that - originates from (or terminates at) IP addresses in any of the given subnets. items: type: string type: array notNets: - description: NotNets is the negated version of the Nets field. items: type: string type: array notPorts: - description: |- - NotPorts is the negated version of the Ports field. - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -6501,18 +4240,8 @@ spec: x-kubernetes-int-or-string: true type: array notSelector: - description: |- - NotSelector is the negated version of the Selector field. See Selector field for - subtleties with negated selectors. type: string ports: - description: |- - Ports is an optional field that restricts the rule to only apply to traffic that has a - source (destination) port that matches one of these ranges/values. This value is a - list of integers or strings that represent ranges of ports. - - Since only some protocols have ports, if any ports are specified it requires the - Protocol match in the Rule to be set to "TCP" or "UDP". items: anyOf: - type: integer @@ -6521,45 +4250,21 @@ spec: x-kubernetes-int-or-string: true type: array selector: - description: "Selector is an optional field that contains a selector expression (see Policy for\nsample syntax). Only traffic that originates from (terminates at) endpoints matching\nthe selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the\nselector expression syntax itself supports negation. The two types of negation are subtly\ndifferent. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the\nformer is limited to packets from Calico-controlled endpoints." type: string serviceAccounts: - description: |- - ServiceAccounts is an optional field that restricts the rule to only apply to traffic that originates from (or - terminates at) a pod running as a matching service account. properties: names: - description: |- - Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates - at) a pod running as a service account whose name is in the list. items: type: string type: array selector: - description: |- - Selector is an optional field that restricts the rule to only apply to traffic that originates from - (or terminates at) a pod running as a service account that matches the given label selector. - If both Names and Selector are specified then they are AND'ed. type: string type: object services: - description: |- - Services is an optional field that contains options for matching Kubernetes Services. - If specified, only traffic that originates from or terminates at endpoints within the selected - service(s) will be matched, and only to/from each endpoint's port. - - Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, - NotNets or ServiceAccounts. - - Ports and NotPorts can only be specified with Services on ingress rules. properties: name: - description: Name specifies the name of a Kubernetes Service to match. type: string namespace: - description: |- - Namespace specifies the namespace of the given Service. If left empty, the rule - will match within this policy's namespace. type: string type: object type: object @@ -6568,63 +4273,21 @@ spec: type: object type: array order: - description: |- - Order is an optional field that specifies the order in which the policy is applied. - Policies with higher "order" are applied after those with lower - order within the same tier. If the order is omitted, it may be considered to be "infinite" - i.e. the - policy will be applied last. Policies with identical order will be applied in - alphanumerical order based on the Policy "Name" within the tier. type: number performanceHints: - description: |- - PerformanceHints contains a list of hints to Calico's policy engine to - help process the policy more efficiently. Hints never change the - enforcement behaviour of the policy. - - Currently, the only available hint is "AssumeNeededOnEveryNode". When - that hint is set on a policy, Felix will act as if the policy matches - a local endpoint even if it does not. This is useful for "preloading" - any large static policies that are known to be used on every node. - If the policy is _not_ used on a particular node then the work - done to preload the policy (and to maintain it) is wasted. items: type: string type: array selector: - description: "The selector is an expression used to pick pick out the endpoints that the policy should\nbe applied to.\n\nSelector expressions follow this syntax:\n\n\tlabel == \"string_literal\" -> comparison, e.g. my_label == \"foo bar\"\n\tlabel != \"string_literal\" -> not equal; also matches if label is not present\n\tlabel in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is one of \"a\", \"b\", \"c\"\n\tlabel not in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is not one of \"a\", \"b\", \"c\"\n\thas(label_name) -> True if that label is present\n\t! expr -> negation of expr\n\texpr && expr -> Short-circuit and\n\texpr || expr -> Short-circuit or\n\t( expr ) -> parens for grouping\n\tall() or the empty selector -> matches all endpoints.\n\nLabel names are allowed to contain alphanumerics, -, _ and /. String literals are more permissive\nbut they do not support escape characters.\n\nExamples (with made-up labels):\n\n\ttype == \"webserver\" && deployment == \"prod\"\n\ttype in {\"frontend\", \"backend\"}\n\tdeployment != \"dev\"\n\t! has(label_name)" type: string serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression used to select a pod based on service accounts. type: string stagedAction: - description: The staged action. If this is omitted, the default is Set. type: string tier: - description: |- - The name of the tier that this policy belongs to. If this is omitted, the default - tier (name is "default") is assumed. The specified tier must exist in order to create - security policies within the tier, the "default" tier is created automatically if it - does not exist, this means for deployments requiring only a single Tier, the tier name - may be omitted on all policy management requests. type: string types: - description: |- - Types indicates whether this policy applies to ingress, or to egress, or to both. When - not explicitly specified (and so the value on creation is empty or nil), Calico defaults - Types according to what Ingress and Egress are present in the policy. The - default is: - - - [ PolicyTypeIngress ], if there are no Egress rules (including the case where there are - also no Ingress rules) - - - [ PolicyTypeEgress ], if there are Egress rules but no Ingress rules - - - [ PolicyTypeIngress, PolicyTypeEgress ], if there are both Ingress and Egress rules. - - When the policy is read back again, Types will always be one of these values, never empty - or nil. items: - description: PolicyType enumerates the possible values of the PolicySpec Types field. type: string type: array type: object @@ -6654,41 +4317,19 @@ spec: openAPIV3Schema: 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: TierSpec contains the specification for a security policy tier resource. properties: defaultAction: - description: |- - DefaultAction specifies the action applied to workloads selected by a policy in the tier, - but not rule matched the workload's traffic. - [Default: Deny] enum: - Pass - Deny type: string order: - description: |- - Order is an optional field that specifies the order in which the tier is applied. - Tiers with higher "order" are applied after those with lower order. If the order - is omitted, it may be considered to be "infinite" - i.e. the tier will be applied - last. Tiers with identical order will be applied in alphanumerical order based - on the Tier "Name". type: number type: object type: object @@ -7162,7 +4803,7 @@ spec: type: object x-kubernetes-validations: - message: networks/nodes peer cannot be set with namedPorts since there are no namedPorts for networks/nodes - rule: '!(self.to.exists(peer, has(peer.networks) || has(peer.nodes)) && has(self.ports) && self.ports.exists(port, has(port.namedPort)))' + rule: "!(self.to.exists(peer, has(peer.networks) || has(peer.nodes)) && has(self.ports) && self.ports.exists(port, has(port.namedPort)))" maxItems: 100 type: array ingress: @@ -7662,7 +5303,35 @@ spec: properties: conditions: items: - description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}" + description: "Condition contains details for one aspect of the current state of this API Resource. + + --- + + This struct is intended for direct use as an array at the field path .status.conditions. For example, + + + + \ttype FooStatus struct{ + + \t // Represents the observations of a foo's current state. + + \t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" + + \t // +patchMergeKey=type + + \t // +patchStrategy=merge + + \t // +listType=map + + \t // +listMapKey=type + + \t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + + + + \t // other fields + + \t}" properties: lastTransitionTime: description: |- @@ -8198,7 +5867,7 @@ spec: type: object x-kubernetes-validations: - message: networks/nodes peer cannot be set with namedPorts since there are no namedPorts for networks/nodes - rule: '!(self.to.exists(peer, has(peer.networks) || has(peer.nodes)) && has(self.ports) && self.ports.exists(port, has(port.namedPort)))' + rule: "!(self.to.exists(peer, has(peer.networks) || has(peer.nodes)) && has(self.ports) && self.ports.exists(port, has(port.namedPort)))" maxItems: 100 type: array ingress: @@ -8679,7 +6348,35 @@ spec: properties: conditions: items: - description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}" + description: "Condition contains details for one aspect of the current state of this API Resource. + + --- + + This struct is intended for direct use as an array at the field path .status.conditions. For example, + + + + \ttype FooStatus struct{ + + \t // Represents the observations of a foo's current state. + + \t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" + + \t // +patchMergeKey=type + + \t // +patchStrategy=merge + + \t // +listType=map + + \t // +listMapKey=type + + \t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + + + + \t // other fields + + \t}" properties: lastTransitionTime: description: |- @@ -8770,7 +6467,7 @@ metadata: name: calico-kube-controllers rules: # Nodes are watched to monitor for deletions. -- apiGroups: [""] +- apiGroups: [ "" ] resources: - nodes verbs: @@ -8778,15 +6475,23 @@ rules: - list - get # Pods are watched to check for existence as part of IPAM controller. -- apiGroups: [""] +- apiGroups: [ "" ] resources: - pods verbs: - get - list - watch +# Namespaces are watched for LoadBalancer IP allocation with namespace selector support +- apiGroups: [ "" ] + resources: + - namespaces + verbs: + - get + - list + - watch # Services are monitored for service LoadBalancer IP allocation -- apiGroups: [""] +- apiGroups: [ "" ] resources: - services - services/status @@ -8796,12 +6501,12 @@ rules: - update - watch # IPAM resources are manipulated in response to node and block updates, as well as periodic triggers. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - ipreservations verbs: - list -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - blockaffinities - ipamblocks @@ -8816,14 +6521,14 @@ rules: - delete - watch # Pools are watched to maintain a mapping of blocks to IP pools. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - ippools verbs: - list - watch # kube-controllers manages hostendpoints. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - hostendpoints verbs: @@ -8834,7 +6539,7 @@ rules: - delete - watch # Needs access to update clusterinformations. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - clusterinformations verbs: @@ -8844,7 +6549,7 @@ rules: - update - watch # KubeControllersConfiguration is where it gets its config -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - kubecontrollersconfigurations verbs: @@ -8867,7 +6572,7 @@ metadata: name: calico-node rules: # Used for creating service account tokens to be used by the CNI plugin -- apiGroups: [""] +- apiGroups: [ "" ] resources: - serviceaccounts/token resourceNames: @@ -8875,7 +6580,7 @@ rules: verbs: - create # The CNI plugin needs to get pods, nodes, and namespaces. -- apiGroups: [""] +- apiGroups: [ "" ] resources: - pods - nodes @@ -8884,13 +6589,13 @@ rules: - get # EndpointSlices are used for Service-based network policy rule # enforcement. -- apiGroups: ["discovery.k8s.io"] +- apiGroups: [ "discovery.k8s.io" ] resources: - endpointslices verbs: - watch - list -- apiGroups: [""] +- apiGroups: [ "" ] resources: - endpoints - services @@ -8901,12 +6606,12 @@ rules: # Used to discover Typhas. - get # Pod CIDR auto-detection on kubeadm needs access to config maps. -- apiGroups: [""] +- apiGroups: [ "" ] resources: - configmaps verbs: - get -- apiGroups: [""] +- apiGroups: [ "" ] resources: - nodes/status verbs: @@ -8915,14 +6620,14 @@ rules: # Calico stores some configuration information in node annotations. - update # Watch for changes to Kubernetes NetworkPolicies. -- apiGroups: ["networking.k8s.io"] +- apiGroups: [ "networking.k8s.io" ] resources: - networkpolicies verbs: - watch - list # Watch for changes to Kubernetes (Baseline)AdminNetworkPolicies. -- apiGroups: ["policy.networking.k8s.io"] +- apiGroups: [ "policy.networking.k8s.io" ] resources: - adminnetworkpolicies - baselineadminnetworkpolicies @@ -8930,7 +6635,7 @@ rules: - watch - list # Used by Calico for policy information. -- apiGroups: [""] +- apiGroups: [ "" ] resources: - pods - namespaces @@ -8939,13 +6644,13 @@ rules: - list - watch # The CNI plugin patches pods/status. -- apiGroups: [""] +- apiGroups: [ "" ] resources: - pods/status verbs: - patch # Calico monitors various CRDs for config. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - globalfelixconfigs - felixconfigurations @@ -8972,14 +6677,14 @@ rules: - get - list - watch - # Calico creates some tiers on startup. -- apiGroups: ["crd.projectcalico.org"] +# Calico creates some tiers on startup. +- apiGroups: [ "crd.projectcalico.org" ] resources: - tiers verbs: - create # Calico must create and update some CRDs on startup. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - ippools - felixconfigurations @@ -8988,13 +6693,13 @@ rules: - create - update # Calico must update some CRDs. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - caliconodestatuses verbs: - update # Calico stores some configuration information on the node. -- apiGroups: [""] +- apiGroups: [ "" ] resources: - nodes verbs: @@ -9003,7 +6708,7 @@ rules: - watch # These permissions are only required for upgrade from v2.6, and can # be removed after upgrade or on fresh installations. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - bgpconfigurations - bgppeers @@ -9011,7 +6716,7 @@ rules: - create - update # These permissions are required for Calico CNI to perform IPAM allocations. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - blockaffinities - ipamblocks @@ -9024,21 +6729,21 @@ rules: - delete # The CNI plugin and calico/node need to be able to create a default # IPAMConfiguration -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - ipamconfigs verbs: - get - create # Block affinities must also be watchable by confd for route aggregation. -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - blockaffinities verbs: - watch # The Calico IPAM migration needs to get daemonsets. These permissions can be # removed if not upgrading from an installation using host-local IPAM. -- apiGroups: ["apps"] +- apiGroups: [ "apps" ] resources: - daemonsets verbs: @@ -9051,19 +6756,19 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: calico-cni-plugin rules: -- apiGroups: [""] +- apiGroups: [ "" ] resources: - pods - nodes - namespaces verbs: - get -- apiGroups: [""] +- apiGroups: [ "" ] resources: - pods/status verbs: - patch -- apiGroups: ["crd.projectcalico.org"] +- apiGroups: [ "crd.projectcalico.org" ] resources: - blockaffinities - ipamblocks @@ -9201,9 +6906,9 @@ spec: # It can be deleted if this is a fresh installation, or if you have already # upgraded to use calico-ipam. - name: upgrade-ipam - image: docker.io/calico/cni:v3.30.2 + image: quay.io/calico/cni:v3.31.3 imagePullPolicy: IfNotPresent - command: ["/opt/cni/bin/calico-ipam", "-upgrade"] + command: [ "/opt/cni/bin/calico-ipam", "-upgrade" ] envFrom: - configMapRef: # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode. @@ -9229,9 +6934,9 @@ spec: # This container installs the CNI binaries # and CNI network config file on each node. - name: install-cni - image: docker.io/calico/cni:v3.30.2 + image: quay.io/calico/cni:v3.31.3 imagePullPolicy: IfNotPresent - command: ["/opt/cni/bin/install"] + command: [ "/opt/cni/bin/install" ] envFrom: - configMapRef: # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode. @@ -9269,12 +6974,13 @@ spec: securityContext: privileged: true # This init container mounts the necessary filesystems needed by the BPF data plane - # i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed - # in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode. - - name: "mount-bpffs" - image: docker.io/calico/node:v3.30.2 + # i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. It also configures the initial + # networking to allow communication with the API Server. Calico-node initialization is executed + # in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptables mode. + - name: "ebpf-bootstrap" + image: quay.io/calico/node:v3.31.3 imagePullPolicy: IfNotPresent - command: ["calico-node", "-init", "-best-effort"] + command: [ "calico-node", "-init", "-best-effort" ] volumeMounts: - mountPath: /sys/fs name: sys-fs @@ -9298,7 +7004,7 @@ spec: # container programs network policy and routes on each # host. - name: calico-node - image: docker.io/calico/node:v3.30.2 + image: quay.io/calico/node:v3.31.3 imagePullPolicy: IfNotPresent envFrom: - configMapRef: @@ -9452,7 +7158,7 @@ spec: hostPath: path: /sys/fs/bpf type: Directory - # mount /proc at /nodeproc to be used by mount-bpffs initContainer to mount root cgroup2 fs. + # mount /proc at /nodeproc to be used by ebpf-bootstrap initContainer to mount root cgroup2 fs. - name: nodeproc hostPath: path: /proc @@ -9521,7 +7227,7 @@ spec: priorityClassName: system-cluster-critical containers: - name: calico-kube-controllers - image: docker.io/calico/kube-controllers:v3.30.2 + image: quay.io/calico/kube-controllers:v3.31.3 imagePullPolicy: IfNotPresent env: # Choose which controllers to run. diff --git a/test/e2e/data/e2e_conf.yaml b/test/e2e/data/e2e_conf.yaml index 9914f0eb0..26f78b422 100644 --- a/test/e2e/data/e2e_conf.yaml +++ b/test/e2e/data/e2e_conf.yaml @@ -10,15 +10,15 @@ images: # Use local dev images built source tree; - name: gcr.io/k8s-staging-capi-openstack/capi-openstack-controller:e2e loadBehavior: mustLoad -- name: quay.io/orc/openstack-resource-controller:v2.2.0 +- name: quay.io/orc/openstack-resource-controller:v2.4.0 loadBehavior: tryLoad providers: - name: cluster-api type: CoreProvider versions: - - name: "{go://sigs.k8s.io/cluster-api@v1.11}" - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.11}/core-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@latest-v1.13}" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@latest-v1.13}/core-components.yaml" type: "url" contract: v1beta2 replacements: @@ -27,8 +27,8 @@ providers: files: - sourcePath: "../data/shared/capi/metadata.yaml" # For clusterctl upgrade test - - name: v1.11.0 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.11.0/core-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.12}" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.12}/core-components.yaml" type: "url" contract: v1beta2 replacements: @@ -36,22 +36,11 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/capi/metadata.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.10}" - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.10}/core-components.yaml" - type: url - contract: v1beta1 - files: - - sourcePath: "../data/shared/capi/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - - old: "--leader-elect" - new: "--leader-elect=false\n - --sync-period=1m" - name: kubeadm type: BootstrapProvider versions: - - name: "{go://sigs.k8s.io/cluster-api@v1.11}" - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.11}/bootstrap-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@latest-v1.13}" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@latest-v1.13}/bootstrap-components.yaml" type: "url" contract: v1beta2 replacements: @@ -60,8 +49,8 @@ providers: files: - sourcePath: "../data/shared/capi/metadata.yaml" # For clusterctl upgrade test - - name: v1.11.0 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.11.0/bootstrap-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.12}" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.12}/bootstrap-components.yaml" type: "url" contract: v1beta2 replacements: @@ -69,22 +58,11 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/capi/metadata.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.10}" - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.10}/bootstrap-components.yaml" - type: url - contract: v1beta1 - files: - - sourcePath: "../data/shared/capi/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - - old: "--leader-elect" - new: "--leader-elect=false\n - --sync-period=1m" - name: kubeadm type: ControlPlaneProvider versions: - - name: "{go://sigs.k8s.io/cluster-api@v1.11}" - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.11}/control-plane-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@latest-v1.13}" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@latest-v1.13}/control-plane-components.yaml" type: "url" contract: v1beta2 replacements: @@ -93,8 +71,8 @@ providers: files: - sourcePath: "../data/shared/capi/metadata.yaml" # For clusterctl upgrade test - - name: v1.11.0 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.11.0/control-plane-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.12}" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.12}/control-plane-components.yaml" type: "url" contract: v1beta2 replacements: @@ -102,28 +80,17 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/capi/metadata.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.10}" - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.10}/control-plane-components.yaml" - type: url - contract: v1beta1 - files: - - sourcePath: "../data/shared/capi/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - - old: "--leader-elect" - new: "--leader-elect=false\n - --sync-period=1m" - name: openstack type: InfrastructureProvider versions: # This is only for clusterctl upgrade tests - - name: "{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.11}" - value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.11}/infrastructure-components.yaml" + - name: "{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.12}" + value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.12}/infrastructure-components.yaml" type: url contract: v1beta1 files: - sourcePath: "../data/shared/provider/metadata.yaml" - - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template.yaml" + - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template-capi-v1beta1.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -132,13 +99,13 @@ providers: - old: "--leader-elect" new: "--leader-elect=false\n - --sync-period=1m" # This is only for clusterctl upgrade tests - - name: "{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.12}" - value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.12}/infrastructure-components.yaml" + - name: "{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.13}" + value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.13}/infrastructure-components.yaml" type: url contract: v1beta1 files: - sourcePath: "../data/shared/provider/metadata.yaml" - - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template.yaml" + - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template-capi-v1beta1.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -147,13 +114,13 @@ providers: - old: "--leader-elect" new: "--leader-elect=false\n - --sync-period=1m" # This is only for clusterctl upgrade tests - - name: "{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.13}" - value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.13}/infrastructure-components.yaml" + - name: "{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.14}" + value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/{go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.14}/infrastructure-components.yaml" type: url - contract: v1beta2 + contract: v1beta1 files: - sourcePath: "../data/shared/provider/metadata.yaml" - - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template.yaml" + - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template-capi-v1beta1.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -161,16 +128,17 @@ providers: new: "--v=4" - old: "--leader-elect" new: "--leader-elect=false\n - --sync-period=1m" - - name: v0.13.99 + - name: v0.15.99 value: ../../../config/default # This is the upcoming version. - # Specify no contract so that upgrade tests that start from a specific contract won't pick it up. - # contract: v1beta2 + contract: v1beta1 files: - sourcePath: "../data/shared/provider/metadata.yaml" - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template.yaml" - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template-without-lb.yaml" - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template-cluster-identity.yaml" + - sourcePath: "./infrastructure-openstack-no-artifact/cluster-template-topology-autoscaler.yaml" + - sourcePath: "../../../templates/clusterclass-dev-test.yaml" replacements: - old: gcr.io/k8s-staging-capi-openstack/capi-openstack-controller:dev new: gcr.io/k8s-staging-capi-openstack/capi-openstack-controller:e2e @@ -183,7 +151,7 @@ providers: - name: openstack-resource-controller type: RuntimeExtensionProvider # ORC isn't a provider but we fake it so it can be handled by the clusterctl machinery. versions: - - name: v2.2.0 + - name: v2.4.0 value: ../../../../cluster-api-provider-openstack/test/infrastructure/openstack-resource-controller/config/default contract: v1beta1 files: @@ -207,17 +175,23 @@ providers: variables: # used to ensure we deploy to the correct management cluster KUBE_CONTEXT: "kind-capo-e2e" - KUBERNETES_VERSION: "v1.33.1" - KUBERNETES_VERSION_UPGRADE_FROM: "v1.32.5" - KUBERNETES_VERSION_UPGRADE_TO: "v1.33.1" + # Pick a version that has a kind node image available. This is used in clusterctl upgrade tests. + KUBERNETES_KIND_VERSION: "v1.34.0" + KUBERNETES_VERSION: "v1.35.0" + KUBERNETES_VERSION_UPGRADE_FROM: "v1.34.2" + KUBERNETES_VERSION_UPGRADE_TO: "v1.35.0" + AUTOSCALER_VERSION: "v1.34.2" + AUTOSCALER_WORKLOAD: "../../data/autoscaler/autoscaler-to-workload-workload.yaml" # NOTE: To see default images run kubeadm config images list (optionally with --kubernetes-version=vX.Y.Z) - ETCD_VERSION_UPGRADE_TO: "3.5.21-0" - COREDNS_VERSION_UPGRADE_TO: "v1.12.0" + ETCD_VERSION_UPGRADE_TO: "3.6.6-0" + COREDNS_VERSION_UPGRADE_TO: "v1.13.1" CONTROL_PLANE_MACHINE_TEMPLATE_UPGRADE_TO: "upgrade-to-control-plane" WORKERS_MACHINE_TEMPLATE_UPGRADE_TO: "upgrade-to-md-0" CNI: "../../data/cni/calico.yaml" CCM: "../../data/ccm/cloud-controller-manager.yaml" - EXP_CLUSTER_RESOURCE_SET: "true" + EXP_CAPO_PRIORITY_QUEUE: "false" + EXP_CAPO_AUTOSCALE_FROM_ZERO: "true" + IP_FAMILY: "ipv4" OPENSTACK_BASTION_IMAGE_NAME: "cirros-0.6.1-x86_64-disk" OPENSTACK_BASTION_IMAGE_URL: https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/cirros/2022-12-05/cirros-0.6.1-x86_64-disk.img OPENSTACK_BASTION_IMAGE_HASH: 0c839612eb3f2469420f2ccae990827f @@ -232,10 +206,10 @@ variables: OPENSTACK_DNS_NAMESERVERS: "8.8.8.8" OPENSTACK_FAILURE_DOMAIN: "testaz1" OPENSTACK_FAILURE_DOMAIN_ALT: "testaz2" - OPENSTACK_IMAGE_NAME: "ubuntu-2404-kube-v1.33.1" - OPENSTACK_IMAGE_URL: https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/ubuntu-2404-kube-v1.33.1 - OPENSTACK_IMAGE_NAME_UPGRADE_FROM: "ubuntu-2404-kube-v1.32.5" - OPENSTACK_IMAGE_URL_UPGRADE_FROM: https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/ubuntu-2404-kube-v1.32.5 + OPENSTACK_IMAGE_NAME: "ubuntu-2404-kube-latest" + OPENSTACK_IMAGE_URL: https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/ubuntu-2404-kube-v1.35.0 + OPENSTACK_IMAGE_NAME_UPGRADE_FROM: "ubuntu-2404-kube-previous" + OPENSTACK_IMAGE_URL_UPGRADE_FROM: https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/ubuntu-2404-kube-v1.34.2 OPENSTACK_NODE_MACHINE_FLAVOR: "m1.small" OPENSTACK_SSH_KEY_NAME: "cluster-api-provider-openstack-sigs-k8s-io" # The default external network created by devstack @@ -246,13 +220,14 @@ variables: E2E_IMAGE_URL: "http://10.0.3.15/capo-e2e-image.tar" # The default user for SSH connections from bastion to machines SSH_USER_MACHINE: "ubuntu" + CLUSTER_TOPOLOGY: "true" EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION: "true" # The Flatcar image produced by the image-builder - OPENSTACK_FLATCAR_IMAGE_NAME: "flatcar-stable-4152.2.3-kube-v1.33.1" - OPENSTACK_FLATCAR_IMAGE_URL: "https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/flatcar/flatcar-stable-4152.2.3-kube-v1.33.1" + OPENSTACK_FLATCAR_IMAGE_NAME: "flatcar-stable" + OPENSTACK_FLATCAR_IMAGE_URL: "https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/flatcar/flatcar-stable-4459.2.2-kube-v1.35.0" # A plain Flatcar from the Flatcar releases server FLATCAR_IMAGE_NAME: "flatcar_production_openstack_image" - FLATCAR_IMAGE_URL: https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_openstack_image.img + FLATCAR_IMAGE_URL: https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/flatcar/flatcar_production_openstack_image-4459.2.2.img intervals: conformance/wait-control-plane: ["30m", "10s"] @@ -270,3 +245,9 @@ intervals: default/wait-machine-remediation: ["10m", "10s"] default/wait-image-create: ["15m", "10s"] default/wait-image-delete: ["2m", "10s"] + default/wait-autoscaler: ["10m", "10s"] + autoscaler/wait-cluster: ["20m", "10s"] + autoscaler/wait-control-plane: ["30m", "10s"] + autoscaler/wait-worker-nodes: ["30m", "10s"] + autoscaler/wait-controllers: ["10m", "10s"] + autoscaler/wait-autoscaler: ["10m", "10s"] diff --git a/test/e2e/data/kustomize/capi-v1beta1/kustomization.yaml b/test/e2e/data/kustomize/capi-v1beta1/kustomization.yaml index a371f58cd..8e884c349 100644 --- a/test/e2e/data/kustomize/capi-v1beta1/kustomization.yaml +++ b/test/e2e/data/kustomize/capi-v1beta1/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../../../../kustomize/v1beta1/capi-v1beta1 +- ../../../../../kustomize/capi-v1beta1 - ccm.yaml - cni.yaml # We cannot use the common cluster-resource-sets here since they are v1beta2. diff --git a/test/e2e/data/kustomize/components/common/kustomization.yaml b/test/e2e/data/kustomize/components/common/kustomization.yaml index 211dc0e4d..54c6f53a9 100644 --- a/test/e2e/data/kustomize/components/common/kustomization.yaml +++ b/test/e2e/data/kustomize/components/common/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component -resources: -- images.yaml +components: +- ../images patches: # Set AZ and enable bastion - target: @@ -22,7 +22,7 @@ patches: # Use ORC image references - target: group: infrastructure.cluster.x-k8s.io - version: v1beta1 + version: v1beta2 kind: OpenStackMachineTemplate patch: |- - op: replace @@ -32,7 +32,7 @@ patches: name: node-image - target: group: infrastructure.cluster.x-k8s.io - version: v1beta1 + version: v1beta2 kind: OpenStackCluster patch: |- - op: replace diff --git a/test/e2e/data/kustomize/components/common/images.yaml b/test/e2e/data/kustomize/components/images/images.yaml similarity index 100% rename from test/e2e/data/kustomize/components/common/images.yaml rename to test/e2e/data/kustomize/components/images/images.yaml diff --git a/test/e2e/data/kustomize/components/images/kustomization.yaml b/test/e2e/data/kustomize/components/images/kustomization.yaml new file mode 100644 index 000000000..daa515fd8 --- /dev/null +++ b/test/e2e/data/kustomize/components/images/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component +resources: +- images.yaml diff --git a/test/e2e/data/kustomize/components/upgrade-patches/ci-hack-kcp.yaml b/test/e2e/data/kustomize/components/self-hosted/ci-hack-kcp.yaml similarity index 100% rename from test/e2e/data/kustomize/components/upgrade-patches/ci-hack-kcp.yaml rename to test/e2e/data/kustomize/components/self-hosted/ci-hack-kcp.yaml diff --git a/test/e2e/data/kustomize/components/upgrade-patches/ci-hack-kct.yaml b/test/e2e/data/kustomize/components/self-hosted/ci-hack-kct.yaml similarity index 100% rename from test/e2e/data/kustomize/components/upgrade-patches/ci-hack-kct.yaml rename to test/e2e/data/kustomize/components/self-hosted/ci-hack-kct.yaml diff --git a/test/e2e/data/kustomize/components/self-hosted/kustomization.yaml b/test/e2e/data/kustomize/components/self-hosted/kustomization.yaml new file mode 100644 index 000000000..fe2d5cbf3 --- /dev/null +++ b/test/e2e/data/kustomize/components/self-hosted/kustomization.yaml @@ -0,0 +1,17 @@ +# Modifications to release templates for self-hosted scenarios. +# This patch allows the nodes dowload the CAPO image from E2E_IMAGE_URL, +# and load it. It is useful when testing unpublished images (e.g. a PR). +# The image is downloaded only if DOWNLOAD_E2E_IMAGE is set to true +# when rendering the cluster template. +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +patches: +- path: ci-hack-kcp.yaml + target: + kind: KubeadmControlPlane + name: \${CLUSTER_NAME}-control-plane +- path: ci-hack-kct.yaml + target: + kind: KubeadmConfigTemplate + name: \${CLUSTER_NAME}-md-0 diff --git a/test/e2e/data/kustomize/components/upgrade-patches/kustomization.yaml b/test/e2e/data/kustomize/components/upgrade-patches/kustomization.yaml deleted file mode 100644 index 678a6a6d7..000000000 --- a/test/e2e/data/kustomize/components/upgrade-patches/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Modifications to release templates for clusterctl upgrade scenarios -apiVersion: kustomize.config.k8s.io/v1alpha1 -kind: Component - -patches: -- path: ci-hack-kcp.yaml - target: - kind: KubeadmControlPlane - name: \${CLUSTER_NAME}-control-plane -- path: ci-hack-kct.yaml - target: - kind: KubeadmConfigTemplate - name: \${CLUSTER_NAME}-md-0 diff --git a/test/e2e/data/kustomize/default/kustomization.yaml b/test/e2e/data/kustomize/default/kustomization.yaml index f2d25440f..916c3782e 100644 --- a/test/e2e/data/kustomize/default/kustomization.yaml +++ b/test/e2e/data/kustomize/default/kustomization.yaml @@ -2,9 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../../../../kustomize/v1beta1/default +- ../../../../../kustomize/default components: - ../components/cluster-resource-sets - ../components/common -- ../components/upgrade-patches +- ../components/self-hosted diff --git a/test/e2e/data/kustomize/flatcar-sysext/kustomization.yaml b/test/e2e/data/kustomize/flatcar-sysext/kustomization.yaml index 86043c426..dbd3c681e 100644 --- a/test/e2e/data/kustomize/flatcar-sysext/kustomization.yaml +++ b/test/e2e/data/kustomize/flatcar-sysext/kustomization.yaml @@ -1,5 +1,5 @@ resources: -- ../../../../../kustomize/v1beta1/flatcar-sysext +- ../../../../../kustomize/flatcar-sysext components: - ../components/cluster-resource-sets diff --git a/test/e2e/data/kustomize/flatcar/kustomization.yaml b/test/e2e/data/kustomize/flatcar/kustomization.yaml index f7288946e..1e6d1203a 100644 --- a/test/e2e/data/kustomize/flatcar/kustomization.yaml +++ b/test/e2e/data/kustomize/flatcar/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../../../../kustomize/v1beta1/flatcar +- ../../../../../kustomize/flatcar components: - ../components/cluster-resource-sets diff --git a/test/e2e/data/kustomize/health-monitor/patch-cluster-health-monitor.yaml b/test/e2e/data/kustomize/health-monitor/patch-cluster-health-monitor.yaml index 59412670e..d289d3ffc 100644 --- a/test/e2e/data/kustomize/health-monitor/patch-cluster-health-monitor.yaml +++ b/test/e2e/data/kustomize/health-monitor/patch-cluster-health-monitor.yaml @@ -1,4 +1,4 @@ -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackCluster metadata: name: "${CLUSTER_NAME}" diff --git a/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml b/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml index f818e8c12..b4c69368e 100644 --- a/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml +++ b/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml @@ -1,4 +1,4 @@ -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-upgrade-from-control-plane @@ -13,7 +13,7 @@ spec: tags: - control-plane --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: ${CLUSTER_NAME}-upgrade-from-md-0 diff --git a/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml b/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml index 777ee0387..93ce46f17 100644 --- a/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml +++ b/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml @@ -3,7 +3,7 @@ # The normal templates has the cluster name as part of the OSMT name. # See CONTROL_PLANE_MACHINE_TEMPLATE_UPGRADE_TO and WORKERS_MACHINE_TEMPLATE_UPGRADE_TO # in the e2e config. -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: upgrade-to-control-plane @@ -20,7 +20,7 @@ spec: tags: - control-plane --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 kind: OpenStackMachineTemplate metadata: name: upgrade-to-md-0 diff --git a/test/e2e/data/kustomize/multi-az/patch-machine-template-worker.yaml b/test/e2e/data/kustomize/multi-az/patch-machine-template-worker.yaml index 6d46c42e3..d4c357c51 100644 --- a/test/e2e/data/kustomize/multi-az/patch-machine-template-worker.yaml +++ b/test/e2e/data/kustomize/multi-az/patch-machine-template-worker.yaml @@ -16,8 +16,8 @@ volume: type: ${OPENSTACK_VOLUME_TYPE_ALT} availabilityZone: - name: ${OPENSTACK_FAILURE_DOMAIN} + name: ${OPENSTACK_FAILURE_DOMAIN} - name: etcd sizeGiB: 1 storage: - type: Local \ No newline at end of file + type: Local diff --git a/test/e2e/data/kustomize/topology-autoscaler/cluster.yaml b/test/e2e/data/kustomize/topology-autoscaler/cluster.yaml new file mode 100644 index 000000000..e4e1d73ac --- /dev/null +++ b/test/e2e/data/kustomize/topology-autoscaler/cluster.yaml @@ -0,0 +1,44 @@ +apiVersion: cluster.x-k8s.io/v1beta2 +kind: Cluster +metadata: + name: ${CLUSTER_NAME} +spec: + topology: + classRef: + name: dev-test + version: ${KUBERNETES_VERSION} + controlPlane: + replicas: ${CONTROL_PLANE_MACHINE_COUNT} + workers: + machineDeployments: + - class: default-worker + name: md-0 + deletion: + nodeDeletionTimeoutSeconds: 60 + metadata: + annotations: + cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "2" + cluster.x-k8s.io/cluster-api-autoscaler-node-group-min-size: "1" + variables: + - name: identityRef + value: + name: ${CLUSTER_NAME}-cloud-config + cloudName: ${OPENSTACK_CLOUD} + - name: imageRef + value: node-image + - name: addImageVersion + value: false + - name: injectIgnitionSysext + value: true + - name: allowedCIDRs + value: ${OPENSTACK_API_SERVER_ALLOWED_CIDRS:=[]} + - name: bastion + value: + enabled: ${OPENSTACK_BASTION_ENABLED:=false} + spec: + flavor: ${OPENSTACK_BASTION_FLAVOR:=m1.small} + image: + imageRef: + name: bastion-image + sshKeyName: ${OPENSTACK_SSH_KEY_NAME:=""} + diff --git a/test/e2e/data/kustomize/topology-autoscaler/kustomization.yaml b/test/e2e/data/kustomize/topology-autoscaler/kustomization.yaml new file mode 100644 index 000000000..b2ad517cd --- /dev/null +++ b/test/e2e/data/kustomize/topology-autoscaler/kustomization.yaml @@ -0,0 +1,24 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- cluster.yaml +- secret.yaml + +components: +- ../components/images +- ../components/cluster-resource-sets + +patches: +- target: + group: openstack.k-orc.cloud + version: v1alpha1 + kind: Image + name: node-image + patch: |- + - op: replace + path: /spec/resource/name + value: ${FLATCAR_IMAGE_NAME} + - op: replace + path: /spec/resource/content/download/url + value: ${FLATCAR_IMAGE_URL} diff --git a/test/e2e/data/kustomize/topology-autoscaler/secret.yaml b/test/e2e/data/kustomize/topology-autoscaler/secret.yaml new file mode 100644 index 000000000..2d6641ada --- /dev/null +++ b/test/e2e/data/kustomize/topology-autoscaler/secret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +data: + cacert: ${OPENSTACK_CLOUD_CACERT_B64} + clouds.yaml: ${OPENSTACK_CLOUD_YAML_B64} +kind: Secret +metadata: + labels: + clusterctl.cluster.x-k8s.io/move: "true" + name: ${CLUSTER_NAME}-cloud-config diff --git a/test/e2e/data/kustomize/topology/cluster.yaml b/test/e2e/data/kustomize/topology/cluster.yaml new file mode 100644 index 000000000..477715f26 --- /dev/null +++ b/test/e2e/data/kustomize/topology/cluster.yaml @@ -0,0 +1,40 @@ +# Rather than editing the cluster-template, which include already variables, +# we simply create a new cluster-template with the correct variables for e2e. +apiVersion: cluster.x-k8s.io/v1beta2 +kind: Cluster +metadata: + name: ${CLUSTER_NAME} +spec: + topology: + classRef: + name: dev-test + version: ${KUBERNETES_VERSION} + controlPlane: + replicas: ${CONTROL_PLANE_MACHINE_COUNT} + workers: + machineDeployments: + - class: default-worker + name: md-0 + replicas: ${WORKER_MACHINE_COUNT} + variables: + - name: identityRef + value: + name: ${CLUSTER_NAME}-cloud-config + cloudName: ${OPENSTACK_CLOUD} + - name: imageRef + value: node-image + - name: addImageVersion + value: false + - name: injectIgnitionSysext + value: true + - name: allowedCIDRs + value: ${OPENSTACK_API_SERVER_ALLOWED_CIDRS:=[]} + - name: bastion + value: + enabled: ${OPENSTACK_BASTION_ENABLED:=false} + spec: + flavor: ${OPENSTACK_BASTION_FLAVOR:=m1.small} + image: + imageRef: + name: bastion-image + sshKeyName: ${OPENSTACK_SSH_KEY_NAME:=""} diff --git a/test/e2e/data/kustomize/topology/kustomization.yaml b/test/e2e/data/kustomize/topology/kustomization.yaml new file mode 100644 index 000000000..b2ad517cd --- /dev/null +++ b/test/e2e/data/kustomize/topology/kustomization.yaml @@ -0,0 +1,24 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- cluster.yaml +- secret.yaml + +components: +- ../components/images +- ../components/cluster-resource-sets + +patches: +- target: + group: openstack.k-orc.cloud + version: v1alpha1 + kind: Image + name: node-image + patch: |- + - op: replace + path: /spec/resource/name + value: ${FLATCAR_IMAGE_NAME} + - op: replace + path: /spec/resource/content/download/url + value: ${FLATCAR_IMAGE_URL} diff --git a/test/e2e/data/kustomize/topology/secret.yaml b/test/e2e/data/kustomize/topology/secret.yaml new file mode 100644 index 000000000..2d6641ada --- /dev/null +++ b/test/e2e/data/kustomize/topology/secret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +data: + cacert: ${OPENSTACK_CLOUD_CACERT_B64} + clouds.yaml: ${OPENSTACK_CLOUD_YAML_B64} +kind: Secret +metadata: + labels: + clusterctl.cluster.x-k8s.io/move: "true" + name: ${CLUSTER_NAME}-cloud-config diff --git a/test/e2e/data/kustomize/without-lb/kustomization.yaml b/test/e2e/data/kustomize/without-lb/kustomization.yaml index a42e9b8d8..2c8da69ca 100644 --- a/test/e2e/data/kustomize/without-lb/kustomization.yaml +++ b/test/e2e/data/kustomize/without-lb/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../../../../kustomize/v1beta1/without-lb +- ../../../../../kustomize/without-lb components: - ../components/cluster-resource-sets diff --git a/test/e2e/data/shared/capi/metadata.yaml b/test/e2e/data/shared/capi/metadata.yaml index 3675d1fd7..17ee2e8ab 100644 --- a/test/e2e/data/shared/capi/metadata.yaml +++ b/test/e2e/data/shared/capi/metadata.yaml @@ -31,3 +31,9 @@ releaseSeries: - major: 1 minor: 11 contract: v1beta2 +- major: 1 + minor: 12 + contract: v1beta2 +- major: 1 + minor: 13 + contract: v1beta2 diff --git a/test/e2e/data/shared/openstack-resource-controller/metadata.yaml b/test/e2e/data/shared/openstack-resource-controller/metadata.yaml index 56d37f0b6..3ed7fa075 100644 --- a/test/e2e/data/shared/openstack-resource-controller/metadata.yaml +++ b/test/e2e/data/shared/openstack-resource-controller/metadata.yaml @@ -14,3 +14,6 @@ releaseSeries: - major: 2 minor: 2 contract: v1beta1 +- major: 2 + minor: 4 + contract: v1beta1 diff --git a/test/e2e/data/shared/provider/metadata.yaml b/test/e2e/data/shared/provider/metadata.yaml index 9d59337bb..e61e4e64b 100644 --- a/test/e2e/data/shared/provider/metadata.yaml +++ b/test/e2e/data/shared/provider/metadata.yaml @@ -27,4 +27,10 @@ releaseSeries: contract: v1beta1 - major: 0 minor: 13 - contract: v1beta2 + contract: v1beta1 +- major: 0 + minor: 14 + contract: v1beta1 +- major: 0 + minor: 15 + contract: v1beta1 diff --git a/test/e2e/shared/cluster.go b/test/e2e/shared/cluster.go index 6373eefd5..8c9b0c9d4 100644 --- a/test/e2e/shared/cluster.go +++ b/test/e2e/shared/cluster.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "context" diff --git a/test/e2e/shared/common.go b/test/e2e/shared/common.go index 791e440fb..6161fd6be 100644 --- a/test/e2e/shared/common.go +++ b/test/e2e/shared/common.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "context" @@ -39,7 +38,7 @@ import ( "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/controller-runtime/pkg/client" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) func SetupSpecNamespace(ctx context.Context, specName string, e2eCtx *E2EContext) *corev1.Namespace { @@ -169,7 +168,8 @@ func getOpenStackClusterFromMachine(ctx context.Context, client client.Client, m } key = types.NamespacedName{ - Name: cluster.Spec.InfrastructureRef.Name, + Name: cluster.Spec.InfrastructureRef.Name, + Namespace: cluster.Namespace, } openStackCluster := &infrav1.OpenStackCluster{} err = client.Get(ctx, key, openStackCluster) diff --git a/test/e2e/shared/context.go b/test/e2e/shared/context.go index 4711def1a..113726cc7 100644 --- a/test/e2e/shared/context.go +++ b/test/e2e/shared/context.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "context" diff --git a/test/e2e/shared/defaults.go b/test/e2e/shared/defaults.go index e14af4892..b34404783 100644 --- a/test/e2e/shared/defaults.go +++ b/test/e2e/shared/defaults.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "errors" @@ -31,12 +30,13 @@ import ( orcv1alpha1 "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) const ( DefaultSSHKeyPairName = "cluster-api-provider-openstack-sigs-k8s-io" KubeContext = "KUBE_CONTEXT" + KubernetesKindVersion = "KUBERNETES_KIND_VERSION" KubernetesVersion = "KUBERNETES_VERSION" CCMPath = "CCM" CCMResources = "CCM_RESOURCES" @@ -52,6 +52,7 @@ const ( OpenStackNodeMachineFlavor = "OPENSTACK_NODE_MACHINE_FLAVOR" SSHUserMachine = "SSH_USER_MACHINE" FlavorDefault = "" + FlavorTopology = "topology" FlavorNoBastion = "no-bastion" FlavorWithoutLB = "without-lb" FlavorMultiNetwork = "multi-network" @@ -64,6 +65,7 @@ const ( FlavorHealthMonitor = "health-monitor" FlavorCapiV1Beta1 = "capi-v1beta1" FlavorClusterIdentity = "cluster-identity" + FlavorTopologyAutoscaler = "topology-autoscaler" ) // DefaultScheme returns the default scheme to use for testing. diff --git a/test/e2e/shared/exec.go b/test/e2e/shared/exec.go index e26f9e3fd..158fcd013 100644 --- a/test/e2e/shared/exec.go +++ b/test/e2e/shared/exec.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "bytes" diff --git a/test/e2e/shared/exec_test.go b/test/e2e/shared/exec_test.go index 2e71b57b0..1768b0de2 100644 --- a/test/e2e/shared/exec_test.go +++ b/test/e2e/shared/exec_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "context" diff --git a/test/e2e/shared/images.go b/test/e2e/shared/images.go index 110412384..b5ffe0275 100644 --- a/test/e2e/shared/images.go +++ b/test/e2e/shared/images.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2024 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "context" diff --git a/test/e2e/shared/openstack.go b/test/e2e/shared/openstack.go index 7c7128b76..9c7113af8 100644 --- a/test/e2e/shared/openstack.go +++ b/test/e2e/shared/openstack.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "bytes" @@ -56,7 +55,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/yaml" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/clients" "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/compute" "sigs.k8s.io/cluster-api-provider-openstack/pkg/scope" @@ -711,7 +710,7 @@ type AuthOpts struct { AuthURL string `ini:"auth-url"` UserID string `ini:"user-id"` Username string `ini:"username"` - Password string `ini:"password"` + Password string `ini:"password"` //nolint:gosec // G117: False positive, this is an INI schema field, not a hardcoded secret. TenantID string `ini:"tenant-id"` TenantName string `ini:"tenant-name"` DomainID string `ini:"domain-id"` diff --git a/test/e2e/shared/openstack_test.go b/test/e2e/shared/openstack_test.go index 1f1703aa0..2df894679 100644 --- a/test/e2e/shared/openstack_test.go +++ b/test/e2e/shared/openstack_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "context" diff --git a/test/e2e/shared/suite.go b/test/e2e/shared/suite.go index 5d48d9501..2800273e7 100644 --- a/test/e2e/shared/suite.go +++ b/test/e2e/shared/suite.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -17,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package shared +package e2eshared import ( "context" diff --git a/test/e2e/suites/apivalidations/filters_test.go b/test/e2e/suites/apivalidations/filters_test.go index 7ca4fc730..472b4e908 100644 --- a/test/e2e/suites/apivalidations/filters_test.go +++ b/test/e2e/suites/apivalidations/filters_test.go @@ -22,7 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) var _ = Describe("Filter API validations", func() { diff --git a/test/e2e/suites/apivalidations/openstackcluster_test.go b/test/e2e/suites/apivalidations/openstackcluster_test.go index f78401b41..eb03a1257 100644 --- a/test/e2e/suites/apivalidations/openstackcluster_test.go +++ b/test/e2e/suites/apivalidations/openstackcluster_test.go @@ -27,9 +27,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) var _ = Describe("OpenStackCluster API validations", func() { @@ -63,7 +63,7 @@ var _ = Describe("OpenStackCluster API validations", func() { Expect(createObj(cluster)).To(Succeed(), "OpenStackCluster creation should succeed") By("Setting the control plane endpoint") - cluster.Spec.ControlPlaneEndpoint = &clusterv1beta1.APIEndpoint{ + cluster.Spec.ControlPlaneEndpoint = &clusterv1.APIEndpoint{ Host: "foo", Port: 1234, } diff --git a/test/e2e/suites/apivalidations/openstackmachine_test.go b/test/e2e/suites/apivalidations/openstackmachine_test.go index 28af1cf80..6027da8f6 100644 --- a/test/e2e/suites/apivalidations/openstackmachine_test.go +++ b/test/e2e/suites/apivalidations/openstackmachine_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) var _ = Describe("OpenStackMachine API validations", func() { diff --git a/test/e2e/suites/apivalidations/openstackserver_test.go b/test/e2e/suites/apivalidations/openstackserver_test.go index ccc72f8cb..a44c9cef3 100644 --- a/test/e2e/suites/apivalidations/openstackserver_test.go +++ b/test/e2e/suites/apivalidations/openstackserver_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/utils/ptr" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" ) var _ = Describe("OpenStackServer API validations", func() { diff --git a/test/e2e/suites/apivalidations/suite_test.go b/test/e2e/suites/apivalidations/suite_test.go index f67973e0c..47f976a6a 100644 --- a/test/e2e/suites/apivalidations/suite_test.go +++ b/test/e2e/suites/apivalidations/suite_test.go @@ -40,7 +40,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" infrav1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/webhooks" ) @@ -68,6 +69,7 @@ var _ = BeforeSuite(func() { testScheme = scheme.Scheme for _, f := range []func(*runtime.Scheme) error{ infrav1alpha1.AddToScheme, + infrav1beta1.AddToScheme, infrav1.AddToScheme, } { Expect(f(testScheme)).To(Succeed()) diff --git a/test/e2e/suites/conformance/conformance_suite_test.go b/test/e2e/suites/conformance/conformance_suite_test.go index 3971c55fa..216806db0 100644 --- a/test/e2e/suites/conformance/conformance_suite_test.go +++ b/test/e2e/suites/conformance/conformance_suite_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -27,7 +26,7 @@ import ( . "github.com/onsi/gomega" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" ) var e2eCtx *shared.E2EContext diff --git a/test/e2e/suites/conformance/conformance_test.go b/test/e2e/suites/conformance/conformance_test.go index 6f218349b..a2f3300bb 100644 --- a/test/e2e/suites/conformance/conformance_test.go +++ b/test/e2e/suites/conformance/conformance_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -34,7 +33,7 @@ import ( "sigs.k8s.io/cluster-api/test/framework/kubernetesversions" "sigs.k8s.io/cluster-api/test/framework/kubetest" - "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" ) var _ = Describe("conformance tests", func() { diff --git a/test/e2e/suites/e2e/autoscaler_test.go b/test/e2e/suites/e2e/autoscaler_test.go new file mode 100644 index 000000000..1aceeece8 --- /dev/null +++ b/test/e2e/suites/e2e/autoscaler_test.go @@ -0,0 +1,57 @@ +//go:build e2e + +/* +Copyright 2025 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package e2e + +import ( + "context" + + . "github.com/onsi/ginkgo/v2" + "k8s.io/utils/ptr" + capi_e2e "sigs.k8s.io/cluster-api/test/e2e" + + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" +) + +// Currently marked as PR-blocking to ensure it runs +// might need to remove it. +var _ = Describe("Autoscaler on ClusterClass cluster [Autoscaler] [ClusterClass]", func() { + capi_e2e.AutoscalerSpec(context.TODO(), func() capi_e2e.AutoscalerSpecInput { + infraAPIGroup := infrav1.GroupName + + return capi_e2e.AutoscalerSpecInput{ + E2EConfig: e2eCtx.E2EConfig, + ClusterctlConfigPath: e2eCtx.Environment.ClusterctlConfigPath, + BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, + ArtifactFolder: e2eCtx.Settings.ArtifactFolder, + SkipCleanup: false, + Flavor: ptr.To(shared.FlavorTopologyAutoscaler), + InfrastructureMachineTemplateKind: "openstackmachinetemplates", + // CAPO does not support machinePools + InfrastructureMachinePoolTemplateKind: "", + InfrastructureMachinePoolKind: "", + InfrastructureAPIGroup: infraAPIGroup, + AutoscalerVersion: e2eCtx.E2EConfig.MustGetVariable("AUTOSCALER_VERSION"), + InstallOnManagementCluster: true, + ScaleToAndFromZero: true, + + PostNamespaceCreated: nil, + } + }) +}) diff --git a/test/e2e/suites/e2e/clusterctl_upgrade_test.go b/test/e2e/suites/e2e/clusterctl_upgrade_test.go index 1af541d48..40977f6d1 100644 --- a/test/e2e/suites/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/suites/e2e/clusterctl_upgrade_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -27,28 +26,26 @@ import ( capi_e2e "sigs.k8s.io/cluster-api/test/e2e" "sigs.k8s.io/cluster-api/test/framework/clusterctl" - "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" ) var ( - capoRelease011 string capoRelease012 string capoRelease013 string - capiRelease110 string - capiRelease111 string + capoRelease014 string + capiRelease112 string ) -var _ = Describe("When testing clusterctl upgrades for CAPO (v0.11=>current) and ORC (v1.0.2=>current) [clusterctl-upgrade]", func() { +var _ = Describe("When testing clusterctl upgrades for CAPO (v0.12=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() { BeforeEach(func(ctx context.Context) { - setDownloadE2EImageEnvVar() // Note: This gives the version without the 'v' prefix, so we need to add it below. - capoRelease011, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.11") + capoRelease012, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.12") Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPO") - capoRelease011 = "v" + capoRelease011 + capoRelease012 = "v" + capoRelease012 // Note: This gives the version without the 'v' prefix, so we need to add it below. - capiRelease110, err = capi_e2e.GetStableReleaseOfMinor(ctx, "1.10") + capiRelease112, err = capi_e2e.GetStableReleaseOfMinor(ctx, "1.12") Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPI") - capiRelease110 = "v" + capiRelease110 + capiRelease112 = "v" + capiRelease112 }) capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput { @@ -58,31 +55,31 @@ var _ = Describe("When testing clusterctl upgrades for CAPO (v0.11=>current) and BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, ArtifactFolder: e2eCtx.Settings.ArtifactFolder, SkipCleanup: false, - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease110 + "/clusterctl-{OS}-{ARCH}", - InitWithProvidersContract: "v1beta1", - InitWithInfrastructureProviders: []string{"openstack:" + capoRelease011}, - InitWithCoreProvider: "cluster-api:" + capiRelease110, - InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease110}, - InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease110}, + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease112 + "/clusterctl-{OS}-{ARCH}", + InitWithProvidersContract: "v1beta2", + InitWithInfrastructureProviders: []string{"openstack:" + capoRelease012}, + InitWithCoreProvider: "cluster-api:" + capiRelease112, + InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease112}, + InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease112}, MgmtFlavor: shared.FlavorDefault, WorkloadFlavor: shared.FlavorCapiV1Beta1, - InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), + InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesKindVersion), InitWithRuntimeExtensionProviders: []string{"openstack-resource-controller:v1.0.2"}, + UseKindForManagementCluster: true, } }) }) -var _ = Describe("When testing clusterctl upgrades for CAPO (v0.12=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() { +var _ = Describe("When testing clusterctl upgrades for CAPO (v0.13=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() { BeforeEach(func(ctx context.Context) { - setDownloadE2EImageEnvVar() // Note: This gives the version without the 'v' prefix, so we need to add it below. - capoRelease012, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.12") + capoRelease013, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.13") Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPO") - capoRelease012 = "v" + capoRelease012 + capoRelease013 = "v" + capoRelease013 // Note: This gives the version without the 'v' prefix, so we need to add it below. - capiRelease110, err = capi_e2e.GetStableReleaseOfMinor(ctx, "1.10") + capiRelease112, err = capi_e2e.GetStableReleaseOfMinor(ctx, "1.12") Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPI") - capiRelease110 = "v" + capiRelease110 + capiRelease112 = "v" + capiRelease112 }) capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput { @@ -92,31 +89,31 @@ var _ = Describe("When testing clusterctl upgrades for CAPO (v0.12=>current) and BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, ArtifactFolder: e2eCtx.Settings.ArtifactFolder, SkipCleanup: false, - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease110 + "/clusterctl-{OS}-{ARCH}", - InitWithProvidersContract: "v1beta1", - InitWithInfrastructureProviders: []string{"openstack:" + capoRelease012}, - InitWithCoreProvider: "cluster-api:" + capiRelease110, - InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease110}, - InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease110}, + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease112 + "/clusterctl-{OS}-{ARCH}", + InitWithProvidersContract: "v1beta2", + InitWithInfrastructureProviders: []string{"openstack:" + capoRelease013}, + InitWithCoreProvider: "cluster-api:" + capiRelease112, + InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease112}, + InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease112}, MgmtFlavor: shared.FlavorDefault, WorkloadFlavor: shared.FlavorCapiV1Beta1, - InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), + InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesKindVersion), InitWithRuntimeExtensionProviders: []string{"openstack-resource-controller:v1.0.2"}, + UseKindForManagementCluster: true, } }) }) -var _ = Describe("When testing clusterctl upgrades for CAPO (v0.13=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() { +var _ = Describe("When testing clusterctl upgrades for CAPO (v0.14=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() { BeforeEach(func(ctx context.Context) { - setDownloadE2EImageEnvVar() // Note: This gives the version without the 'v' prefix, so we need to add it below. - capoRelease013, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.13") + capoRelease014, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.14") Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPO") - capoRelease013 = "v" + capoRelease013 - // We need CAPI v1.11 here for clusterctl init with the v1beta2 contract. - // This is hard-coded to the .0 release because the test will fail if there are no - // newer patch releases to upgrade to. - capiRelease111 = "v1.11.0" + capoRelease014 = "v" + capoRelease014 + // Note: This gives the version without the 'v' prefix, so we need to add it below. + capiRelease112, err = capi_e2e.GetStableReleaseOfMinor(ctx, "1.12") + Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPI") + capiRelease112 = "v" + capiRelease112 }) capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput { @@ -126,16 +123,17 @@ var _ = Describe("When testing clusterctl upgrades for CAPO (v0.13=>current) and BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, ArtifactFolder: e2eCtx.Settings.ArtifactFolder, SkipCleanup: false, - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease111 + "/clusterctl-{OS}-{ARCH}", - InitWithProvidersContract: "v1beta1", - InitWithInfrastructureProviders: []string{"openstack:" + capoRelease013}, - InitWithCoreProvider: "cluster-api:" + capiRelease111, - InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease111}, - InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease111}, + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease112 + "/clusterctl-{OS}-{ARCH}", + InitWithProvidersContract: "v1beta2", + InitWithInfrastructureProviders: []string{"openstack:" + capoRelease014}, + InitWithCoreProvider: "cluster-api:" + capiRelease112, + InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease112}, + InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease112}, MgmtFlavor: shared.FlavorDefault, - WorkloadFlavor: shared.FlavorDefault, - InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), + WorkloadFlavor: shared.FlavorCapiV1Beta1, + InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesKindVersion), InitWithRuntimeExtensionProviders: []string{"openstack-resource-controller:v1.0.2"}, + UseKindForManagementCluster: true, } }) }) diff --git a/test/e2e/suites/e2e/e2e_suite_test.go b/test/e2e/suites/e2e/e2e_suite_test.go index a4fb17dad..b93db77e3 100644 --- a/test/e2e/suites/e2e/e2e_suite_test.go +++ b/test/e2e/suites/e2e/e2e_suite_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -35,7 +34,7 @@ import ( . "github.com/onsi/gomega" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" ) var ( diff --git a/test/e2e/suites/e2e/e2e_test.go b/test/e2e/suites/e2e/e2e_test.go index 3fbdd4862..ccacb7cec 100644 --- a/test/e2e/suites/e2e/e2e_test.go +++ b/test/e2e/suites/e2e/e2e_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -51,17 +50,16 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/utils/ptr" bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" crclient "sigs.k8s.io/controller-runtime/pkg/client" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/internal/util/ssa" "sigs.k8s.io/cluster-api-provider-openstack/pkg/generated/applyconfiguration/api/v1beta1" - "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" ) const specName = "e2e" @@ -189,6 +187,26 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { // from both the control plane and worker machines and vice versa, that makes 8 rules. Expect(calicoSGRules).To(Equal(8)) + infraRef := md[0].Spec.Template.Spec.InfrastructureRef + Expect(infraRef.Kind).To(Equal("OpenStackMachineTemplate")) + + tmplKey := apimachinerytypes.NamespacedName{ + Namespace: namespace.Name, + Name: infraRef.Name, + } + + // We expect OpenStackMachineTemplate.status.capacity to be set + // by the OpenStackMachineTemplate controller + shared.Logf("Check the OpenStackMachineTemplate.status") + Eventually(func(g Gomega) { + var tmpl infrav1.OpenStackMachineTemplate + err := e2eCtx.Environment.BootstrapClusterProxy.GetClient().Get(ctx, tmplKey, &tmpl) + g.Expect(err).NotTo(HaveOccurred()) + + g.Expect(tmpl.Status.Capacity).NotTo(BeNil(), "status.capacity should be initialized") + g.Expect(tmpl.Status.Capacity).NotTo(BeEmpty(), "status.capacity should not be empty") + }, e2eCtx.E2EConfig.GetIntervals(specName, "wait-machine-status")...).Should(Succeed()) + shared.Logf("Check the bastion") openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) Expect(err).NotTo(HaveOccurred()) @@ -201,11 +219,14 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { Expect(bastionServer).To(HaveLen(1), "Did not find the bastion in OpenStack") shared.Logf("Disable the bastion") - openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) - Expect(err).NotTo(HaveOccurred()) - openStackClusterDisabledBastion := openStackCluster.DeepCopy() - openStackClusterDisabledBastion.Spec.Bastion.Enabled = ptr.To(false) - Expect(e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackClusterDisabledBastion)).To(Succeed()) + Eventually(func() error { + openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) + if err != nil { + return err + } + openStackCluster.Spec.Bastion.Enabled = ptr.To(false) + return e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackCluster) + }, "30s", "1s").Should(Succeed()) Eventually( func() (bool, error) { bastionServer, err := shared.DumpOpenStackServers(e2eCtx, servers.ListOpts{Name: bastionServerName}) @@ -238,11 +259,14 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { ).Should(BeTrue()) shared.Logf("Delete the bastion") - openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) - Expect(err).NotTo(HaveOccurred()) - openStackClusterWithoutBastion := openStackCluster.DeepCopy() - openStackClusterWithoutBastion.Spec.Bastion = nil - Expect(e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackClusterWithoutBastion)).To(Succeed()) + Eventually(func() error { + openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) + if err != nil { + return err + } + openStackCluster.Spec.Bastion = nil + return e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackCluster) + }, "30s", "1s").Should(Succeed()) openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) Expect(err).NotTo(HaveOccurred()) Eventually( @@ -260,12 +284,15 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { bastionNewFlavorName := ptr.To(e2eCtx.E2EConfig.MustGetVariable(shared.OpenStackBastionFlavorAlt)) bastionNewFlavor, err := shared.GetFlavorFromName(e2eCtx, bastionNewFlavorName) Expect(err).NotTo(HaveOccurred()) - openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) - Expect(err).NotTo(HaveOccurred()) - openStackClusterWithNewBastionFlavor := openStackCluster.DeepCopy() - openStackClusterWithNewBastionFlavor.Spec.Bastion = bastionSpec - openStackClusterWithNewBastionFlavor.Spec.Bastion.Spec.Flavor = bastionNewFlavorName - Expect(e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackClusterWithNewBastionFlavor)).To(Succeed()) + Eventually(func() error { + openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) + if err != nil { + return err + } + openStackCluster.Spec.Bastion = bastionSpec + openStackCluster.Spec.Bastion.Spec.Flavor = bastionNewFlavorName + return e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackCluster) + }, "30s", "1s").Should(Succeed()) Eventually( func() (bool, error) { bastionServer, err := shared.DumpOpenStackServers(e2eCtx, servers.ListOpts{Name: bastionServerName, Flavor: bastionNewFlavor.ID}) @@ -278,7 +305,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { ).Should(BeTrue()) openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) Expect(err).NotTo(HaveOccurred()) - Expect(openStackCluster.Spec.Bastion).To(Equal(openStackClusterWithNewBastionFlavor.Spec.Bastion)) + Expect(openStackCluster.Spec.Bastion).To(Equal(bastionSpec)) Eventually( func() (bool, error) { openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) @@ -296,12 +323,15 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { shared.Logf("Change the bastion spec with the original flavor") bastionOriginalFlavor, err := shared.GetFlavorFromName(e2eCtx, bastionFlavor) Expect(err).NotTo(HaveOccurred()) - openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) - Expect(err).NotTo(HaveOccurred()) - openStackClusterWithOriginalBastionFlavor := openStackCluster.DeepCopy() - openStackClusterWithOriginalBastionFlavor.Spec.Bastion = bastionSpec - openStackClusterWithOriginalBastionFlavor.Spec.Bastion.Spec.Flavor = bastionFlavor - Expect(e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackClusterWithOriginalBastionFlavor)).To(Succeed()) + Eventually(func() error { + openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) + if err != nil { + return err + } + openStackCluster.Spec.Bastion = bastionSpec + openStackCluster.Spec.Bastion.Spec.Flavor = bastionFlavor + return e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackCluster) + }, "30s", "1s").Should(Succeed()) Eventually( func() (bool, error) { bastionServer, err := shared.DumpOpenStackServers(e2eCtx, servers.ListOpts{Name: bastionServerName, Flavor: bastionOriginalFlavor.ID}) @@ -314,7 +344,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { ).Should(BeTrue()) openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) Expect(err).NotTo(HaveOccurred()) - Expect(openStackCluster.Spec.Bastion).To(Equal(openStackClusterWithOriginalBastionFlavor.Spec.Bastion)) + Expect(openStackCluster.Spec.Bastion).To(Equal(bastionSpec)) Eventually( func() (bool, error) { openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) @@ -745,7 +775,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { openStackCluster, err := shared.ClusterForSpec(ctx, e2eCtx, namespace) Expect(err).NotTo(HaveOccurred()) - var allMachines []clusterv1.Machine + allMachines := make([]clusterv1.Machine, 0, len(controlPlaneMachines)+len(workerMachines)) allMachines = append(allMachines, controlPlaneMachines...) allMachines = append(allMachines, workerMachines...) @@ -768,7 +798,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { Expect(err).NotTo(HaveOccurred()) Expect(ports).To(HaveLen(len(expectedPorts))) - var seenNetworks []string + seenNetworks := make([]string, 0, len(ports)) var seenAddresses clusterv1.MachineAddresses for j := range ports { port := &ports[j] @@ -919,7 +949,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { fmt.Sprintf("Cluster %s: worker machines were not scheduled in the expected AZ", cluster.Name)) // Check that all machines were actually scheduled in the correct AZ - var allMachines []clusterv1.Machine + allMachines := make([]clusterv1.Machine, 0, len(controlPlaneMachines)+len(workerMachines)) allMachines = append(allMachines, controlPlaneMachines...) allMachines = append(allMachines, workerMachines...) @@ -1018,13 +1048,13 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { shared.Logf("Waiting for the OpenStackMachine to have a condition that the server has been unexpectedly deleted") retries := 0 - Eventually(func() (clusterv1beta1.Condition, error) { + Eventually(func() (metav1.Condition, error) { k8sClient := e2eCtx.Environment.BootstrapClusterProxy.GetClient() openStackMachine := &infrav1.OpenStackMachine{} err := k8sClient.Get(ctx, crclient.ObjectKey{Name: controlPlaneMachines[0].Name, Namespace: controlPlaneMachines[0].Namespace}, openStackMachine) if err != nil { - return clusterv1beta1.Condition{}, err + return metav1.Condition{}, err } for _, condition := range openStackMachine.Status.Conditions { if condition.Type == infrav1.InstanceReadyCondition { @@ -1043,18 +1073,17 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { }) err = k8sClient.Patch(ctx, openStackMachine, ssa.ApplyConfigPatch(applyConfig), crclient.ForceOwnership, crclient.FieldOwner("capo-e2e")) if err != nil { - return clusterv1beta1.Condition{}, err + return metav1.Condition{}, err } - return clusterv1beta1.Condition{}, errors.New("condition InstanceReadyCondition not found") + return metav1.Condition{}, errors.New("condition InstanceReadyCondition not found") }, time.Minute*3, time.Second*10).Should(MatchFields( IgnoreExtras, Fields{ - "Type": Equal(infrav1.InstanceReadyCondition), - "Status": Equal(corev1.ConditionFalse), - "Reason": Equal(infrav1.InstanceDeletedReason), - "Message": Equal(infrav1.ServerUnexpectedDeletedMessage), - "Severity": Equal(clusterv1beta1.ConditionSeverityError), + "Type": Equal(infrav1.InstanceReadyCondition), + "Status": Equal(metav1.ConditionFalse), + "Reason": Equal(infrav1.InstanceDeletedReason), + "Message": Equal(infrav1.ServerUnexpectedDeletedMessage), }, ), "OpenStackMachine should be marked not ready with InstanceDeletedReason") }) @@ -1128,14 +1157,15 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { Expect(clusterMonitor.Type).To(Equal("TCP"), "Monitor should be TCP type") shared.Logf("Testing health monitor configuration update") - openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) - Expect(err).NotTo(HaveOccurred()) - - updatedCluster := openStackCluster.DeepCopy() - updatedCluster.Spec.APIServerLoadBalancer.Monitor.Delay = 20 - updatedCluster.Spec.APIServerLoadBalancer.Monitor.MaxRetries = 4 - - Expect(e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, updatedCluster)).To(Succeed()) + Eventually(func() error { + openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) + if err != nil { + return err + } + openStackCluster.Spec.APIServerLoadBalancer.Monitor.Delay = 20 + openStackCluster.Spec.APIServerLoadBalancer.Monitor.MaxRetries = 4 + return e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackCluster) + }, "30s", "1s").Should(Succeed()) Eventually(func() (bool, error) { updatedMonitor, err := shared.GetOpenStackLoadBalancerMonitor(e2eCtx, clusterMonitor.ID) @@ -1153,16 +1183,18 @@ var _ = Describe("e2e tests [PR-Blocking]", func() { Expect(finalMonitor.MaxRetriesDown).To(Equal(2), "Monitor maxRetriesDown should remain unchanged") shared.Logf("Testing monitor configuration removal and default value reversion") - openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) - Expect(err).NotTo(HaveOccurred()) - - clusterWithRemovedMonitor := openStackCluster.DeepCopy() - clusterWithRemovedMonitor.Spec.APIServerLoadBalancer.Monitor = nil - if clusterWithRemovedMonitor.Annotations == nil { - clusterWithRemovedMonitor.Annotations = make(map[string]string) - } - clusterWithRemovedMonitor.Annotations["test.e2e/monitor-update"] = fmt.Sprintf("%d", time.Now().Unix()) - Expect(e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, clusterWithRemovedMonitor)).To(Succeed()) + Eventually(func() error { + openStackCluster, err = shared.ClusterForSpec(ctx, e2eCtx, namespace) + if err != nil { + return err + } + openStackCluster.Spec.APIServerLoadBalancer.Monitor = nil + if openStackCluster.Annotations == nil { + openStackCluster.Annotations = make(map[string]string) + } + openStackCluster.Annotations["test.e2e/monitor-update"] = fmt.Sprintf("%d", time.Now().Unix()) + return e2eCtx.Environment.BootstrapClusterProxy.GetClient().Update(ctx, openStackCluster) + }, "30s", "1s").Should(Succeed()) Eventually(func() (bool, error) { revertedMonitor, err := shared.GetOpenStackLoadBalancerMonitor(e2eCtx, clusterMonitor.ID) diff --git a/test/e2e/suites/e2e/quick_start_test.go b/test/e2e/suites/e2e/quick_start_test.go new file mode 100644 index 000000000..3d2491c7a --- /dev/null +++ b/test/e2e/suites/e2e/quick_start_test.go @@ -0,0 +1,42 @@ +//go:build e2e + +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package e2e + +import ( + "context" + + . "github.com/onsi/ginkgo/v2" + "k8s.io/utils/ptr" + capi_e2e "sigs.k8s.io/cluster-api/test/e2e" + + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" +) + +var _ = Describe("When following the Cluster API quick-start with ClusterClass [PR-Blocking] [ClusterClass]", func() { + capi_e2e.QuickStartSpec(context.TODO(), func() capi_e2e.QuickStartSpecInput { + return capi_e2e.QuickStartSpecInput{ + E2EConfig: e2eCtx.E2EConfig, + ClusterctlConfigPath: e2eCtx.Environment.ClusterctlConfigPath, + BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, + ArtifactFolder: e2eCtx.Settings.ArtifactFolder, + SkipCleanup: false, + Flavor: ptr.To(shared.FlavorTopology), + } + }) +}) diff --git a/test/e2e/suites/e2e/remediations_test.go b/test/e2e/suites/e2e/remediations_test.go index d8df1765d..c4c023143 100644 --- a/test/e2e/suites/e2e/remediations_test.go +++ b/test/e2e/suites/e2e/remediations_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2021 The Kubernetes Authors. @@ -26,7 +25,7 @@ import ( "k8s.io/utils/ptr" capi_e2e "sigs.k8s.io/cluster-api/test/e2e" - "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" ) var _ = Describe("When testing unhealthy machines remediation", func() { diff --git a/test/e2e/suites/e2e/self_hosted_test.go b/test/e2e/suites/e2e/self_hosted_test.go index 3ad151101..35dba0b08 100644 --- a/test/e2e/suites/e2e/self_hosted_test.go +++ b/test/e2e/suites/e2e/self_hosted_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e /* Copyright 2022 The Kubernetes Authors. @@ -25,11 +24,13 @@ import ( . "github.com/onsi/ginkgo/v2" capie2e "sigs.k8s.io/cluster-api/test/e2e" - "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" + shared "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" ) var _ = Describe("When testing Cluster API provider Openstack working on [self-hosted] clusters", func() { BeforeEach(func() { + // The self-hosted cluster does not have the CAPO image loaded like the kind cluster does, + // so we download it from E2E_IMAGE_URL. setDownloadE2EImageEnvVar() }) diff --git a/test/helpers/fuzzerfuncs.go b/test/helpers/fuzzerfuncs.go index 10724d5a1..6da8cc6a3 100644 --- a/test/helpers/fuzzerfuncs.go +++ b/test/helpers/fuzzerfuncs.go @@ -22,7 +22,7 @@ import ( fuzz "github.com/google/gofuzz" "k8s.io/utils/ptr" - infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta2" "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional" ) diff --git a/test/infrastructure/openstack-resource-controller/config/default/kustomization.yaml b/test/infrastructure/openstack-resource-controller/config/default/kustomization.yaml index 1e332598e..45535bfad 100644 --- a/test/infrastructure/openstack-resource-controller/config/default/kustomization.yaml +++ b/test/infrastructure/openstack-resource-controller/config/default/kustomization.yaml @@ -8,4 +8,4 @@ labels: cluster.x-k8s.io/provider: "runtime-extension-openstack-resource-controller" resources: -- https://github.com/k-orc/openstack-resource-controller/releases/download/v2.2.0/install.yaml +- https://github.com/k-orc/openstack-resource-controller/releases/download/v2.4.0/install.yaml diff --git a/version/version.go b/version/version.go index ab2fd9749..8c6d883c2 100644 --- a/version/version.go +++ b/version/version.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package version +package version //nolint:revive import ( "fmt"